This is a demo for jenkins CI workflow
Assume you have built jenkins image called jenkin:test
, use the following command to start jenkins service:
docker run -d -p 8888:8080 --name jenkins -v /home/luke/document/github/jenkins/data:/var/jenkins_home/ -u 1000 jenkins:test
- Install ansible plugin
- Set global ansible tool with path
/usr/local/bin
- Add SSH key as jenkins credential ssh-key with ID
ssh-ansible
- Add Inventory file as jenkins credential file with ID
ansible-inventory