Your SlideShare is downloading. ×
  • Like
SF Gradle Meetup - Netflix OSS
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×

Now you can save presentations on your phone or tablet

Available for both IPhone and Android

Text the download link to your phone

Standard text messaging rates apply

SF Gradle Meetup - Netflix OSS

  • 975 views
Published

 

Published in Technology
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
No Downloads

Views

Total Views
975
On SlideShare
0
From Embeds
0
Number of Embeds
1

Actions

Shares
Downloads
11
Comments
0
Likes
4

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide
  • Where it all beganLegal does horribly code reviews Freedom & Responsibility to release it
  • We knew they’d be grow, though we never thought it’d be like this. Currently 26 Projects, all used internally in production: http://netflix.github.io/#repo
  • Goals Establish our solutions as Best Practices/Standards Build up Netflix Technology Branch Retain and Engage Top Engineers Benefit from a shared ecosystemWhat Cloud Platform Undifferentiated Heavy Lifting
  • With that in mind, we don’t have to make an open source build. But we should, since we’re the best placed to do it.
  • Planned on using internally. Apply plugin: ‘java’
  • Cobbled together from blog posts Users had to set version
  • Attempting to mimic the internal build, where the minimum is specified.
  • gradle-release version Tag in SCM Ensure builds against internal and external

Transcript

  • 1. Netflix OSS With Gradle@netflixoss
  • 2. @NetflixOSS ProgressionCuratorAutoScalingAstyanaxServoPriamJmeterforC*ExhibitorArchaiusAsgardChaosMonkeyEurekaGovernatorBlitz4JHystrixTurbineJanitorMonkeyRibbonRxJavaEVCacheDenominatorKaryonNeJlixGraphRecipeAppCI/CloudbeesAminator2012 2013
  • 3. http://netflix.github.io/
  • 4. My Role• Engineering Tools• We help, when and where we can• Build, Bake, Deploy, Monkey• Lead on internal Gradle and Ant builds
  • 5. EnvironmentsAll of Maven CentralPublish to SonatypeMaven On The OutsideDone in the publicSetup everythingNo Maven CentralPublish to ArtifactoryIvy On The InsideLegacy ConventionsMinimal Setup
  • 6. Phase 0: Use Gradle
  • 7. Phase 1: Naive Approach• Copyable build• build.gradle• gradle/conventions.gradle• gradle/maven.gradle• gradle/netflix-oss.gradle• Decent examples onlinehttp://jedicoder.blogspot.com/2011/11/automated-gradle-project-deployment-to.html
  • 8. ext.releaseVersion = 1.1.3 // TEMPLATEext.githubName = project.name // TEMPLATEapply from: file(gradle/convention.gradle)apply from: file(gradle/maven.gradle)apply from: file(gradle/check.gradle)group = com.netflixrepositories {mavenCentral()}dependencies { // TEMPLATEcompile javax.ws.rs:jsr311-api:1.1.1compile com.sun.jersey:jersey-core:1.11testCompile org.testng:testng:6.1.1testCompile org.mockito:mockito-core:1.8.5}build.gradle
  • 9. ext.performingRelease = project.hasProperty(release) &&Boolean.parseBoolean(project.release)def versionPostfix = performingRelease?:-SNAPSHOTversion = "${releaseVersion}${versionPostfix}"status = performingRelease?release:snapshotapply plugin: java // Plugin as major conventionssourceCompatibility = 1.6// GRADLE-2087 workaround, perform after java pluginstatus = rootProject.statustask sourcesJar(type: Jar, dependsOn:classes) {classifier = sourcesfrom sourceSets.main.allSource}task javadocJar(type: Jar, dependsOn:javadoc) {classifier = javadoc  from javadoc.destinationDir}convention.gradle
  • 10. apply plugin: mavenapply plugin: signingsigning { sign configurations.archives}task uploadMavenCentral(type:Upload) {configuration = configurations.archivesdependsOn signArchivesdoFirst.repositories.mavenDeployer {beforeDeployment { signing.signPom(it) }repository(url: http://oss.sonatype.org/services/local/staging/deploy/maven2/) {authentication(userName: rroject.sonatypeUsername, password:project.sonatypePassword)}pom.project {url "https://github.com/Netflix/${project.githubName}"...}}}maven.gradle
  • 11. apply from: http://artifacts.netflix.com/gradle-netflix-local/artifactory.gradlenetflix-oss.gradle
  • 12. gradle-template• Be as visible as possible• Meant to be synced with (#git #ftw)• Templates for multiple-module and single-moduleprojects• Used by other companies• https://github.com/Netflix/gradle-template
  • 13. Phase 2: Full Build• Release plugin [gradle-release]• Publish snapshots, candidates and releases• Simpler signing in Jenkins• License and Copyright Headers [license-gradle-plugin]• Any plugins in Bintray• Publishing Javadoc• More code quality checks
  • 14. Continuous Integration• Jenkins Internally• Performs releases• Has Keys• Access to AWS• CloudBees DEV@CLOUD Externally• Builds Pull Requests• Shows Code Quality Metrics
  • 15. Problem Areas• Java plugin required for conf2scope mappings to work• Java plugin resets status [GRADLE-2087]• Parent poms caused problems, but aren’t needed• Sonatype username/password• Signing keys needed locally with special properties• Not all plugins were available
  • 16. Future• Roll features into plugins• Merge with internal build• Hire more engineers to work on Gradle
  • 17. @quidryan@quidryanhttp://www.slideshare.net/quidryanThank YouQuestions?@netflixoss #cloudprize