is there a way in hudson or with any plugins to archive artifacts from the last X number of successful builds?

StackOverflow https://stackoverflow.com/questions/4866970

Question

i see options to either only archive artifacts from all builds, or only the artifacts from the last successful build. is there any way or with a plugin to say archive the artifacts from the last 10 successful builds?

thanks

Was it helpful?

Solution

Actually to keep a given number of artifacts you must select "Discard old builds" (at the very beginning of the configuration page) and input the number of build artifacts to archives. You can also consider the number of days to keep.

You can set a build be kept forever, either manually or by plugin with an automated 'release' or 'promoted' build.

I agree this is confusing.

OTHER TIPS

The artifacts are archived when the build is done. So I don't know how you want to "archive from all builds"?

Nevertheless, when you are in your job configuration, go to "Discard Old Builds" (somewhere at the beginning of the page) and click Advanced button. There you will have the option to configure how long you want to keep your build artifacts, without deleting the run itself. If you go for number of builds, the last x builds will have their artifacts archived. If the last ten builds failed. You kind of have a problem.

Another option would be to go to the Advanced section of "Archive the artifacts" and check "Discard all but the last successful/stable artifact to save disk space".

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top