SlideShare una empresa de Scribd logo
1 de 48
Descargar para leer sin conexión
@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

Más contenido relacionado

La actualidad más candente

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 BootDaniel Woods
 
Package Management on Windows with Chocolatey
Package Management on Windows with ChocolateyPackage Management on Windows with Chocolatey
Package Management on Windows with ChocolateyPuppet
 
Improve your Java Environment with Docker
Improve your Java Environment with DockerImprove your Java Environment with Docker
Improve your Java Environment with DockerHanoiJUG
 
Breaking bad habits with GitLab CI
Breaking bad habits with GitLab CIBreaking bad habits with GitLab CI
Breaking bad habits with GitLab CIIvan Nemytchenko
 
FOSDEM 2017: GitLab CI
FOSDEM 2017:  GitLab CIFOSDEM 2017:  GitLab CI
FOSDEM 2017: GitLab CIOlinData
 
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 toolPaul 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 2015Giorgio 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 ActionsKnoldus Inc.
 
Groovy in the Cloud
Groovy in the CloudGroovy in the Cloud
Groovy in the CloudDaniel Woods
 
Dockercon EU 2014
Dockercon EU 2014Dockercon EU 2014
Dockercon EU 2014Rafe Colton
 
Raffaele Rialdi
Raffaele RialdiRaffaele Rialdi
Raffaele RialdiCodeFest
 
Володимир Дубенко "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 7Chris Caple
 
Provisioning environments. A simplistic approach
Provisioning  environments. A simplistic approachProvisioning  environments. A simplistic approach
Provisioning environments. A simplistic approachEder Roger Souza
 
The story of language development
The story of language developmentThe story of language development
The story of language developmentHiroshi SHIBATA
 
Deploying Apps on OpenStack
Deploying Apps on OpenStackDeploying Apps on OpenStack
Deploying Apps on OpenStackAnne Gentle
 
Automated Infrastructure and Application Management
Automated Infrastructure and Application ManagementAutomated Infrastructure and Application Management
Automated Infrastructure and Application ManagementClark Everetts
 

