Forked from https://github.com/marcelbirkner/docker-ci-tool-stack, thanks so much.
This minor modifications are just for having last version of Gitlab and postgress as well as some minor modifications for using environment variables to store passwords.
TODO Change the CHANGE_ME text for references to environment variables inside every container if possible.
CI Tools Demo
This GitHub repository contains Dockerfiles for running a set of Continuous Integration Tools with a single command. The diagram contains all tools used in the Docker containers.
Prerequisites (Mac)
You should have Docker Toolbox installed, see https://www.docker.com/toolbox
I am using docker-compose to start several docker container at once. Since all containers run in a single VM (virtualbox), this VM needs enough memory.
Step 0 - List Docker Machine
~/git/docker-ci-tool-stack$ docker-machine ls
NAME ACTIVE DRIVER STATE URL SWARM
default * virtualbox Running tcp://192.168.99.100:2376
Step 1 - Stop your docker VM
define environment variables for DB_PASSWD and SMTP_PASSWD. Remember to replace every CHANGE_ME text for the DB_PASSWD defined.
docker-machine stop default
Step 2 - Increase Memory via VirtualBox UI
I am using 6000MB for my VM.
Step 3 - Start VM
docker-machine start default
Getting started
To get all docker containers up and running use:
git clone https://github.com/ftenaf/docker-ci-tool-stack.git
cd docker-ci-tool-stack
docker-compose up
Access Tools
Tool | Link | Credentials |
---|---|---|
Jenkins | http://${docker-machine ip default}:8080/jenkins/ | no login required |
SonarQube | http://${docker-machine ip default}:9000/ | admin/admin |
Nexus | http://${docker-machine ip default}:8081/nexus | admin/admin123 |
GitLab | http://${docker-machine ip default}:10080/ | root/5iveL!fe |
Selenium Grid | http://${docker-machine ip default}:4444/grid/console | no login required |
Screenshots
Here is an overview of all tools:
- GitLab is used for storing the Sourcecode
- Jenkins contains build job and is triggered once projects in GitLab are updated
- As part of the CI build, Jenkins triggers a static code analysis and the results are stored in SonarQube
- The Maven build uses Nexus as a Proxy Repository for all 3rd party libs. The build artefacts are deployed to the Nexus Release Repository
- The Selenium Grid contains Docker containers running Chrome and Firefox and is used for UI tests
Jenkins Jobs
There are several jobs preconfigured in Jenkins. The Jobs cover the following tasks:
- Continuous Integration Build with Maven
- Unit Tests
- Static Source Analysis results are stored in SonarQube
- JaCoCo Test Coverage
- Deployment to Nexus
- Jenkins Job DSL examples
- Selenium UI Test