©2014 CloudBees, Inc. All Rights Reserved 1 JavaOne Git and Docker w/Jenkins
Meet Jenkins… • #1 Continuous Integration and Continuous Deployment ©2014 CloudBees, Inc. All Rights Reserved 2 server • Java web application • “java –jar jenkins.war” • MIT-licensed, 8 years old • 500+ releases jenkins-ci.org Source: 2014 Java Tools and Technologies Landscape – Rebel Labs
Git Integration Advanced Git Integration w/ Jenkins ©2014 CloudBees, Inc. All Rights Reserved 3
Distributed Version Control ©2014 CloudBees, Inc. All Rights Reserved 4
Git Integration Plugins ©2014 CloudBees, Inc. All Rights Reserved 5 • Lots of them! – Git plugin – GitBucket Plugin – Gitlab Merge Request Builder Plugin – Git Chooser Alternative Plugin – Git Parameter Plugin – Gitlab Hook Plugin – GitHub pull request builder plugin – GitHub Plugin – Github OAuth Plugin – Git Parameter Plugin – Git Client Plugin – Git Server Plugin – GitHub API Plugin
The Problem: Broken Builds • Unit tests are quick and cheap • Integration tests are more expensive • Integration usually breaks the build • Developers don’t always run integration tests before pushing to git ©2014 CloudBees, Inc. All Rights Reserved 6
• CloudBees Git Validated Merge Plugin – Jenkins acts as a git remote – Offloads more complex tests from developers – Helps prevent breaking the build! ©2014 CloudBees, Inc. All Rights Reserved 7 The Fix!
Demo ©2014 CloudBees, Inc. All Rights Reserved 8
CloudBees Jenkins Enterprise http://www.cloudbees.com/products/jenkins-enterprise Just launched: • GitHub Pull Request Builder ©2014 CloudBees, Inc. All Rights Reserved 9
Jenkins & Docker Leverage Docker in your Build Process ©2014 CloudBees, Inc. All Rights Reserved 10
+ ©2014 CloudBees, Inc. All Rights Reserved 11
How can I use Docker with Jenkins? 1. Use Docker to manage your Jenkins resources 2. Use Jenkins to build Docker images ©2014 CloudBees, Inc. All Rights Reserved 12
Name Description Category Docker Plugin This plugin allows slaves to be dynamically provisioned using Docker. 1: Manage Jenkins ©2014 CloudBees, Inc. All Rights Reserved 13 Docker Build Step Plugin This plugin allows to add various docker commands into you job as a build step 2: Build Docker images DockerHub Plugin Integrate Jenkins with DockerHub to manage validation process for Docker images. 2: Build Docker images Docker Build Publish Plugin Build projects with a Dockerfile, and publish the resultant tagged image (repo) to the docker registry. 2: Build Docker images Plugins
Demo ©2014 CloudBees, Inc. All Rights Reserved 14
Jenkins: the Hub of Continuous Delivery ©2014 CloudBees, Inc. All Rights Reserved 15 Binaries Source Code Quality Analysis Functional Test Performance / Load Test Production
CloudBees on Docker https://registry.hub.docker.com/repos/cloudbee s/ http://developer.cloudbees.com/ ©2014 CloudBees, Inc. All Rights Reserved 16

Javaone 2014 - Git & Docker with Jenkins

  • 1.
    ©2014 CloudBees, Inc.All Rights Reserved 1 JavaOne Git and Docker w/Jenkins
  • 2.
    Meet Jenkins… •#1 Continuous Integration and Continuous Deployment ©2014 CloudBees, Inc. All Rights Reserved 2 server • Java web application • “java –jar jenkins.war” • MIT-licensed, 8 years old • 500+ releases jenkins-ci.org Source: 2014 Java Tools and Technologies Landscape – Rebel Labs
  • 3.
    Git Integration AdvancedGit Integration w/ Jenkins ©2014 CloudBees, Inc. All Rights Reserved 3
  • 4.
    Distributed Version Control ©2014 CloudBees, Inc. All Rights Reserved 4
  • 5.
    Git Integration Plugins ©2014 CloudBees, Inc. All Rights Reserved 5 • Lots of them! – Git plugin – GitBucket Plugin – Gitlab Merge Request Builder Plugin – Git Chooser Alternative Plugin – Git Parameter Plugin – Gitlab Hook Plugin – GitHub pull request builder plugin – GitHub Plugin – Github OAuth Plugin – Git Parameter Plugin – Git Client Plugin – Git Server Plugin – GitHub API Plugin
  • 6.
    The Problem: BrokenBuilds • Unit tests are quick and cheap • Integration tests are more expensive • Integration usually breaks the build • Developers don’t always run integration tests before pushing to git ©2014 CloudBees, Inc. All Rights Reserved 6
  • 7.
    • CloudBees GitValidated Merge Plugin – Jenkins acts as a git remote – Offloads more complex tests from developers – Helps prevent breaking the build! ©2014 CloudBees, Inc. All Rights Reserved 7 The Fix!
  • 8.
    Demo ©2014 CloudBees,Inc. All Rights Reserved 8
  • 9.
    CloudBees Jenkins Enterprise http://www.cloudbees.com/products/jenkins-enterprise Just launched: • GitHub Pull Request Builder ©2014 CloudBees, Inc. All Rights Reserved 9
  • 10.
    Jenkins & Docker Leverage Docker in your Build Process ©2014 CloudBees, Inc. All Rights Reserved 10
  • 11.
    + ©2014 CloudBees,Inc. All Rights Reserved 11
  • 12.
    How can Iuse Docker with Jenkins? 1. Use Docker to manage your Jenkins resources 2. Use Jenkins to build Docker images ©2014 CloudBees, Inc. All Rights Reserved 12
  • 13.
    Name Description Category Docker Plugin This plugin allows slaves to be dynamically provisioned using Docker. 1: Manage Jenkins ©2014 CloudBees, Inc. All Rights Reserved 13 Docker Build Step Plugin This plugin allows to add various docker commands into you job as a build step 2: Build Docker images DockerHub Plugin Integrate Jenkins with DockerHub to manage validation process for Docker images. 2: Build Docker images Docker Build Publish Plugin Build projects with a Dockerfile, and publish the resultant tagged image (repo) to the docker registry. 2: Build Docker images Plugins
  • 14.
    Demo ©2014 CloudBees,Inc. All Rights Reserved 14
  • 15.
    Jenkins: the Hubof Continuous Delivery ©2014 CloudBees, Inc. All Rights Reserved 15 Binaries Source Code Quality Analysis Functional Test Performance / Load Test Production
  • 16.
    CloudBees on Docker https://registry.hub.docker.com/repos/cloudbee s/ http://developer.cloudbees.com/ ©2014 CloudBees, Inc. All Rights Reserved 16

Editor's Notes

  • #10 automatically setup web hook support github private repositories (ours are setup to use it) use github commit status API