10. Continuous Integration
● SCM
● compile and test
● software integration
● reporting
● deployment to test
environment
● extension of CI
● one artifact on all
environments
● fully automated
deployment with a single
click
● prod release with a single
click
● each release is deployed to
production
● rolling deployments
necessary
● blue - green deployments
Continuous Delivery Continuous Deployment
11. If It Hurts, Do It More Frequently,
and Bring the Pain Forward
Source: Jez Humble, David Farley, Continuous Delivery, Pearson Education, Inc. 2011
12. CI / CD Workflow Overview
Git
code
Compile, Unit-tests
Integration Tests, Package
Deploy to Dev
Acceptance Tests
Deploy to UAT env
Manual Tests
Deploy to Prod
14. Maven / Artefactrepository
Maven versioning doesn't work well with continuous delivery
Each commit is a potential release candidate
SNAPSHOT versions do not exist
Maven release plugin is integrated into the Maven lifecycle. All or
nothing
mvn release:prepare mvn release:perform→
Many releases artifactrepository clean up→
15. Rolling Updates
OpenShift supports rolling updates.
The application notifies the platform when it’s ready for requests.
The routing layer then forwards requests to the new containers.
16. Automated Database Migration
DB Migrationscripts are part of the deployed application and
executed during startup.
$ php bin/console doctrine:schema:update
$ rake db:migrate
17. Automated Database Migration
Database knows the current schema version
During application startup / deployment lifecycle hook, the DB
migration is executed
Rolling update
DB must be backward compatible
23. Java Maven Example (2)
acceptance tests
Jenkins
test
Jenkins
artefact
cfg
deploy to UAT manual test
Jenkins
artefact
cfg
deploy to Prod
24. Jenkins Pipeline Plugin
Build jobs written as Groovy scripts.
Build job script is next to source code in git repository
Jenkins provides the environment
● Git / Artifactory / OpenShift Accounts
https://wiki.jenkins-ci.org/display/JENKINS/Pipeline+Plugin