- A docker based unit test project
- To proof the concept of transient automated unit testing with Docker containers and BitBucket pipelines for a Continuous Integration and Deployment lifecycle.
- Upon a commit hook it will trigger a Docker build based on the included Docker file.
- Custom sysprepped container will be updated with any changes from current commit then re-uploaded to Docker Registry
- Updated Docker container will be reused for Maven test
- Updated Docker containerr will be reused for Maven package
-
I chose Bitbucket-pipeline for CI integration:
- Travis was very slow during Docker provisioning
- Travis has no OOTB integration with BB just GitHub
- Bitbucket pipeline is very fast for Docker
- BB has a very nice UI
-
Release strategy:
- Development work is on Master branch.
- Deployment is on Producion branch. Docker container is only updated and pushed to DR from Production branch.
- Commit only via PR to production.
$ git clone [email protected]:tudorfil8/docker.git
$ cd App
$ mvn test
$ mvn -Dtest=TestMessageBuilder test
$ mvn -Dtest=TestMessageBuilder#testHelloWorld test
$ git clone [email protected]:tudorfil8/docker.git
Monitor pipeline after commit here:
https://bitbucket.org/tudorfil8/docker/addon/pipelines/home#!/results/branch/production/page/1
$ git clone [email protected]:tudorfil8/docker.git
$ merge PRs to master branch.
$ Monitor build pipeline for master branch here
https://bitbucket.org/tudorfil8/docker/addon/pipelines/home#!/results/branch/master/page/1