Configuring Jenkins Node with username and ssh key
- Create a new redhat vm
- Enable password authentication for the redhat vm
- Create a jenkins user with sudo permissions
- Install jdk 11 and maven on redhat vm
sudo dnf install java-11-openjdk-devel maven -y
- Now login into jenkins server/master as jenkins user and create a key-pair
ssh-keygen

- Now copy the ssh-key (public-key) to redhat node using ssh-copy-id

- Now jenkins master can login into redhat node with username
- Now lets configure the jenkins node (redhat) from manage nodes

- Now we know how to add linux machines as nodes to the jenkins server using ssh.
When to build the project?
- In jenkins we can configure when to build the project using Build Triggers section

- Build after other project is build will lead to upstream and downstream jobs

- Build periodically helps us in running jenkins job periodically like a cron job or scheduler. To configure this jenkins periodic builds the use cases might be
- Build the project once in every hour
- Build the project on every friday at 11:00 PM
- To configure Build Periodically we will have a cron sequence
MINUTE HOUR DOM MONTH DOW
* * * * * => every minute
- For working with cron expression Refer Here
- Configure the job to run every hour

- Poll SCM => will build the project when there are some changes in the git repository. To configure poll scm we need to configure how frequently jenkins will poll git repository
