Reputation: 1023
I know there is a Keep this build forever
button on Jenkins. I have a question with respect to this:
I have a configuration consisting of one main job and many sub-jobs (split across various phases). I would like to know if I click on the button in the main job, whether the artefacts in the sub-jobs are also stored permanently or not? Or should I go into each sub-job and keep clicking the button?
Upvotes: 4
Views: 11631
Reputation: 384
It is enough in each of the (sub) job's pipeline or groovy script to write 'currentBuild.rawBuild.keepLog(true)'
Upvotes: 2
Reputation: 324
There is no out-of-the-box solution.
You need a custom System Groovy script for this.
E.g. we do it this way:
Upvotes: 0
Reputation: 10382
This option only affects the current job.
If you want to keep your artifacts and build information for all the sub-jobs, you have to click on the "keep this build forever" for each one.
Upvotes: 3