Jenkins
Last updated
Last updated
Download
JENKINS_HOME stores the project instance
nohup is used to run the Jenkins in BG after the command exists
we used the 9090 port as an example, the user can set any available port.
On the success of the above command, you will see the Jenkins instance at
Set up nodes for the available machines. You have to make them passwordless login. Set the number of executors for each node to more number.
You can assign "labels" to a group of nodes. Labels give flexibility to jobs for picking from a group of host machines.
You can have Linux and windows nodes co-exist in the same jenkins instance.
The allure tool has to be pointed in the Jenkins GLobal level setup
pipeline library should be added with a unique name, it will be referenced later using this name in scripts
There are many valuable plugins from Jenkins.
Allure, Junit plugins
The Jenkins server runs on a single core, its RAM consumption will be based on the number of jobs and their instances within it. Archiving Jobs and artefacts slow the Jenkins instance. It is advisable to reduce the number of jobs to keep it to a minimum ( 10 ).
Force quitting Jenkins is not recommended, it leaves many zombie processes. It is advisable to cancel once and wait for graceful termination.
Declarative Pipeline
Notes:
For continuous Job submission with identical parameters, Jenkins will omit the queue and builds only one. We added a unique id for each job to overcome it, ensuring the queue jobs are run without lapsing.
: To store the artefacts generated in Jenkins Server
: to get the BUILD_USER and other info
: Set custom names to build instances
: Better Visualization of the pipeline jobs
: Adds Time stamp to Jenkins console log
: Add colour prints to the Console
: Trigger a jenkins job whenever the timestamp of the file gets changed.