Rename jobs from jenkins file

+1 vote

I am trying to do a poc of jenkins pipeline as code. Is there a way to explicitly define the names for the pipeline jobs that get from Jenkinsfile? I also want to add some descriptions for the jobs

Jul 3, 2018 in Jenkins by Hannah
• 14,080 points

3 answers to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
0 votes

Following script in pipeline will do that(this requires appropriate permissions)

item = Jenkins.instance.getItemByFullName("originalJobName")

item.setDescription("This description was changed by script")


answered Jul 3, 2018 by Kalgi
• 35,800 points
0 votes

You can rename selected job through jenkins UI by following these steps:

job>configure>Advanced Project Options>Display Name

Other way is to rename the directory on the Jenkins/hudson server and then restart the Jenkins.

answered Oct 25, 2018 by John
0 votes

Go to the Configure screen and edit the Project name field right on top. Then click on Save and confirm by clicking on Yes.

answered Oct 25, 2018 by Laila

Related Questions In Jenkins

+2 votes
5 answers
0 votes
2 answers
0 votes
1 answer

Ansible or Jenkins pipelines for bigger jobs

Well, you are indeed well aware of ...READ MORE

answered Jun 16, 2018 in Jenkins by shubham
• 6,480 points
+2 votes
6 answers
+13 votes
2 answers
0 votes
1 answer
+5 votes
5 answers

Jenkins properties file

Follow these steps: 1. Install ‘EnvInject’ plug-in in the Jenkins ...READ MORE

answered Aug 2, 2018 in Jenkins by lina
• 8,100 points
+1 vote
5 answers

Is it possible to shift or move jobs between two jenkins servers?

There are some Jenkins plugins out there ...READ MORE

answered Oct 25, 2018 in Jenkins by akaash

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.