Jenkins
Jenkins
Install jenkins
On CentOS / RedHad based linux:
| |
On Ubuntu:
| |
start jenkins service and set to start on boot
| |
JenkinsFile
For jenkins pipeline you will need to add a jenkins file to your repo which will be used to configure the build when the changes are pushed to the repo.
Example of the jenkinsfile:
| |
jenkins ssh keys
Jenkins will use the local jenkins user account to connect to remote repos so will need keys generated or added to the jenkins user:
create ssh key as jenkins user:
| |
Jenkins cloud for docker
install docker plugin
Create cloud in jenkins
Enable remote management on docker host:
Edit the Docker service file (usually located at /lib/systemd/system/docker.service) to include the following:
| |
- Install the Docker plugin in Jenkins.
- Go to Manage Jenkins > Configure System > Cloud > Add a new cloud > Docker.
- Configure the Docker cloud with the remote Docker host URL (e.g., tcp://:2375).