Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to delete an archieved artifact in jenkins?

  1. I am using Jenkins with tomcat. I use jenkins cli from java class to create job and to build. I want to delete a archived artifact. How to accomplish this?

  2. Another question is, can we give a specific name to the build in jenkins (e.g) i want the build name like (buildNumber + someName). How to achieve this?

like image 720
Muthu Avatar asked Feb 22 '23 07:02

Muthu


1 Answers

The artifacts for a build by default are located in: [JENKINS_HOME]/jobs/[job_name]/builds/[$BUILD_ID]/archive/, go there and delete it. It won't delete the link to the artifact from the build page, though. (If you are not sure where your JENKINS_HOME is, go to http://[jenkins_server]/configure, you'll see Home directory near the top of the page).

To change the display name of a build automatically try Build Name Setter Plugin.

To change the display name via CLI:

java -jar jenkins-cli.jar -s http://[server]/ set-build-display-name [job_name] [build#] [new_name]
like image 187
malenkiy_scot Avatar answered Feb 28 '23 00:02

malenkiy_scot