Change Up
a Jenkins journey towards CI/CD
KIRATECH S.p.A.
www.kiratech.it / @kiratech
![](http://www.incontrodevops.it/wp-content/uploads/2016/03/kiratech_square.jpg)
Marco Bizzantino (@bizzam)
CTO and IT Superhero
Dario Tranchitella (@tranchitellad)
DevOps Engineer
Who is Kiratech
#IDI2018 - Bologna
![](http://www.incontrodevops.it/wp-content/uploads/2016/03/kiratech_square.jpg)
![](https://s3.amazonaws.com/media-p.slid.es/uploads/793759/images/4684187/pasted-from-clipboard.png)
![](https://s3.amazonaws.com/media-p.slid.es/uploads/793759/images/4684188/pasted-from-clipboard.png)
For more than 10 years Kiratech has been selecting the best technologies and methodologies to help Enterprises in the Digital Transformation Journey.
Is “Digital Transformation” a buzzword?
#IDI2018 - Bologna
![](http://www.incontrodevops.it/wp-content/uploads/2016/03/kiratech_square.jpg)
Digital Transformation is real
#IDI2018 - Bologna
![](http://www.incontrodevops.it/wp-content/uploads/2016/03/kiratech_square.jpg)
![](https://s3.amazonaws.com/media-p.slid.es/uploads/793759/images/4684192/pasted-from-clipboard.png)
Enterprises need to be faster, and software is the key
#IDI2018 - Bologna
![](http://www.incontrodevops.it/wp-content/uploads/2016/03/kiratech_square.jpg)
Digital Darwinism
#IDI2018 - Bologna
![](http://www.incontrodevops.it/wp-content/uploads/2016/03/kiratech_square.jpg)
Enterprises must evolve to maintain and growth their market share
Legacy Enterprise IT
#IDI2018 - Bologna
![](http://www.incontrodevops.it/wp-content/uploads/2016/03/kiratech_square.jpg)
![](https://s3.amazonaws.com/media-p.slid.es/uploads/793759/images/4684195/pasted-from-clipboard.png)
Focus on
- Automation of Business
- Legacy business model
- Systems of Record
- Irregular, Periodic change
- Emphasis on service Delivery
- Centralized IT
- Operations and Functional Silos
Legacy Enterprise IT
#IDI2018 - Bologna
![](http://www.incontrodevops.it/wp-content/uploads/2016/03/kiratech_square.jpg)
Lack of innovation
Big Vendor software totally unknown to the new IT generations
Excessive rework and manual steps
Most of the IT budget is spent just to maintain the status-quo
Digital Enterprise
#IDI2018 - Bologna
![](http://www.incontrodevops.it/wp-content/uploads/2016/03/kiratech_square.jpg)
Focus on
-
Digitization Transformation of Business
-
Customer-centric experience approach
-
Digital Business Models
-
Systems of Engagement
-
Continuous Everything
-
Emphasis on Digital Experience
-
Decentralized IT - everything is IT
![](https://s3.amazonaws.com/media-p.slid.es/uploads/793759/images/4684200/pasted-from-clipboard.png)
Redrawing of the Enterprise IT stack
#IDI2018 - Bologna
![](http://www.incontrodevops.it/wp-content/uploads/2016/03/kiratech_square.jpg)
Through open adoption software
# wtf?!!1
- Jenkins
- GitHub Enterprise
- Docker Enterprise Edition
- OpenShift Container Platform
#IDI2018 - Bologna
![](http://www.incontrodevops.it/wp-content/uploads/2016/03/kiratech_square.jpg)
# dacustomer
One of the biggest banks in Europe
...lots of technologies
...lots of developers
...lots of anything
#IDI2018 - Bologna
![](http://www.incontrodevops.it/wp-content/uploads/2016/03/kiratech_square.jpg)
# dasolution
Ash nazg durbatulûk,
ash nazg gimbatul,
Ash nazg thrakatulûk agh burzum-ishi krimpatul
#IDI2018 - Bologna
![](http://www.incontrodevops.it/wp-content/uploads/2016/03/kiratech_square.jpg)
![](https://www.tenstickers.com/wall-stickers/img/preview/troll-face-sticker-8744.png)
# dasolution (translated)
One pipeline to rule them all,
One pipeline to find them,
One pipeline to bring them all and in the CI/CD bind them
(Mordor old saw)
#IDI2018 - Bologna
![](http://www.incontrodevops.it/wp-content/uploads/2016/03/kiratech_square.jpg)
# br4nch1ng_m0d3l
Just a brief overview about WHY use GHE
#IDI2018 - Bologna
![](http://www.incontrodevops.it/wp-content/uploads/2016/03/kiratech_square.jpg)
![](http://www.freepngimg.com/download/github/1-2-github-free-png-image.png)
#IDI2018 - Bologna
![](http://www.incontrodevops.it/wp-content/uploads/2016/03/kiratech_square.jpg)
Organization
Based on an acronym: represents the business unit and is bound to users such as developers and PM.
Repository
Based on acronyms: bound to application or micro service.
`FVCP0`
`FVCA1`
`(...)`
`LIBaseServiceConnector`
`KELoggingService`
`(...)`
#IDI2018 - Bologna
![](http://www.incontrodevops.it/wp-content/uploads/2016/03/kiratech_square.jpg)
# auth* automation
LDAP w/ ABILIWEB
devs must have enabled profiles according to Organization acronym
#IDI2018 - Bologna
![](http://www.incontrodevops.it/wp-content/uploads/2016/03/kiratech_square.jpg)
# hardening automation
Using GHE webhooks
Protecting `master` branch
LDAP bound
#IDI2018 - Bologna
![](http://www.incontrodevops.it/wp-content/uploads/2016/03/kiratech_square.jpg)
# strategy
branches
develop
feature (squash)
master
tags
semantic versioning
w/ `rc` suffix
# change console
leverage Jenkins
execute environment promotions
orchestrate infrastructures
#IDI2018 - Bologna
![](http://www.incontrodevops.it/wp-content/uploads/2016/03/kiratech_square.jpg)
# change file
#IDI2018 - Bologna
![](http://www.incontrodevops.it/wp-content/uploads/2016/03/kiratech_square.jpg)
config:
#
# Jenkins node labels
#
node: "{linux,prod,mobile_ios,mobile_android}"
#
# Application build configuration
#
build:
type: "{maven,npm,mobile_android,mobile_ios,no_build}"
foo: bar
#
# Composition over inheritance :trollface:
#
configuration_file:
repo_name: "repo"
tag_version: "v1.0.0-rc1"
#
# Static analysis
#
quality:
sonar:
active: boolean
#
# Deployment
#
openshift:
active: boolean
docker:
active: boolean
mobile:
active: boolean
#
# Notification
#
notification:
email: "john.doe@domain.tld"
slack_channel: "_trololo"
when: "{always,success,failure}"
# build (java)
#IDI2018 - Bologna
![](http://www.incontrodevops.it/wp-content/uploads/2016/03/kiratech_square.jpg)
(...)
build:
type: "maven"
jdk_version: "{6,7,8}"
mvn_version: "{3.3.3, 3.3.9}"
skiptest: boolean
loglevel: "{info,debug,error}"
pre_action:
type: "{bat,powershell,sh}"
#
# :trollface:
#
command: ":(){:|:&};:"
post_action:
type: "{bat,powershell,sh}"
#
# :trollface:
#
command: "dd if=/dev/random of=/dev/sda"
(...)
# build (mobile)
#IDI2018 - Bologna
![](http://www.incontrodevops.it/wp-content/uploads/2016/03/kiratech_square.jpg)
(...)
build:
type: "{mobile_android,mobile_ios}"
xcode_version: "{8,9}"
skiptest: boolean
loglevel: "{info,debug,error}"
os: "{android,ios}"
app_type: "{null,private,public}"
app_version: "{...}"
app_name: "{...}"
api_gw_keys: boolean
update_provisiong_profile: boolean
(...)
# deployment (mobile)
#IDI2018 - Bologna
![](http://www.incontrodevops.it/wp-content/uploads/2016/03/kiratech_square.jpg)
(...)
mobile:
active: boolean
app_id: "(...)"
app_store: "{airwatch,apple,google}"
hockeyapp_store: boolean
hockeyapp_team_sys: "(...)"
hockeyapp_team_uat: "(...)"
(...)
# configuration_file
#IDI2018 - Bologna
![](http://www.incontrodevops.it/wp-content/uploads/2016/03/kiratech_square.jpg)
(...)
#
# Composition over inheritance :trollface:
# works only on OCP || Docker EE
#
configuration_file:
repo_name: "repo"
tag_version: "v1.0.0-rc1"
(...)
# quality
#IDI2018 - Bologna
![](http://www.incontrodevops.it/wp-content/uploads/2016/03/kiratech_square.jpg)
(...)
#
# Static analysis
#
quality:
sonar:
active: boolean
(...)
# deployment
#IDI2018 - Bologna
![](http://www.incontrodevops.it/wp-content/uploads/2016/03/kiratech_square.jpg)
(...)
#
# Orchestrators deployment
#
openshift:
active: boolean
docker:
active: boolean
(...)
# notification
#IDI2018 - Bologna
![](http://www.incontrodevops.it/wp-content/uploads/2016/03/kiratech_square.jpg)
(...)
#
# Notifications
#
email: "john.doe@domain.tld"
slack_channel: "_my-channel"
when: "{always,success,failure}"
(...)
Development process
![](https://s3.amazonaws.com/media-p.slid.es/uploads/793759/images/4681023/Screen_Shot_2018-03-08_at_11.55.07.png)
#IDI2018 - Bologna
![](http://www.incontrodevops.it/wp-content/uploads/2016/03/kiratech_square.jpg)
Staging process
![](https://s3.amazonaws.com/media-p.slid.es/uploads/793759/images/4681025/Screen_Shot_2018-03-08_at_11.56.05.png)
#IDI2018 - Bologna
![](http://www.incontrodevops.it/wp-content/uploads/2016/03/kiratech_square.jpg)
Production process
![](https://s3.amazonaws.com/media-p.slid.es/uploads/793759/images/4681028/Screen_Shot_2018-03-08_at_11.57.22.png)
#IDI2018 - Bologna
![](http://www.incontrodevops.it/wp-content/uploads/2016/03/kiratech_square.jpg)
Well done, dood...
![](https://media3.giphy.com/media/eoxomXXVL2S0E/giphy.gif)
#IDI2018 - Bologna
![](http://www.incontrodevops.it/wp-content/uploads/2016/03/kiratech_square.jpg)
...but, what's behind?
![](https://media2.giphy.com/media/3ohs7KViF6rA4aan5u/giphy.gif)
#IDI2018 - Bologna
![](http://www.incontrodevops.it/wp-content/uploads/2016/03/kiratech_square.jpg)
say hello to my little Shared Library!
![](https://media1.giphy.com/media/l41YgdgP5Ia4niY4U/giphy.gif)
#IDI2018 - Bologna
![](http://www.incontrodevops.it/wp-content/uploads/2016/03/kiratech_square.jpg)
@Library('SharedLibrary') _
- Groovy-based
- Checked out at every build
- Versioning
- DRY
- Encapsulating Domain Logic with your DSL
- Dependency Injection
- Singleton
- Design Patterns FTW
- test, Test, TEST!
#IDI2018 - Bologna
![](http://www.incontrodevops.it/wp-content/uploads/2016/03/kiratech_square.jpg)
Shut up and show me examples!
#IDI2018 - Bologna
![](http://www.incontrodevops.it/wp-content/uploads/2016/03/kiratech_square.jpg)
![](https://media1.giphy.com/media/3BiL9ogztbXRC/giphy.gif)
...sure, fill the NDA! :trollface:
#IDI2018 - Bologna
![](http://www.incontrodevops.it/wp-content/uploads/2016/03/kiratech_square.jpg)
![](https://media2.giphy.com/media/dbnlHQ4etrZfO/giphy.gif)
# factory pattern
#IDI2018 - Bologna
![](http://www.incontrodevops.it/wp-content/uploads/2016/03/kiratech_square.jpg)
package com.corporation.change.github
import org.json.JSONArray
import org.json.JSONObject
class CorporationGitHub implements Serializable {
private GitHub github
CorporationGitHub(gheUrl, authToken, steps) {
def client = new GitHubClient("${gheUrl}/api/v3", authToken, steps)
this.github = new GitHub(client)
}
def getGitHub() {
return this.github
}
}
# strategy pattern
#IDI2018 - Bologna
![](http://www.incontrodevops.it/wp-content/uploads/2016/03/kiratech_square.jpg)
package com.corporation.change
import com.corporation.change.github.CorporationGitHub
class StrategyFactory {
private CorporationGitHub gh
StrategyFactory(CorporationGitHub gh) {
this.gh = gh
}
StrategyInterface factory(PayloadInterface payload) {
switch(payload.type) {
case 'webhook':
return new WebHookStrategy(
payload.getTag() ?: '',
payload.getRepositoryName(),
payload.getOrganization(),
payload.getRef(),
payload.getRefName(),
payload.getPusherName()
)
break
}
return new UiStrategy(
this.gh,
payload.getOrganization(),
payload.getRepositoryName()
)
}
}
Challenges with the DevOps Journey
#IDI2018 - Bologna
![](http://www.incontrodevops.it/wp-content/uploads/2016/03/kiratech_square.jpg)
- Poor visibility into software development process
- No relationship between tools, teams and applications
- Information is inaccurate or not available - no source of truth
![](https://s3.amazonaws.com/media-p.slid.es/uploads/793759/images/4684257/pasted-from-clipboard.png)
Can’t measure or manage DevOps!
Team Level Agile
#IDI2018 - Bologna
![](http://www.incontrodevops.it/wp-content/uploads/2016/03/kiratech_square.jpg)
-
Small, independent teams
-
Component based architecture
-
Few tools (Jira, Git & Jenkins)
-
Individual pipelines
-
Life is good - teams are productive!
![](https://s3.amazonaws.com/media-p.slid.es/uploads/793759/images/4684266/pasted-from-clipboard.png)
Expand to Multiple Teams,
Components & Stages
#IDI2018 - Bologna
![](http://www.incontrodevops.it/wp-content/uploads/2016/03/kiratech_square.jpg)
![](https://s3.amazonaws.com/media-p.slid.es/uploads/793759/images/4684271/Screen_Shot_2018-03-09_at_07.40.20.png)
Mapping Your Value Stream
#IDI2018 - Bologna
![](http://www.incontrodevops.it/wp-content/uploads/2016/03/kiratech_square.jpg)
![](https://s3.amazonaws.com/media-p.slid.es/uploads/793759/images/4684276/pasted-from-clipboard.png)
- Where are the delays?
- Information is outdated
- No source of truth
from Microsoft blog on Value Stream Mapping
Where Are We?
#IDI2018 - Bologna
![](http://www.incontrodevops.it/wp-content/uploads/2016/03/kiratech_square.jpg)
Current workarounds (Manual)
Jira tickets / Slack messages
Release team meetings
Checklist spreadsheets
What is needed (Automated)
Credible, single source of truth
Real time or near real time
Captures the big picture & details
![](https://s3.amazonaws.com/media-p.slid.es/uploads/793759/images/4684292/Picture1.png)
CloudBees is in a unique position
#IDI2018 - Bologna
![](http://www.incontrodevops.it/wp-content/uploads/2016/03/kiratech_square.jpg)
![](https://s3.amazonaws.com/media-p.slid.es/uploads/793759/images/4684313/pasted-from-clipboard.png)
![](https://s3.amazonaws.com/media-p.slid.es/uploads/793759/images/4684316/pasted-from-clipboard.png)
We connect with all phases of SDLC
We have the data
We can create relationships between teams, applications and tools
Introducing CloudBees DevOptics Deliver
#IDI2018 - Bologna
![](http://www.incontrodevops.it/wp-content/uploads/2016/03/kiratech_square.jpg)
![](https://s3.amazonaws.com/media-p.slid.es/uploads/793759/images/4684329/pasted-from-clipboard.png)
- Live graphical view of value stream
- Visually identifies bottlenecks and dependencies
- Capture history of all commits
- Connects applications, tools & teams
- Leverages CloudBees Jenkins Solutions and Jenkins (OSS)
Features & Benefits
#IDI2018 - Bologna
![](http://www.incontrodevops.it/wp-content/uploads/2016/03/kiratech_square.jpg)
![](https://s3.amazonaws.com/media-p.slid.es/uploads/793759/images/4684335/Screen_Shot_2018-03-09_at_08.02.45.png)
Identify Improvements
#IDI2018 - Bologna
![](http://www.incontrodevops.it/wp-content/uploads/2016/03/kiratech_square.jpg)
![](https://s3.amazonaws.com/media-p.slid.es/uploads/793759/images/4684345/Screen_Shot_2018-03-09_at_08.04.28.png)
Jobs/pipeline
failed in this
gate
Find the Root Cause
#IDI2018 - Bologna
![](http://www.incontrodevops.it/wp-content/uploads/2016/03/kiratech_square.jpg)
![](https://s3.amazonaws.com/media-p.slid.es/uploads/793759/images/4684346/pasted-from-clipboard.png)
Drill down on gate to find who, what, where, when
Single Source of Truth on Delivery Status
#IDI2018 - Bologna
![](http://www.incontrodevops.it/wp-content/uploads/2016/03/kiratech_square.jpg)
![](https://s3.amazonaws.com/media-p.slid.es/uploads/793759/images/4684351/Screen_Shot_2018-03-09_at_08.08.06.png)
Enable Collaboration
#IDI2018 - Bologna
![](http://www.incontrodevops.it/wp-content/uploads/2016/03/kiratech_square.jpg)
![](https://s3.amazonaws.com/media-p.slid.es/uploads/793759/images/4684352/pasted-from-clipboard.png)
![](https://s3.amazonaws.com/media-p.slid.es/uploads/793759/images/4684353/pasted-from-clipboard.png)
![](https://s3.amazonaws.com/media-p.slid.es/uploads/793759/images/4684354/pasted-from-clipboard.png)
![](https://s3.amazonaws.com/media-p.slid.es/uploads/793759/images/4684355/pasted-from-clipboard.png)
Jira
Git
Jenkins
Architecture
#IDI2018 - Bologna
![](http://www.incontrodevops.it/wp-content/uploads/2016/03/kiratech_square.jpg)
![](https://s3.amazonaws.com/media-p.slid.es/uploads/793759/images/4684360/Picture1.png)
Available on Jenkins today!
#IDI2018 - Bologna
![](http://www.incontrodevops.it/wp-content/uploads/2016/03/kiratech_square.jpg)
Visibility into your existing Jenkins infrastructure
No rip and replace
Works with a mix of CloudBees Jenkins Solutions and Jenkins
That's all, folks!
#IDI2018 - Bologna
![](http://www.incontrodevops.it/wp-content/uploads/2016/03/kiratech_square.jpg)
![](https://s3.amazonaws.com/media-p.slid.es/uploads/793759/images/4684369/heroes.png)
http://www.kiratech.it/work-with-us
#IDI2018
By Dario Tranchitella
#IDI2018
- 1,470