Skip to content

Docker/docker-composed continuous testing/delivery for a java web application

Notifications You must be signed in to change notification settings

alinpa/continuous-delivery

 
 

Repository files navigation

Java Continuous Delivery by Docker

Circle CI Build Status

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

Swagger

Stack

Technology Version
Java 8
Wildfly 10.1.0
MySQL 5.7
Maven 3.5
Docker 1.10
Docker Compose 1.6

Continuous delivery with Jenkins

Continuous Delivery life-cycle
  • 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)

E2E with docker compose and Maven

  • 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

Swagger

  • $ docker-compose up -d swaggerui

  • Swagger UI @ http://localhost:81

About

Docker/docker-composed continuous testing/delivery for a java web application

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Java 47.4%
  • JavaScript 27.3%
  • HTML 21.8%
  • Shell 1.2%
  • CSS 1.0%
  • Groovy 0.7%
  • Gherkin 0.6%