La actualidad más candente (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
 

Destacado

Intro to CI/CD using Docker
Intro to CI/CD using DockerIntro to CI/CD using Docker
Intro to CI/CD using DockerMichael 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 DockerBob 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 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 2012Rajmahendra Hegde
 
Gradle - the Enterprise Automation Tool
Gradle  - the Enterprise Automation ToolGradle  - the Enterprise Automation Tool
Gradle - the Enterprise Automation ToolIzzet Mustafaiev
 
Chela stress test
Chela stress testChela stress test
Chela stress testsuperserch
 
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 ApplicationFernando Lopez Aguilar
 
Cwin16 - Paris - ux design
Cwin16 - Paris - ux designCwin16 - Paris - ux design
Cwin16 - Paris - ux designCapgemini
 
Ia32 Modo Protegido
Ia32 Modo ProtegidoIa32 Modo Protegido
Ia32 Modo ProtegidoErwin 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 LiquibaseDan 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 ITCapgemini
 
Disciplined agile business analysis
Disciplined agile business analysisDisciplined agile business analysis
Disciplined agile business analysisScott W. Ambler
 

Destacado (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 a 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
 
Everything-as-code - A polyglot adventure
Everything-as-code - A polyglot adventureEverything-as-code - A polyglot adventure
Everything-as-code - A polyglot adventureQAware GmbH
 
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. #DevoxxPLMario-Leander Reimer
 
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 evolvedBhagwat 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 ComposeJustin 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 courseMarcus Deglos
 
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 sbtFabio 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 AppsPablo Godel
 
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 gatesStrannik_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 presentationasync_io
 

Similar a 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
Everything-as-code - A polyglot adventureEverything-as-code - A polyglot adventure
Everything-as-code - A polyglot adventure
 
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
 
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
 

Último

Internet of things -Arshdeep Bahga .pptx
Internet of things -Arshdeep Bahga .pptxInternet of things -Arshdeep Bahga .pptx
Internet of things -Arshdeep Bahga .pptxVelmuruganTECE
 
Katarzyna Lipka-Sidor - BIM School Course
Katarzyna Lipka-Sidor - BIM School CourseKatarzyna Lipka-Sidor - BIM School Course
Katarzyna Lipka-Sidor - BIM School Coursebim.edu.pl
 
DM Pillar Training Manual.ppt will be useful in deploying TPM in project
DM Pillar Training Manual.ppt will be useful in deploying TPM in projectDM Pillar Training Manual.ppt will be useful in deploying TPM in project
DM Pillar Training Manual.ppt will be useful in deploying TPM in projectssuserb6619e
 
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionSachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionDr.Costas Sachpazis
 
"Exploring the Essential Functions and Design Considerations of Spillways in ...
"Exploring the Essential Functions and Design Considerations of Spillways in ..."Exploring the Essential Functions and Design Considerations of Spillways in ...
"Exploring the Essential Functions and Design Considerations of Spillways in ...Erbil Polytechnic University
 
THE SENDAI FRAMEWORK FOR DISASTER RISK REDUCTION
THE SENDAI FRAMEWORK FOR DISASTER RISK REDUCTIONTHE SENDAI FRAMEWORK FOR DISASTER RISK REDUCTION
THE SENDAI FRAMEWORK FOR DISASTER RISK REDUCTIONjhunlian
 
Main Memory Management in Operating System
Main Memory Management in Operating SystemMain Memory Management in Operating System
Main Memory Management in Operating SystemRashmi Bhat
 
Comparative study of High-rise Building Using ETABS,SAP200 and SAFE., SAFE an...
Comparative study of High-rise Building Using ETABS,SAP200 and SAFE., SAFE an...Comparative study of High-rise Building Using ETABS,SAP200 and SAFE., SAFE an...
Comparative study of High-rise Building Using ETABS,SAP200 and SAFE., SAFE an...Erbil Polytechnic University
 
11. Properties of Liquid Fuels in Energy Engineering.pdf
11. Properties of Liquid Fuels in Energy Engineering.pdf11. Properties of Liquid Fuels in Energy Engineering.pdf
11. Properties of Liquid Fuels in Energy Engineering.pdfHafizMudaserAhmad
 
multiple access in wireless communication
multiple access in wireless communicationmultiple access in wireless communication
multiple access in wireless communicationpanditadesh123
 
Past, Present and Future of Generative AI
Past, Present and Future of Generative AIPast, Present and Future of Generative AI
Past, Present and Future of Generative AIabhishek36461
 
Class 1 | NFPA 72 | Overview Fire Alarm System
Class 1 | NFPA 72 | Overview Fire Alarm SystemClass 1 | NFPA 72 | Overview Fire Alarm System
Class 1 | NFPA 72 | Overview Fire Alarm Systemirfanmechengr
 
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catchers
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor CatchersTechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catchers
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catcherssdickerson1
 
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdfCCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdfAsst.prof M.Gokilavani
 
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort serviceGurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort servicejennyeacort
 
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)Dr SOUNDIRARAJ N
 
Indian Dairy Industry Present Status and.ppt
Indian Dairy Industry Present Status and.pptIndian Dairy Industry Present Status and.ppt
Indian Dairy Industry Present Status and.pptMadan Karki
 
Risk Management in Engineering Construction Project
Risk Management in Engineering Construction ProjectRisk Management in Engineering Construction Project
Risk Management in Engineering Construction ProjectErbil Polytechnic University
 
US Department of Education FAFSA Week of Action
US Department of Education FAFSA Week of ActionUS Department of Education FAFSA Week of Action
US Department of Education FAFSA Week of ActionMebane Rash
 

Último (20)

Internet of things -Arshdeep Bahga .pptx
Internet of things -Arshdeep Bahga .pptxInternet of things -Arshdeep Bahga .pptx
Internet of things -Arshdeep Bahga .pptx
 
Katarzyna Lipka-Sidor - BIM School Course
Katarzyna Lipka-Sidor - BIM School CourseKatarzyna Lipka-Sidor - BIM School Course
Katarzyna Lipka-Sidor - BIM School Course
 
DM Pillar Training Manual.ppt will be useful in deploying TPM in project
DM Pillar Training Manual.ppt will be useful in deploying TPM in projectDM Pillar Training Manual.ppt will be useful in deploying TPM in project
DM Pillar Training Manual.ppt will be useful in deploying TPM in project
 
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionSachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
 
"Exploring the Essential Functions and Design Considerations of Spillways in ...
"Exploring the Essential Functions and Design Considerations of Spillways in ..."Exploring the Essential Functions and Design Considerations of Spillways in ...
"Exploring the Essential Functions and Design Considerations of Spillways in ...
 
THE SENDAI FRAMEWORK FOR DISASTER RISK REDUCTION
THE SENDAI FRAMEWORK FOR DISASTER RISK REDUCTIONTHE SENDAI FRAMEWORK FOR DISASTER RISK REDUCTION
THE SENDAI FRAMEWORK FOR DISASTER RISK REDUCTION
 
Main Memory Management in Operating System
Main Memory Management in Operating SystemMain Memory Management in Operating System
Main Memory Management in Operating System
 
Comparative study of High-rise Building Using ETABS,SAP200 and SAFE., SAFE an...
Comparative study of High-rise Building Using ETABS,SAP200 and SAFE., SAFE an...Comparative study of High-rise Building Using ETABS,SAP200 and SAFE., SAFE an...
Comparative study of High-rise Building Using ETABS,SAP200 and SAFE., SAFE an...
 
Design and analysis of solar grass cutter.pdf
Design and analysis of solar grass cutter.pdfDesign and analysis of solar grass cutter.pdf
Design and analysis of solar grass cutter.pdf
 
11. Properties of Liquid Fuels in Energy Engineering.pdf
11. Properties of Liquid Fuels in Energy Engineering.pdf11. Properties of Liquid Fuels in Energy Engineering.pdf
11. Properties of Liquid Fuels in Energy Engineering.pdf
 
multiple access in wireless communication
multiple access in wireless communicationmultiple access in wireless communication
multiple access in wireless communication
 
Past, Present and Future of Generative AI
Past, Present and Future of Generative AIPast, Present and Future of Generative AI
Past, Present and Future of Generative AI
 
Class 1 | NFPA 72 | Overview Fire Alarm System
Class 1 | NFPA 72 | Overview Fire Alarm SystemClass 1 | NFPA 72 | Overview Fire Alarm System
Class 1 | NFPA 72 | Overview Fire Alarm System
 
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catchers
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor CatchersTechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catchers
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catchers
 
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdfCCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
 
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort serviceGurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
 
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
 
Indian Dairy Industry Present Status and.ppt
Indian Dairy Industry Present Status and.pptIndian Dairy Industry Present Status and.ppt
Indian Dairy Industry Present Status and.ppt
 
Risk Management in Engineering Construction Project
Risk Management in Engineering Construction ProjectRisk Management in Engineering Construction Project
Risk Management in Engineering Construction Project
 
US Department of Education FAFSA Week of Action
US Department of Education FAFSA Week of ActionUS Department of Education FAFSA Week of Action
US Department of Education FAFSA Week of Action
 

Netflix Nebula - Gradle Summit 2014

Notas del editor

  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