Configuring Linux Nodes to Jenkins Master
Adding Ubuntu Node to Jenkins Master
- Jenkins Master is up and running
- Create one more ubuntu VM in the same network
- Login into the ubuntu vm and create a user jenkins, enable password authentication.
- Install JDK and maven
- Login into Jenkins master as Jenkins user and try to ssh into newly added node
- Add the node to the Jenkins master. Select Manage Jenkins => Manage Nodes => New Node
- Configure the new node using known host strategy (bcoz we already have known hosts) and add a Label MAVEN.
- Add the credential username with password.
- Now lets try to build a java application on this NOde
- Create new Jenkins Freestyle project and restrict where this project is built in General Section
- Configure the other sections to have build steps and click on build now
- Add a Centos node to Jenkins master
Adding Downstream Jobs to Jenkins Job
- Downstream job is job which gets executed after completion of other job (eg: job A completion triggers Job B, B is Downstream to A and A is upstream to B)
- Navigate to post build sections and select as shown below
- Enter the project name that has to be executed