Avoid to keep artifacts on the Jenkins master after were deployed via hudson.maven.RedeployPublisher

Issue

  • Artifacts are stored on the Jenkins master after the artifacts were deployed to Nexus via the hudson.maven.RedeployPublisher.
  • You are getting out of disk-space on the master.

Environment

  • CloudBees Jenkins Enterprise
  • Maven plugin

Resolution

hudson.maven.RedeployPublisher requires to archive artifacts. It is by design and was (perhaps always is) necessary to archive artifacts on master to re-deploy them from hudson.maven.RedeployPublisher.

That’s why disabling archiving (<archivingDisabled>true</archivingDisabled>) breaks it.

The only option is to use hudson.maven.RedeployPublisher and to reduce the storage is to reduce the number of archived artifact to 1 (<artifactNumToKeep>1</artifactNumToKeep>).

Additional notes:

  • You can use the Slicing configuration plugin to update the value of artifactNumToKeep all jobs
  • The cleanup of old artifacts is done at the beginning or the end of each build thus you’ll have to wait to have the build launched to do the cleanup (or you can manually trigger it if you have the simple disk usage plugin)
Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.