16
©2014 CloudBees, Inc. All Rights Reserved 1 ©2014 CloudBees, Inc. All Rights Reserved JavaOne Git and Docker w/Jenkins

Javaone 2014 - Git & Docker with Jenkins

Embed Size (px)

DESCRIPTION

JavaOne 2014 demo deck --- topics: Advanced Git Integration w/Jenkins & Docker Jenkins integration

Citation preview

Page 1: Javaone 2014 - Git & Docker with Jenkins

©2014 CloudBees, Inc. All Rights Reserved 1©2014 CloudBees, Inc. All Rights Reserved

JavaOne

Git and Docker w/Jenkins

Page 2: Javaone 2014 - Git & Docker with Jenkins

©2014 CloudBees, Inc. All Rights Reserved 2

• #1 Continuous Integration and Continuous Deployment server

• Java web application • “java –jar jenkins.war”

• MIT-licensed, 8 years old• 500+ releases

Meet Jenkins…

jenkins-ci.org

Source: 2014 Java Tools and Technologies Landscape – Rebel Labs

Page 3: Javaone 2014 - Git & Docker with Jenkins

©2014 CloudBees, Inc. All Rights Reserved 3©2014 CloudBees, Inc. All Rights Reserved

Git IntegrationAdvanced Git Integration w/ Jenkins

Page 4: Javaone 2014 - Git & Docker with Jenkins

©2014 CloudBees, Inc. All Rights Reserved 4

Distributed Version Control

Page 5: Javaone 2014 - Git & Docker with Jenkins

©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

Git Integration Plugins

Page 6: Javaone 2014 - Git & Docker with Jenkins

©2014 CloudBees, Inc. All Rights Reserved 6

• 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

The Problem: Broken Builds

Page 7: Javaone 2014 - Git & Docker with Jenkins

©2014 CloudBees, Inc. All Rights Reserved 7

• CloudBees Git Validated Merge Plugin– Jenkins acts as a git remote– Offloads more complex tests from

developers– Helps prevent breaking the build!

The Fix!

Page 8: Javaone 2014 - Git & Docker with Jenkins

©2014 CloudBees, Inc. All Rights Reserved 8

Demo

Page 9: Javaone 2014 - Git & Docker with Jenkins

©2014 CloudBees, Inc. All Rights Reserved 9

http://www.cloudbees.com/products/jenkins-enterprise

Just launched:• GitHub Pull Request Builder

CloudBees Jenkins Enterprise

Page 10: Javaone 2014 - Git & Docker with Jenkins

©2014 CloudBees, Inc. All Rights Reserved 10©2014 CloudBees, Inc. All Rights Reserved

Jenkins & DockerLeverage Docker in your Build Process

Page 11: Javaone 2014 - Git & Docker with Jenkins

©2014 CloudBees, Inc. All Rights Reserved 11

+

Page 12: Javaone 2014 - Git & Docker with Jenkins

©2014 CloudBees, Inc. All Rights Reserved 12

How can I use Docker with Jenkins?

1. Use Docker to manage your Jenkins resources

2. Use Jenkins to build Docker images

Page 13: Javaone 2014 - Git & Docker with Jenkins

©2014 CloudBees, Inc. All Rights Reserved 13

Name Description Category

Docker Plugin This plugin allows slaves to be dynamically provisioned using Docker.

1: Manage Jenkins

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

Page 14: Javaone 2014 - Git & Docker with Jenkins

©2014 CloudBees, Inc. All Rights Reserved 14

Demo

Page 15: Javaone 2014 - Git & Docker with Jenkins

©2014 CloudBees, Inc. All Rights Reserved 15

Jenkins: the Hub of Continuous Delivery

Source Code

Binaries

Quality Analysis Functional Test

Performance / Load Test

Production

Page 16: Javaone 2014 - Git & Docker with Jenkins

©2014 CloudBees, Inc. All Rights Reserved 16

https://registry.hub.docker.com/repos/cloudbees/

http://developer.cloudbees.com/

CloudBees on Docker