Any changes made and pushed up to this repository will automatically trigger a build on my docker hub and within a couple of minutes later the build would of completed.
- Jenkins
- Blue Ocean plugin installed
Open up the terminal and add in the following command
sudo usermod -aG docker jenkins
The above command gives jenkins the correct permissions to use Docker commands
Restart the Jenkins service once you've ran the command
- Create a Personal access token that gives blue ocean access to your repositories (token is only used once unless it is deleted/removed or your Jenkins was uninstalled).
- Select the Repo your want to test (Make sure that the repo you are testing doesn't have an existing Jenkinsfile in it).
- Click the Agent drop down and select docker.
- In the Image * field add in
shaeenk/docker
. - Add in the step you need that will be running you test script