Reputation: 2058
So, what I'm doing:
Build n:
Cleaning a MODULE_NAME/test-output/* in workspace explicitly with ant
Running build and tests, getting some artifacts into folder from step one
Jenkins runs archive artifacts step for MODULE_NAME/test-output/*
Now artifacts are stored in build n - works for me.
Now build n+1 launching:
Cleaning a MODULE_NAME/test-output/* in workspace explicitly with ant
Checking artifacts from build n - they're still there, as expected.
Running build and tests, getting some artifacts into workspace folder from step one...
Jenkins runs archive artifacts step for MODULE_NAME/test-output/*
Now artifacts are stored in build n+1 - works for me, if not the next.
The problems is that, for some reason, artifacts from build n are lost.
My post-build actions:
How do I keep unique artifacts for each build?
Upvotes: 0
Views: 1664
Reputation: 2026
It is happening because in Max # you mentioned 1 so it'll clean artifacts after 1 build either increase that number or just uncheck "Discard Old Builds". You can write some post build script which will clear these artifacts after certain builds.
Upvotes: 0
Reputation: 2058
Actually, the problem that bothered us for so long was in here:
Not sure if I recall this in older versions of jenkins.
I'm so confused.
Upvotes: 1