Quantcast
Channel: Lingesh, Author at UnixArena
Viewing all articles
Browse latest Browse all 369

Jenkins – Rename Build Job Names – Build Name setter

$
0
0

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.

Manage Jenkins
Manage Jenkins

 

3. Click on “Manage Plugins” and search for Build Name setter plugin from “Available” tab.

Manage Plugins - Jenkins
Manage Plugins – Jenkins

 

4. Select the plugin and click on “Install without restart”.

Select Build Name Setter Plugin
Select the Build Name Setter Plugin

 

5. Click on “configure” Job.

Configure Job - Jenkins
Configure Job – Jenkins

 

6. You must create the parameter to enable the build Name setter. Configure the job with Request Number / Incident Number input variable.

Parameter - Capture Variable to set Build Number
Parameter – Capture Variable to set Build Number

 

6. Enable the Build name setter and provide the variable reference. Save the job.

Enable Build Name setter - variable sub
Enable Build Name setter – variable sub

 

7.  Trigger the build to validate our work. The job will prompt for Request Number / Incident number. Enter the Request number.

Trigger Build - Enter Request number
Trigger Build – Enter Request number

 

8. Once the job is completed, you could see that build number with request number which we have passed.

Build Job - Renamed with Request Number
Build Job – Renamed with Request Number

 

10. Build number would be helpful for auditing purpose.

Build Job - Build Name setter Result
Build Job – Build Name setter Result

 

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 !!!

The post Jenkins – Rename Build Job Names – Build Name setter appeared first on UnixArena.


Viewing all articles
Browse latest Browse all 369

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>