This is the Dockerized solution I' am working on, first as a way of learning to navigate Docker and second, as a way to learn how to setup the whole enchilada of Continuous Integration.
- Docker Engine 17.06.0+
- Docker Compose 1.13.0
Use docker-compose to start the containers.
$ docker-compose up
Pre installed plugins:
- SonarQube 2.6.1
- Bitbucket 1.1.5
During the initial run of Jenkins a security token is generated and printed in the console log:
*************************************************************
Jenkins initial setup is required. A security token is required to proceed.
Please use the following security token to proceed to installation:
41d2b60b0e4cb5bf2025d33b21cb
*************************************************************
This token must be entered in the "Setup Wizard" the first time you open the Jenkins UI(host-machine-ip:8080). This token will also serve as the default password for the user admin if you skip the user-creation step in the Setup Wizard.
After Jenkins is set up:
- Create a project on Jenkins
- Open the projects configuration page
- Under
Source code management
, select git and configure access to your repo - Under
Build Triggers
, mark the checkboxBuild when a change is pushed to BitBucket
On BitBucket:
- Open your repo settings on BitBucket
- Under
Integrations
, click on the linkWebhooks
- Add a webhook with title "Jenkins" and URL as "http://:8080/bitbucket-hook/"
- Make sure the status is marked as "Active"
Once you have configured SonarQube itself.
To-Do: Finish this section.
Go to Administration > System > Update Center
, select Available
and search for SonarJava, or whatever lame language you program.
Click over your name and then on My account, go to Security, enter a token name and click on generate. Save the token, you won't be able to see the token again later.