How to remove archival artifact from jenkins?

1) I am using Jenkins with tomcat. I am using jenkins cli from java class to create work and build. I want to delete the archive file with the archive . How to do it?

2) another question: can we specify a specific name for the assembly in jenkins (for example), I want the assembly name to be (buildNumber + someName) . How to achieve this?

Thanks.

+4
source share
1 answer

The artifacts for the assembly are located by default at: [JENKINS_HOME]/jobs/[job_name]/builds/[$BUILD_ID]/archive/ , go there and delete it. However, it will not remove the link to the artifact from the assembly page. (If you do not know where your JENKINS_HOME is located, go to http://[jenkins_server]/configure , you will see the home directory at the top of the page).

To change the display name of the assembly, try the Set Name Setter Plugin .

To change the display name through the CLI:

 java -jar jenkins-cli.jar -s http://[server]/ set-build-display-name [job_name] [build#] [new_name] 
+3
source

Source: https://habr.com/ru/post/1398955/


All Articles