Continuous delivery demo that aims to use following principles:
- immutable environments
- short lived environments
- built and destroyed for each git commit
Continuous delivery with Jenkins (on-prem)
E2E with Docker Compose and Maven
Technology | Version |
---|---|
Java | 8 |
Wildfly | 10.1.0 |
MySQL | 5.7 |
Maven | 3.5 |
Docker | 1.10 |
Docker Compose | 1.6 |
- Start continuous delivery stack
- Create jenkins plan
$ cd jenkins && ./createJob.sh localhost bookstore config.xml
- http://localhost:8088/job/continuous-delivery -> 'Build Now'
- Source code changes pushed to git
- Jenkins detects changes and starts job
- Build war/jar artifact
- Start stack (includes image build for java web app)
- Apply db schema (flywaydb.org)
- Execute integration tests
- Stop stack (includes destroy of web and database containers)
-
Step-by-step
$ TAG=dev docker-compose up -d ackris-db ackris-web # start web and database containers $ mvn clean compile flyway:migrate # deploy database schema $ mvn clean verify -Dmaven.test.failure.ignore=false -Dtest.port=8070 # run integration tests
Use -Dmaven.buildNumber.doCheck=false
if project contains local changes
Demo: http://localhost:8070/bookstore
-
$ docker-compose up -d swaggerui
-
Swagger UI @
http://localhost:81