Slide 1

Slide 1 text

JENKINS@ZT To CI and beyond…

Slide 2

Slide 2 text

ABOUTME • Graduated from ITMO University • Big game development background: SignusLabs, Social Quantum, Pragmatix, Creative Mobile • Moved to Estonia in 2013 • DevOps Engineer (XRebel team) • <3 OpenSource (contributor to Groovy, Spring Boot, Jenkins plugins, AWS SDK, and many more) • https://github.com/bsideup @bsideup

Slide 3

Slide 3 text

ABOUTUS • We develop for Java developers • JRebel / JRebel for Android™ - code reloads without redeploy • XRebel - lightweight profiler aka “OMG do we really have 1000 DB queries?!” • We pay more money for Jenkins machines than production servers @bsideup

Slide 4

Slide 4 text

@bsideup

Slide 5

Slide 5 text

LESSONSLEARNED • One does not simply use single Jenkins for all projects • Plugins conflicts • Try to keep your plugins up to date • Automate nodes configuration (Ansible, Chef, Docker, etc) • Continuous Delivery with Jenkins is challenging @bsideup

Slide 6

Slide 6 text

PLAINJENKINS @bsideup • Can be configured only with UI • No job config history and audit • Doesn’t allow templating of jobs • Single Job oriented • Not a good choice for Continuous Delivery

Slide 7

Slide 7 text

How to solve?

Slide 8

Slide 8 text

WITHPLUGINS

Slide 9

Slide 9 text

CONFIG HISTORY PLUGIN @bsideup • Tracks changes in Job’s configuration by comparing XML representations • Each change is bounded to user who did it • “Must have” for audition • Provides “Rollback” functionality • No configuration required to start

Slide 10

Slide 10 text

CONFIG HISTORY PLUGIN @bsideup

Slide 11

Slide 11 text

JOB DSL PLUGIN mavenJob(buildJobName) {
 label 'xr-build'
 
 scm {
 hg(“ssh://hg@bitbucket.org/zeroturnaround/…”)
 }
 
 triggers {
 scm("H/5 * * * *")
 }
 
 mavenInstallation 'Maven 3.2.x'
 goals("clean package")
 
 publishers {
 archiveArtifacts(“target/**”)
 }
 } @bsideup

Slide 12

Slide 12 text

PROS @bsideup • Groovy DSL • Reuse job definitions, steps, etc • Could be reviewed as code • A lot of bindings for plugins • Configuration stored in VCS • Want to change job? Send pull request! • Auditable • History and rollbacks

Slide 13

Slide 13 text

CONS @bsideup • Groovy DSL :) • Some knowledge about Jenkins config internals is required • No bindings for non-popular plugins (but solvable)

Slide 14

Slide 14 text

CUSTOMDSL @bsideup freeStyleJob("xr-sharing-functional-tests-${environment.name}") {
 label 'xr-test-integration'
 
 scm {
 git('git@bitbucket.org:zeroturnaround/xr-sharing-tests.git') {
 clean()
 }
 }
 
 steps {
 steps {
 gradle('clean cucumber', "-Pgeb.build.baseUrl=${environment.url}")
 }
 }
 
 configure { project ->
 project / publishers << 'net.masterthought.jenkins.CucumberReportPublisher' {
 jsonReportDirectory 'build/reports/'
 pluginUrlPath ''
 fileIncludePattern ''
 fileExcludePattern ''
 }
 }
 }

Slide 15

Slide 15 text

CONTINUOUSDELIVERY @bsideup

Slide 16

Slide 16 text

DELIVERY PIPELINE PLUGIN @bsideup • Very easy to configure - just specify “first job in pipeline” • Great overview of current release status • Each step is a separate job, steps trigger other steps • Manual steps (i.e. “promote to staging”)

Slide 17

Slide 17 text

OURFORK @bsideup • Front-end was completely rewritten from jQuery to ReactJS • Able to handle very complex pipelines • Allow tracking of changes between different stages (i.e. dev, qa, prod) • Most of this changes will be contributed back (a few already are)

Slide 18

Slide 18 text

No content

Slide 19

Slide 19 text

No content

Slide 20

Slide 20 text

But we miss something…

Slide 21

Slide 21 text

Theming!

Slide 22

Slide 22 text

No content

Slide 23

Slide 23 text

ZTTHEME @bsideup • Theme for “Simple Theme” plugin • Fork of “Jenkins Atlassian Theme” • Available at GitHub: 
 https://github.com/zeroturnaround/jenkins-atlassian-theme

Slide 24

Slide 24 text

So Jenkins is cute… Again.

Slide 25

Slide 25 text

THANKYOU!