Jenkins job’s build name would be named with the numeric number by default in increment manner. After configuring the Jenkins job, the first build job would be named as “1”, the second job would be named as “2” and so on. Most of the cases, no one prefers to change the default build naming algorithm. In some cases, if you are using Jenkins for infrastructure automation or would like to carry each job execution with valid request/incident number, then you need to install build name setter plugin to achieve it. Let’s walk through how to configure the build name setter plugin and use it for jobs.
1. Login to Jenkins as administrator.
2. Click on Manage Jenkins from the Home page.
3. Click on “Manage Plugins” and search for Build Name setter plugin from “Available” tab.
4. Select the plugin and click on “Install without restart”.
5. Click on “configure” Job.
6. You must create the parameter to enable the build Name setter. Configure the job with Request Number / Incident Number input variable.
6. Enable the Build name setter and provide the variable reference. Save the job.
7. Trigger the build to validate our work. The job will prompt for Request Number / Incident number. Enter the Request number.
8. Once the job is completed, you could see that build number with request number which we have passed.
10. Build number would be helpful for auditing purpose.
At the same time, you can’t keep the artifacts within Jenkins for a long time to avoid the slowness. In upcoming articles, we will see that how to get rid of the old build jobs and how to store artifacts in the local filesystem or remote system.
Hope this article is informative to you. Share it! Comment it!! Be Sociable !!!
Leave a Reply