SlideShare a Scribd company logo
@quidryan@quidryan
http://www.slideshare.net/quidryan
Netflix Build Language
Justin Ryan <jryan@netflix.com>
@quidryan@quidryan
http://www.slideshare.net/quidryan
Justin Ryan <jryan@netflix.com>
Why Netflix Uses Gradle
• Better Dependency
Management story
• Flexible lifecycle
• Groovy
How Netflix Uses Gradle
• JVM Languages
• Resolution
• Code Quality
• Publishing
• Deployment Orchestration
How Netflix Sets up Gradle
• Patched Gradle
• Custom Distribution
• Custom Wrapper
apply plugin: ‘nebula’!
apply plugin: ‘java’!
!
nebula {!
readyForJava7 = true!
}!
!
dependencies {!
compile ‘netflix:platform:latest.release’!
}
build.gradle
@NetflixOSS
github.com/Netflix
netflix.github.io
Unite two builds
• Model a responsible project
• Componentize via plugins
nebula-plugins
• Infrastructure
• Use Github
• Use CloudBees
• Use Bintray
• Mailing List
• nebula-plugin-plugin
Github Repositories
nebula-* or gradle-*-plugin
Ensuring Github
• https://github.com/nebula-plugins/ensure
• Ensure repository has
• Description
• Web Hooks
• Ensure “contrib" team has all repositories in it
• Ensure a contrib team exists for every repository
Continuous Integration
• Job DSL to create jobs
• Per branch
• Snapshot job
• Release job
• Lock job
CloudBees jobs
Release, snapshot, and pull request per branch
Job DSL
Bintray Packages
Ensuring Bintray
• https://github.com/nebula-plugins/ensure
• Ensure every repository has a package
• Ensure package has the description as Github
• Ensure license is set to Apache 2.0
• Ensure labels are “gradle" and “nebula”
nebula-plugin-plugin
nebula-test	
• ProjectSpec
• PluginProjectSpec
• IntegrationSpec
• Thanks to Marcin and Luke
• Runs with Tooling API or GradleLauncher
class PluginExampleSpec extends PluginProjectSpec {!
@Override!
String getPluginName() { return 'plugin-example' }!
!
def ‘run task’() {!
when:!
project.plugins.apply(PluginExample)!
!
then:!
def t = project.tasks.get(‘example’)!
!
when:!
t.run()!
!
then:!
new File(projectDir, ‘build/example.txt’).exists()!
}!
}
PluginProjectSpec
!
def 'setup and run build'() {!
buildFile << '''!
apply plugin: 'java'!
'''.stripIndent()!
!
when:!
writeHelloWorld('nebula.hello')!
!
then:!
fileExists('src/main/java/nebula/hello/HelloWorld.java')!
!
when:!
def result = runTasksSuccessfully(‘build’, ‘-v’)!
!
then:!
fileExists(‘build/classes/main/nebula/hello/HelloWorld.class')!
result.wasExecuted(':compileTestJava')!
def output = result.standardOutput!
output.contains('Skipping task ’:compileTestJava'')!
}
IntegrationSpec
nebula-core	
• Collection of tasks
• Download
• Untar
• Unzip
• AlternativeArchiveTask
• CopySpecHelper
• GradleHelper
class GradleHelper {!
! def beforeEvaluate(Closure beforeEvaluateClosure)!
! def getTempDir(String taskBaseName)!
! def addDefaultGroup(String defaultGroup)!
}!
!
class CopySpecHelper {!
! def visitCopySpec(CopySpecInternal copySpec, Closure closure)!
! def findCopySpec(CopySpecInternal delegateCopySpec, closure)!
}!
!
class ClassHelper {!
! String findSpecificationVersion(Class clazz)!
! Manifest findManifest(Class clazz)!
! def findManifestValue(Class clazz, String key, defaultValue)!
}
nebula-core helpers
nebula-publishing-plugin	
• Artifact plugins
• nebula-javadoc-jar
• nebula-source-jar
• nebula-test-jar
• Publishing plugins
• resolved-ivy
• resolved-maven
• nebula-sign
apply plugin: ‘nebula-maven-publishing‘!
apply plugin: ‘nebula-source-jar'!
apply plugin: ‘nebula-javadoc-jar'!
apply plugin: ‘nebula-test-jar'!
apply plugin: ‘nebula-sign'!
apply plugin: 'java'
nebula-publishing.gradle
my-plugin-1.12.0-javadoc.jar!
my-plugin-1.12.0-javadoc.jar.md5!
my-plugin-1.12.0-javadoc.jar.sha1!
my-plugin-1.12.0-javadoc.jar.asc!
my-plugin-1.12.0-sources.jar!
my-plugin-1.12.0-sources.jar.md5!
my-plugin-1.12.0-sources.jar.sha1!
my-plugin-1.12.0-sources.jar.asc!
my-plugin-1.12.0-tests.jar!
my-plugin-1.12.0-tests.jar.md5!
my-plugin-1.12.0-tests.jar.sha1!
my-plugin-1.12.0-tests.jar.asc!
my-plugin-1.12.0.jar!
my-plugin-1.12.0.jar.md5!
my-plugin-1.12.0.jar.sha1!
my-plugin-1.12.0.jar.asc!
my-plugin-1.12.0.pom!
my-plugin-1.12.0.pom.md5!
my-plugin-1.12.0.pom.sha1!
my-plugin-1.12.0.pom.asc
gradle-info-plugin	
• Collects meta data
• ‘info-java'
• ‘info-ci'
• 'info-scm'
• Reports in key/value pairs
• ‘info-jar'
• ‘info-props'
buildscript {!
! repositories { jcenter() }!
! dependencies { !
! ! classpath 'com.netflix.nebula:gradle-info-plugin:1.12.+'!
! ! classpath ‘org.eclipse.jgit:org.eclipse.jgit:
3.2.0.201312181205-r'!
! }!
}!
apply plugin: 'info'
info.gradle
Manifest-Version=1.0!
Implementation-Title=com.netflix.nebula#my-plugin;1.12.1-SNAPSHOT!
Implementation-Version=1.12.1-SNAPSHOT!
Built-Status=integration!
Built-By=jryan!
Build-Date=2014-06-10_13:30:44!
Gradle-Version=1.12-20140608201532+0000!
Module-Source=!
Module-Origin=git@github.com:nebula-plugins/my-plugin.git!
Change=976292c!
Build-Host=localhost!
Build-Job=LOCAL!
Build-Number=LOCAL!
Build-Id=LOCAL!
Created-By=1.7.0_45-b18 (Oracle Corporation)!
Build-Java-Version=1.7.0_45!
Module-Owner=justin@halfempty.org!
Module-Email=justin@halfempty.org!
X-Compile-Target-JDK=1.7!
X-Compile-Source-JDK=1.7
info.gradle output
gradle-contacts-plugin	
• Express people involved in the project
• Make people and roles available to other plugins
• contacts-manifest
• contacts-pom
apply plugin: 'contacts'!
contacts 'minnie@disney.com', ‘mickey@disney.com'!
!
contacts {!
'club@disney.com'!
'bobby@company.com' {!
roles 'notify', 'owner'!
}!
'billy@company.com' {!
role 'techwriter'!
}!
'downstream@netflix.com'!
role 'notify'!
}!
}!
contacts.gradle
gradle-scm-plugin	
• Attempt to provide SCM abstraction for other plugins
• E.g. gradle-dependency-lock-plugin and gradle-info-
plugin
gradle-dependency-lock-plugin
• Developer declare their
ideal situation
• Save resolved version
• If tests pass, commit to
SCM
{!
"com.github.townsfolk:gradle-release": { !
! ! "locked": "1.2", "requested": "1.2" },!
"com.jfrog.bintray.gradle:gradle-bintray-plugin": { !
! ! "locked": "0.3", "requested": "0.3" },!
"com.netflix.nebula:nebula-project-plugin": { !
! ! "locked": "1.12.0", "requested": "1.12.+" },!
"com.netflix.nebula:nebula-test": { !
! ! "locked": "1.12.0", "requested": "1.12.+" },!
"org.codehaus.groovy.modules.http-builder:http-builder": { !
! ! "locked": "0.7.1", "requested": “latest.release" },!
"org.jfrog.buildinfo:build-info-extractor-gradle": { !
! ! "locked": "2.2.4", "requested": "2.2.+" }!
}
apply plugin: ‘gradle-dependency-lock'!
lock.gradle
./gradlew generateLock
nebula-integtest-plugin	
• Sets up integTest source set
• Adds integTestCompile and integTestRuntime
configurations
• Creates integrationTest task
nebula-project-plugin	
• Pull together other
plugins
• Responsible projects
nebula-plugin-plugin	
• Used by plugins
• Strong opinions on
how to publish
• Force nebula-project-
plugin on projects
gradle-ospackage-plugin	
• Merging ubuntu-packager-plugin and gradle-rpm-
plugin
• Uses CopySpec definition
• Via just Java, generates RPMs and DEBs
ospackage {!
! os = LINUX!
! into '/opt/foo'!
! from ('dist') {!
! ! user 'builds'!
! ! exclude '**/*.md'!
! }!
! postInstall file('scripts/postInstall.sh')!
}!
!
buildRpm {!
! requires('bar', '2.2', GREATER | EQUAL)!
! from (‘build/metadata.properties’)!
! link(‘/etc/init.d/foo’, '/opt/foo/bin/foo.sysv',)!
}!
!
buildDeb {!
! link('/etc/init/foo', '/opt/foo/bin/foo.upstart')!
}
ospackage.gradle
gradle-override-plugin
• Take command line arguments
• Intelligently apply in afterEvaluate
• E.g. -Nfindbugs.enabled=false
Internal Plugins
• netflix-repos
• nebula-ospackage
• nebula-grails
• nebula-findbugs, etc
• ivyimport
• nebula-fixexcludes
• nebula-intellij
buildscript {!
! repositories { jcenter() }!
! dependencies { !
! ! classpath ‘com.netflix.nebula:nebula-plugin-plugin:1.12.+'!
! ! classpath ‘org.eclipse.jgit:org.eclipse.jgit:
3.2.0.201312181205-r'!
! }!
}!
!
description ‘Example Plugin'!
apply plugin: ‘nebula-plugin'!
!
contacts {!
‘jryan@netflix.com’ {!
moniker 'Justin Ryan'!
github 'quidryan'!
}!
}
plugin.gradle
curl -s get.gvmtool.net | bash!
gvm install lazybones!
cd ~/Projects/github/nebula-plugins!
lazybones create nebula-plugin <name-of-project>!
cd <name-of-project>!
git init!
git remote add origin git@github.com:nebula-plugins/<name-of-
project>.git!
./gradlew clean build!
git add -A!
git add -f gradle/wrapper/gradle-wrapper.jar!
git commit -m "Initial template”!
git push --set-upstream origin master
Making a plugin
https://github.com/nebula-plugins/nebula-
plugins.github.io/wiki/New-Plugins
Getting it out the door
• Let “ensure” run
• Run <name-of-project>-release
• Link package to jcenter
• Link package to gradle-plugins
Unopinionated Plugins
Opinionated Plugins
Gotchas
• NamedDomainObjectSet
• Debugging Tooling
• File as @Output
• afterEvaluate
Outstanding
• CloudBees permissions
• Bot to create repositories
Participating
• Use individual plugins
• Get on nebula-plugins
Google Group
• Move your plugin to
nebula-plugins
• Start a new plugin in
nebula-plugins
@quidryan@quidryan
http://www.slideshare.net/quidryan
We’re hiring
Justin Ryan <jryan@netflix.com>
HOUSE of GRADLE

More Related Content

What's hot

High Performance Microservices with Ratpack and Spring Boot
High Performance Microservices with Ratpack and Spring BootHigh Performance Microservices with Ratpack and Spring Boot
High Performance Microservices with Ratpack and Spring Boot
Daniel Woods
 
Hacking on WildFly 9
Hacking on WildFly 9Hacking on WildFly 9
Hacking on WildFly 9
Virtual JBoss User Group
 
Package Management on Windows with Chocolatey
Package Management on Windows with ChocolateyPackage Management on Windows with Chocolatey
Package Management on Windows with Chocolatey
Puppet
 
Improve your Java Environment with Docker
Improve your Java Environment with DockerImprove your Java Environment with Docker
Improve your Java Environment with Docker
HanoiJUG
 
Breaking bad habits with GitLab CI
Breaking bad habits with GitLab CIBreaking bad habits with GitLab CI
Breaking bad habits with GitLab CI
Ivan Nemytchenko
 
FOSDEM 2017: GitLab CI
FOSDEM 2017:  GitLab CIFOSDEM 2017:  GitLab CI
FOSDEM 2017: GitLab CI
OlinData
 
Vagrant - the essence of DevOps in a tool
Vagrant - the essence of DevOps in a toolVagrant - the essence of DevOps in a tool
Vagrant - the essence of DevOps in a tool
Paul Stack
 
Import golang; struct microservice - Codemotion Rome 2015
Import golang; struct microservice - Codemotion Rome 2015Import golang; struct microservice - Codemotion Rome 2015
Import golang; struct microservice - Codemotion Rome 2015
Giorgio Cefaro
 
Gr8conf - The Groovy Ecosystem Revisited
Gr8conf - The Groovy Ecosystem RevisitedGr8conf - The Groovy Ecosystem Revisited
Gr8conf - The Groovy Ecosystem RevisitedAndres Almiray
 
Introduction to GitHub Actions
Introduction to GitHub ActionsIntroduction to GitHub Actions
Introduction to GitHub Actions
Knoldus Inc.
 
Groovy in the Cloud
Groovy in the CloudGroovy in the Cloud
Groovy in the Cloud
Daniel Woods
 
Dockercon EU 2014
Dockercon EU 2014Dockercon EU 2014
Dockercon EU 2014
Rafe Colton
 
Raffaele Rialdi
Raffaele RialdiRaffaele Rialdi
Raffaele Rialdi
CodeFest
 
Володимир Дубенко "Node.js for desktop development (based on Electron library)"
Володимир Дубенко "Node.js for desktop development (based on Electron library)"Володимир Дубенко "Node.js for desktop development (based on Electron library)"
Володимир Дубенко "Node.js for desktop development (based on Electron library)"
Fwdays
 
Intro to Git for Drupal 7
Intro to Git for Drupal 7Intro to Git for Drupal 7
Intro to Git for Drupal 7
Chris Caple
 
Provisioning environments. A simplistic approach
Provisioning  environments. A simplistic approachProvisioning  environments. A simplistic approach
Provisioning environments. A simplistic approach
Eder Roger Souza
 
The story of language development
The story of language developmentThe story of language development
The story of language development
Hiroshi SHIBATA
 
Gradle
GradleGradle
Deploying Apps on OpenStack
Deploying Apps on OpenStackDeploying Apps on OpenStack
Deploying Apps on OpenStack
Anne Gentle
 
Automated Infrastructure and Application Management
Automated Infrastructure and Application ManagementAutomated Infrastructure and Application Management
Automated Infrastructure and Application Management
Clark Everetts
 

What's hot (20)

High Performance Microservices with Ratpack and Spring Boot
High Performance Microservices with Ratpack and Spring BootHigh Performance Microservices with Ratpack and Spring Boot
High Performance Microservices with Ratpack and Spring Boot
 
Hacking on WildFly 9
Hacking on WildFly 9Hacking on WildFly 9
Hacking on WildFly 9
 
Package Management on Windows with Chocolatey
Package Management on Windows with ChocolateyPackage Management on Windows with Chocolatey
Package Management on Windows with Chocolatey
 
Improve your Java Environment with Docker
Improve your Java Environment with DockerImprove your Java Environment with Docker
Improve your Java Environment with Docker
 
Breaking bad habits with GitLab CI
Breaking bad habits with GitLab CIBreaking bad habits with GitLab CI
Breaking bad habits with GitLab CI
 
FOSDEM 2017: GitLab CI
FOSDEM 2017:  GitLab CIFOSDEM 2017:  GitLab CI
FOSDEM 2017: GitLab CI
 
Vagrant - the essence of DevOps in a tool
Vagrant - the essence of DevOps in a toolVagrant - the essence of DevOps in a tool
Vagrant - the essence of DevOps in a tool
 
Import golang; struct microservice - Codemotion Rome 2015
Import golang; struct microservice - Codemotion Rome 2015Import golang; struct microservice - Codemotion Rome 2015
Import golang; struct microservice - Codemotion Rome 2015
 
Gr8conf - The Groovy Ecosystem Revisited
Gr8conf - The Groovy Ecosystem RevisitedGr8conf - The Groovy Ecosystem Revisited
Gr8conf - The Groovy Ecosystem Revisited
 
Introduction to GitHub Actions
Introduction to GitHub ActionsIntroduction to GitHub Actions
Introduction to GitHub Actions
 
Groovy in the Cloud
Groovy in the CloudGroovy in the Cloud
Groovy in the Cloud
 
Dockercon EU 2014
Dockercon EU 2014Dockercon EU 2014
Dockercon EU 2014
 
Raffaele Rialdi
Raffaele RialdiRaffaele Rialdi
Raffaele Rialdi
 
Володимир Дубенко "Node.js for desktop development (based on Electron library)"
Володимир Дубенко "Node.js for desktop development (based on Electron library)"Володимир Дубенко "Node.js for desktop development (based on Electron library)"
Володимир Дубенко "Node.js for desktop development (based on Electron library)"
 
Intro to Git for Drupal 7
Intro to Git for Drupal 7Intro to Git for Drupal 7
Intro to Git for Drupal 7
 
Provisioning environments. A simplistic approach
Provisioning  environments. A simplistic approachProvisioning  environments. A simplistic approach
Provisioning environments. A simplistic approach
 
The story of language development
The story of language developmentThe story of language development
The story of language development
 
Gradle
GradleGradle
Gradle
 
Deploying Apps on OpenStack
Deploying Apps on OpenStackDeploying Apps on OpenStack
Deploying Apps on OpenStack
 
Automated Infrastructure and Application Management
Automated Infrastructure and Application ManagementAutomated Infrastructure and Application Management
Automated Infrastructure and Application Management
 

Viewers also liked

Git,Travis,Gradle
Git,Travis,GradleGit,Travis,Gradle
Git,Travis,Gradle
Riccardo Rigon
 
Intro to CI/CD using Docker
Intro to CI/CD using DockerIntro to CI/CD using Docker
Intro to CI/CD using Docker
Michael Irwin
 
Pluggable Infrastructure with CI/CD and Docker
Pluggable Infrastructure with CI/CD and DockerPluggable Infrastructure with CI/CD and Docker
Pluggable Infrastructure with CI/CD and Docker
Bob Killen
 
Gradle - time for a new build
Gradle - time for a new buildGradle - time for a new build
Gradle - time for a new buildIgor Khotin
 
Gradle in 45min
Gradle in 45minGradle in 45min
Gradle in 45min
Schalk Cronjé
 
Gradle build tool that rocks with DSL JavaOne India 4th May 2012
Gradle build tool that rocks with DSL JavaOne India 4th May 2012Gradle build tool that rocks with DSL JavaOne India 4th May 2012
Gradle build tool that rocks with DSL JavaOne India 4th May 2012
Rajmahendra Hegde
 
Gradle - the Enterprise Automation Tool
Gradle  - the Enterprise Automation ToolGradle  - the Enterprise Automation Tool
Gradle - the Enterprise Automation Tool
Izzet Mustafaiev
 
Chela stress test
Chela stress testChela stress test
Chela stress test
superserch
 
May: If I Were 22
May: If I Were 22May: If I Were 22
May: If I Were 22
LinkedIn Editors' Picks
 
Adding Identity Management and Access Control to your Application
Adding Identity Management and Access Control to your ApplicationAdding Identity Management and Access Control to your Application
Adding Identity Management and Access Control to your Application
Fernando Lopez Aguilar
 
Cwin16 - Paris - ux design
Cwin16 - Paris - ux designCwin16 - Paris - ux design
Cwin16 - Paris - ux design
Capgemini
 
Ia32 Modo Protegido
Ia32 Modo ProtegidoIa32 Modo Protegido
Ia32 Modo Protegido
Erwin Meza
 
Marc Stickdorn & Jakob Schneider – Mobile ethnography and ExperienceFellow, a...
Marc Stickdorn & Jakob Schneider – Mobile ethnography and ExperienceFellow, a...Marc Stickdorn & Jakob Schneider – Mobile ethnography and ExperienceFellow, a...
Marc Stickdorn & Jakob Schneider – Mobile ethnography and ExperienceFellow, a...
Jakob Schneider
 
MMDS 2014 Talk - Distributing ML Algorithms: from GPUs to the Cloud
MMDS 2014 Talk - Distributing ML Algorithms: from GPUs to the CloudMMDS 2014 Talk - Distributing ML Algorithms: from GPUs to the Cloud
MMDS 2014 Talk - Distributing ML Algorithms: from GPUs to the CloudXavier Amatriain
 
Database Migrations with Gradle and Liquibase
Database Migrations with Gradle and LiquibaseDatabase Migrations with Gradle and Liquibase
Database Migrations with Gradle and Liquibase
Dan Stine
 
Cwin16 tls-partner-hpe-digital economy & Hybrid IT
Cwin16 tls-partner-hpe-digital economy & Hybrid ITCwin16 tls-partner-hpe-digital economy & Hybrid IT
Cwin16 tls-partner-hpe-digital economy & Hybrid IT
Capgemini
 
Disciplined agile business analysis
Disciplined agile business analysisDisciplined agile business analysis
Disciplined agile business analysis
Scott W. Ambler
 

Viewers also liked (17)

Git,Travis,Gradle
Git,Travis,GradleGit,Travis,Gradle
Git,Travis,Gradle
 
Intro to CI/CD using Docker
Intro to CI/CD using DockerIntro to CI/CD using Docker
Intro to CI/CD using Docker
 
Pluggable Infrastructure with CI/CD and Docker
Pluggable Infrastructure with CI/CD and DockerPluggable Infrastructure with CI/CD and Docker
Pluggable Infrastructure with CI/CD and Docker
 
Gradle - time for a new build
Gradle - time for a new buildGradle - time for a new build
Gradle - time for a new build
 
Gradle in 45min
Gradle in 45minGradle in 45min
Gradle in 45min
 
Gradle build tool that rocks with DSL JavaOne India 4th May 2012
Gradle build tool that rocks with DSL JavaOne India 4th May 2012Gradle build tool that rocks with DSL JavaOne India 4th May 2012
Gradle build tool that rocks with DSL JavaOne India 4th May 2012
 
Gradle - the Enterprise Automation Tool
Gradle  - the Enterprise Automation ToolGradle  - the Enterprise Automation Tool
Gradle - the Enterprise Automation Tool
 
Chela stress test
Chela stress testChela stress test
Chela stress test
 
May: If I Were 22
May: If I Were 22May: If I Were 22
May: If I Were 22
 
Adding Identity Management and Access Control to your Application
Adding Identity Management and Access Control to your ApplicationAdding Identity Management and Access Control to your Application
Adding Identity Management and Access Control to your Application
 
Cwin16 - Paris - ux design
Cwin16 - Paris - ux designCwin16 - Paris - ux design
Cwin16 - Paris - ux design
 
Ia32 Modo Protegido
Ia32 Modo ProtegidoIa32 Modo Protegido
Ia32 Modo Protegido
 
Marc Stickdorn & Jakob Schneider – Mobile ethnography and ExperienceFellow, a...
Marc Stickdorn & Jakob Schneider – Mobile ethnography and ExperienceFellow, a...Marc Stickdorn & Jakob Schneider – Mobile ethnography and ExperienceFellow, a...
Marc Stickdorn & Jakob Schneider – Mobile ethnography and ExperienceFellow, a...
 
MMDS 2014 Talk - Distributing ML Algorithms: from GPUs to the Cloud
MMDS 2014 Talk - Distributing ML Algorithms: from GPUs to the CloudMMDS 2014 Talk - Distributing ML Algorithms: from GPUs to the Cloud
MMDS 2014 Talk - Distributing ML Algorithms: from GPUs to the Cloud
 
Database Migrations with Gradle and Liquibase
Database Migrations with Gradle and LiquibaseDatabase Migrations with Gradle and Liquibase
Database Migrations with Gradle and Liquibase
 
Cwin16 tls-partner-hpe-digital economy & Hybrid IT
Cwin16 tls-partner-hpe-digital economy & Hybrid ITCwin16 tls-partner-hpe-digital economy & Hybrid IT
Cwin16 tls-partner-hpe-digital economy & Hybrid IT
 
Disciplined agile business analysis
Disciplined agile business analysisDisciplined agile business analysis
Disciplined agile business analysis
 

Similar to Netflix Nebula - Gradle Summit 2014

Automate your Development Environment with Vagrant & Chef
Automate your Development Environment with Vagrant & ChefAutomate your Development Environment with Vagrant & Chef
Automate your Development Environment with Vagrant & Chef Michael Lihs
 
Gradle
GradleGradle
Everything-as-code. A polyglot adventure. #DevoxxPL
Everything-as-code. A polyglot adventure. #DevoxxPLEverything-as-code. A polyglot adventure. #DevoxxPL
Everything-as-code. A polyglot adventure. #DevoxxPL
Mario-Leander Reimer
 
Everything-as-code - A polyglot adventure
Everything-as-code - A polyglot adventureEverything-as-code - A polyglot adventure
Everything-as-code - A polyglot adventure
QAware GmbH
 
Forget Grunt and Gulp! Webpack and NPM rule them all!
Forget Grunt and Gulp! Webpack and NPM rule them all!Forget Grunt and Gulp! Webpack and NPM rule them all!
Forget Grunt and Gulp! Webpack and NPM rule them all!
Derek Willian Stavis
 
modern module development - Ken Barber 2012 Edinburgh Puppet Camp
modern module development - Ken Barber 2012 Edinburgh Puppet Campmodern module development - Ken Barber 2012 Edinburgh Puppet Camp
modern module development - Ken Barber 2012 Edinburgh Puppet CampPuppet
 
Gradle - Build system evolved
Gradle - Build system evolvedGradle - Build system evolved
Gradle - Build system evolved
Bhagwat Kumar
 
The Tale of a Docker-based Continuous Delivery Pipeline by Rafe Colton (ModCl...
The Tale of a Docker-based Continuous Delivery Pipeline by Rafe Colton (ModCl...The Tale of a Docker-based Continuous Delivery Pipeline by Rafe Colton (ModCl...
The Tale of a Docker-based Continuous Delivery Pipeline by Rafe Colton (ModCl...
Docker, Inc.
 
Rapid Development With Docker Compose
Rapid Development With Docker ComposeRapid Development With Docker Compose
Rapid Development With Docker Compose
Justin Crown
 
Practical introduction to dev ops with chef
Practical introduction to dev ops with chefPractical introduction to dev ops with chef
Practical introduction to dev ops with chefLeanDog
 
Vagrant crash course
Vagrant crash courseVagrant crash course
Vagrant crash course
Marcus Deglos
 
DevOps Odessa #TechTalks 21.01.2020
DevOps Odessa #TechTalks 21.01.2020DevOps Odessa #TechTalks 21.01.2020
DevOps Odessa #TechTalks 21.01.2020
Lohika_Odessa_TechTalks
 
An introduction to maven gradle and sbt
An introduction to maven gradle and sbtAn introduction to maven gradle and sbt
An introduction to maven gradle and sbt
Fabio Fumarola
 
Faster java ee builds with gradle [con4921]
Faster java ee builds with gradle [con4921]Faster java ee builds with gradle [con4921]
Faster java ee builds with gradle [con4921]
Ryan Cuprak
 
SymfonyCon Madrid 2014 - Rock Solid Deployment of Symfony Apps
SymfonyCon Madrid 2014 - Rock Solid Deployment of Symfony AppsSymfonyCon Madrid 2014 - Rock Solid Deployment of Symfony Apps
SymfonyCon Madrid 2014 - Rock Solid Deployment of Symfony Apps
Pablo Godel
 
Polyglot Grails
Polyglot GrailsPolyglot Grails
Polyglot Grails
Marcin Gryszko
 
Using React with Grails 3
Using React with Grails 3Using React with Grails 3
Using React with Grails 3Zachary Klein
 
Gradle.Enemy at the gates
Gradle.Enemy at the gatesGradle.Enemy at the gates
Gradle.Enemy at the gates
Strannik_2013
 
Nagios Conference 2014 - Mike Merideth - The Art and Zen of Managing Nagios w...
Nagios Conference 2014 - Mike Merideth - The Art and Zen of Managing Nagios w...Nagios Conference 2014 - Mike Merideth - The Art and Zen of Managing Nagios w...
Nagios Conference 2014 - Mike Merideth - The Art and Zen of Managing Nagios w...
Nagios
 
Dcjq node.js presentation
Dcjq node.js presentationDcjq node.js presentation
Dcjq node.js presentation
async_io
 

Similar to Netflix Nebula - Gradle Summit 2014 (20)

Automate your Development Environment with Vagrant & Chef
Automate your Development Environment with Vagrant & ChefAutomate your Development Environment with Vagrant & Chef
Automate your Development Environment with Vagrant & Chef
 
Gradle
GradleGradle
Gradle
 
Everything-as-code. A polyglot adventure. #DevoxxPL
Everything-as-code. A polyglot adventure. #DevoxxPLEverything-as-code. A polyglot adventure. #DevoxxPL
Everything-as-code. A polyglot adventure. #DevoxxPL
 
Everything-as-code - A polyglot adventure
Everything-as-code - A polyglot adventureEverything-as-code - A polyglot adventure
Everything-as-code - A polyglot adventure
 
Forget Grunt and Gulp! Webpack and NPM rule them all!
Forget Grunt and Gulp! Webpack and NPM rule them all!Forget Grunt and Gulp! Webpack and NPM rule them all!
Forget Grunt and Gulp! Webpack and NPM rule them all!
 
modern module development - Ken Barber 2012 Edinburgh Puppet Camp
modern module development - Ken Barber 2012 Edinburgh Puppet Campmodern module development - Ken Barber 2012 Edinburgh Puppet Camp
modern module development - Ken Barber 2012 Edinburgh Puppet Camp
 
Gradle - Build system evolved
Gradle - Build system evolvedGradle - Build system evolved
Gradle - Build system evolved
 
The Tale of a Docker-based Continuous Delivery Pipeline by Rafe Colton (ModCl...
The Tale of a Docker-based Continuous Delivery Pipeline by Rafe Colton (ModCl...The Tale of a Docker-based Continuous Delivery Pipeline by Rafe Colton (ModCl...
The Tale of a Docker-based Continuous Delivery Pipeline by Rafe Colton (ModCl...
 
Rapid Development With Docker Compose
Rapid Development With Docker ComposeRapid Development With Docker Compose
Rapid Development With Docker Compose
 
Practical introduction to dev ops with chef
Practical introduction to dev ops with chefPractical introduction to dev ops with chef
Practical introduction to dev ops with chef
 
Vagrant crash course
Vagrant crash courseVagrant crash course
Vagrant crash course
 
DevOps Odessa #TechTalks 21.01.2020
DevOps Odessa #TechTalks 21.01.2020DevOps Odessa #TechTalks 21.01.2020
DevOps Odessa #TechTalks 21.01.2020
 
An introduction to maven gradle and sbt
An introduction to maven gradle and sbtAn introduction to maven gradle and sbt
An introduction to maven gradle and sbt
 
Faster java ee builds with gradle [con4921]
Faster java ee builds with gradle [con4921]Faster java ee builds with gradle [con4921]
Faster java ee builds with gradle [con4921]
 
SymfonyCon Madrid 2014 - Rock Solid Deployment of Symfony Apps
SymfonyCon Madrid 2014 - Rock Solid Deployment of Symfony AppsSymfonyCon Madrid 2014 - Rock Solid Deployment of Symfony Apps
SymfonyCon Madrid 2014 - Rock Solid Deployment of Symfony Apps
 
Polyglot Grails
Polyglot GrailsPolyglot Grails
Polyglot Grails
 
Using React with Grails 3
Using React with Grails 3Using React with Grails 3
Using React with Grails 3
 
Gradle.Enemy at the gates
Gradle.Enemy at the gatesGradle.Enemy at the gates
Gradle.Enemy at the gates
 
Nagios Conference 2014 - Mike Merideth - The Art and Zen of Managing Nagios w...
Nagios Conference 2014 - Mike Merideth - The Art and Zen of Managing Nagios w...Nagios Conference 2014 - Mike Merideth - The Art and Zen of Managing Nagios w...
Nagios Conference 2014 - Mike Merideth - The Art and Zen of Managing Nagios w...
 
Dcjq node.js presentation
Dcjq node.js presentationDcjq node.js presentation
Dcjq node.js presentation
 

Recently uploaded

Hierarchical Digital Twin of a Naval Power System
Hierarchical Digital Twin of a Naval Power SystemHierarchical Digital Twin of a Naval Power System
Hierarchical Digital Twin of a Naval Power System
Kerry Sado
 
ML for identifying fraud using open blockchain data.pptx
ML for identifying fraud using open blockchain data.pptxML for identifying fraud using open blockchain data.pptx
ML for identifying fraud using open blockchain data.pptx
Vijay Dialani, PhD
 
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
obonagu
 
road safety engineering r s e unit 3.pdf
road safety engineering  r s e unit 3.pdfroad safety engineering  r s e unit 3.pdf
road safety engineering r s e unit 3.pdf
VENKATESHvenky89705
 
The role of big data in decision making.
The role of big data in decision making.The role of big data in decision making.
The role of big data in decision making.
ankuprajapati0525
 
MCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdfMCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdf
Osamah Alsalih
 
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdfHybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
fxintegritypublishin
 
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptxCFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
R&R Consult
 
AP LAB PPT.pdf ap lab ppt no title specific
AP LAB PPT.pdf ap lab ppt no title specificAP LAB PPT.pdf ap lab ppt no title specific
AP LAB PPT.pdf ap lab ppt no title specific
BrazilAccount1
 
Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024
Massimo Talia
 
space technology lecture notes on satellite
space technology lecture notes on satellitespace technology lecture notes on satellite
space technology lecture notes on satellite
ongomchris
 
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
bakpo1
 
Investor-Presentation-Q1FY2024 investor presentation document.pptx
Investor-Presentation-Q1FY2024 investor presentation document.pptxInvestor-Presentation-Q1FY2024 investor presentation document.pptx
Investor-Presentation-Q1FY2024 investor presentation document.pptx
AmarGB2
 
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
ydteq
 
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
zwunae
 
power quality voltage fluctuation UNIT - I.pptx
power quality voltage fluctuation UNIT - I.pptxpower quality voltage fluctuation UNIT - I.pptx
power quality voltage fluctuation UNIT - I.pptx
ViniHema
 
Planning Of Procurement o different goods and services
Planning Of Procurement o different goods and servicesPlanning Of Procurement o different goods and services
Planning Of Procurement o different goods and services
JoytuBarua2
 
weather web application report.pdf
weather web application report.pdfweather web application report.pdf
weather web application report.pdf
Pratik Pawar
 
English lab ppt no titlespecENG PPTt.pdf
English lab ppt no titlespecENG PPTt.pdfEnglish lab ppt no titlespecENG PPTt.pdf
English lab ppt no titlespecENG PPTt.pdf
BrazilAccount1
 
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdfAKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
SamSarthak3
 

Recently uploaded (20)

Hierarchical Digital Twin of a Naval Power System
Hierarchical Digital Twin of a Naval Power SystemHierarchical Digital Twin of a Naval Power System
Hierarchical Digital Twin of a Naval Power System
 
ML for identifying fraud using open blockchain data.pptx
ML for identifying fraud using open blockchain data.pptxML for identifying fraud using open blockchain data.pptx
ML for identifying fraud using open blockchain data.pptx
 
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
 
road safety engineering r s e unit 3.pdf
road safety engineering  r s e unit 3.pdfroad safety engineering  r s e unit 3.pdf
road safety engineering r s e unit 3.pdf
 
The role of big data in decision making.
The role of big data in decision making.The role of big data in decision making.
The role of big data in decision making.
 
MCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdfMCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdf
 
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdfHybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
 
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptxCFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
 
AP LAB PPT.pdf ap lab ppt no title specific
AP LAB PPT.pdf ap lab ppt no title specificAP LAB PPT.pdf ap lab ppt no title specific
AP LAB PPT.pdf ap lab ppt no title specific
 
Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024
 
space technology lecture notes on satellite
space technology lecture notes on satellitespace technology lecture notes on satellite
space technology lecture notes on satellite
 
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
 
Investor-Presentation-Q1FY2024 investor presentation document.pptx
Investor-Presentation-Q1FY2024 investor presentation document.pptxInvestor-Presentation-Q1FY2024 investor presentation document.pptx
Investor-Presentation-Q1FY2024 investor presentation document.pptx
 
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
 
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
 
power quality voltage fluctuation UNIT - I.pptx
power quality voltage fluctuation UNIT - I.pptxpower quality voltage fluctuation UNIT - I.pptx
power quality voltage fluctuation UNIT - I.pptx
 
Planning Of Procurement o different goods and services
Planning Of Procurement o different goods and servicesPlanning Of Procurement o different goods and services
Planning Of Procurement o different goods and services
 
weather web application report.pdf
weather web application report.pdfweather web application report.pdf
weather web application report.pdf
 
English lab ppt no titlespecENG PPTt.pdf
English lab ppt no titlespecENG PPTt.pdfEnglish lab ppt no titlespecENG PPTt.pdf
English lab ppt no titlespecENG PPTt.pdf
 
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdfAKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
 

Netflix Nebula - Gradle Summit 2014

Editor's Notes

  1. I work on the Engineering Tools team at Netflix, where we build tools to support the developers. Today I’m here to talk about Netflix Build Language, or as we like to call it, nebula.
  2. And I’m here to talk about how we try to exist in the open source space with plugins.
  3. We had to transition out of a Ant/Ivy. Primarily a JVM shop, there are a few players in this space for build. A lot of conventions were in place and changing them to fit Maven’s model wasn’t an option.
  4. Look after the users, and where we can add value.
  5. Just couldn’t get the experience as smooth as we wanted it in our enterprise environment. Still haven’t. Patched Version of Gradle - Patch to cover a bug in Ivy. Patch to expose status/statusScheme. Custom Distribution - So we can embed some init.d scripts, e.g. add our repository servers and add our plugin’s jar. Custom Wrapper - To force some variables getting set, like memory defaults or GRADLE_USER_HOME. Plans on customizing to support for re-downloading of static URL
  6. End user sees apply plugin nebula. Nebula extension block to hold other extensions via @Delegate annotation.
  7. NetflixOSS pre-dated our internal work, but it was going down the Maven route. And we had a goal that we wanted to move to Gradle. We also had concerns about how to integration POMs and our internal Ivy files. That was done in a way to make the Gradle work really obvious, i.e. minimal work hidden in plugins, no custom DSL. It’s hideous at this point and based on Gradle 1.6. We had to rush it, to pre-empt projects going out with Maven. github/cloudbees/bintray project plugin forthcoming.
  8. NetflixOSS fell way behind our internal development. Majority of our work was not Netflix specific, but turned out to just be what a responsible project needs. Also had growing pains with our plugin, so we wanted to decouple them. Wanted to make new plugins easy, with CI and SCM. We’re build people, right?
  9. Found that many plugins we wanted to use also suffered from basic release engineering practices, which is clearly ironic given the space we’re in. Group plugin with SCM, CI and Deployment. Chosen of familiarity, I wish I had looked at more options. Common patterns to give the apply plugin nebula like experience, enabled via nebula-plugin-plugin. Lot of hard coding.
  10. Exists as a dedicated Organization, with project names following a pattern.
  11. We learned from the @NetflixOSS work that GitHub doesn’t maintain itself.
  12. We have to eliminate the manual work. And Jenkins is a great place to do that, except that setting up Jenkins is manual work. I don’t want to fight Jenkins, so we have a script to manage this.
  13. The nebula prefix for highly opinionated plugins. While the gradle prefix is for plugins that have general applicability. Many of them are used in the plugin-plugin since they’re so helpful.
  14. Not really a plugin, but integrated into the Gradle ecosystem. Meant to be used in tests. * ProjectSpec has its limitation, since you can only really apply plugins. Though you can run a hidden evaluate(). Really fast and recommended when ever possible PluginProjectSpec is a small addition that just applies your plugin by name, tries it twice and tries it in multi-module project. IntegrationSpec run a real Gradle build.
  15. All the nebula-plugins use these Test classes, so there’s plenty of examples.
  16. Helper methods to create a project, to run a project, and to evaluate the effects of a execution. Will get it’s own directory to run in. GradleLauncher is necessary for some in-memory checks or debugging.
  17. Not really a plugin, has tasks and Helper method. Meant for runtime. AlternativeArchiveTask is to provide an implementation of AbstractArchiveTask, which is not also a CopyTask, since those are greaten special.
  18. beforeEvaluate is actually before after evaluates getTempDir gives a build directory for a task addDefaultGroup lets you set a group, optionally. Hard otherwise because project.getGroup() will provide the parent project’s name as the group.
  19. Finally a real plugin. Though docs are the worst of the bunch, this is the most important. Actually a bunch of plugins. All meant to get a publication looking just right, down to the signing. Artifact plugins attempt to make the jars (which we’d all expect). Publishing plugins attempt to make resulting Ivy/POM file cleaner, primarily by using resolved variables and including excludes. nebula-sign looks for magical properties and conditionally signs, unlike other approached. To support these, we needed to use Publish 2.0, which isn’t fully baked. We were unable to use as is, so we made our CustomComponent. Allows any plugins to contribute artifacts, with more control of the resulting dependencies and confs (more important in Ivy).
  20. Two plugins are available for ivy vs maven, nebula-ivy-publishing and nebula-maven-publishing.
  21. ‘info-java&amp;apos; version of java being used ‘info-ci&amp;apos; tells about CI system and current build ‘info-scm&amp;apos; derives info about current SCM ‘info-jar&amp;apos; injects into the Jar’s MANIFEST.MF ‘info-props&amp;apos; creates file with values ‘info-jar-props&amp;apos; puts property file in jar for later retrieval All go through a broker that you can listen to.
  22. contacts-manifest puts people into the JAR manifest contacts-pom puts people into developers section of POM Example of how we believe some plugins can talk to each other without a DSL in the way.
  23. Then we can send emails on release by the notify role.
  24. We believe in a reproducible build for every developer all the time. Dynamic versions make that hard. We can’t imagine manually editing versions. We’ve all had the experience of a new dependency get published and everyone is broken. We also have cases where we want to tweak a specific module, for a patch, which can be done via the command line. Inspired by systems like Bundler.io. Let some automated job update your dependencies when they’ve proven valid.
  25. Properly sets up classpath.
  26. Does the things we’d expect in a responsible project. Even if they don’t like it. E.g. doesn’t fail on Javadoc error, maintains status even though the java plugin wants to walk all over it.
  27. Adds OJO and Bintray, with publishing. Plugin Portal additions. Needs to be extracted out for different orgs, different package names. Very meta, since it applies itself.
  28. Most popular plugin, even though we haven’t advertised them at all. Takes the CopySpec idea and applies it to redline and jdeb.
  29. buildRpm and buildDeb are implicitly created, but can still be configured if needed.
  30. Proposed.
  31. Anytime we find a problem internally, we make a plugin to test the problem and fix it. Roll it out and get happy users. Many times, we’re wrapping another plugin and configuring them with our defaults.
  32. https://github.com/nebula-plugins/lazybones-nebula-plugin-template
  33. A few manual steps to finalize release.
  34. Lots of withType or .all {} calls Ability to create tasks in reaction Also try to abstract out logic out of Task, so that it can be called sequentially.
  35. Sometimes we even got a third level Configure tasks
  36. Reacting to the user before the task graph, forces afterEvaluate’s NamedDomainObjectSet configuration comes after events, so no ability to re-act, except by name @Outputs have to be Files, not in-memory String. Evaluation of File names for outputs can be tricky. Can’t debug tests through Tooling API