-
-
Notifications
You must be signed in to change notification settings - Fork 306
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Always Clean Workspace after build #567
Conversation
Marking as WIP to give time for discussion. |
In general if test fails the build status is |
I agree with your first 2 sentences. I'm not sure I see the value the workspace will provide in the cases where a test has failed hard. The situations I can think of when a hard failure will occur:
Unless I'm missing a use case, I don't see the value in keeping or archiving the workspace in any of these. Maybe there's a case where a failed test will actually cause the test harness to fall over? The issue I'm trying to solve is machines running out of space because test workspaces getting left behind. |
- Wrap all steps in try/finally. - Move CleanWs to finally block. - Wrap clean in an IF that skips clean if KEEP_WORKSPACE is set to true - This ensures CleanWs always runs even if the build has failed a step. - This also reverts adoptium#320 which stopped the clean from running if the build failed. - Proper archiving should ensure we don't need to leave workspaces around for test failure investigation. Signed-off-by: Adam Brousseau <adam.brousseau88@gmail.com>
I would suggest to have a flag added in finally block, so that we can turn on and off to fit different needs. |
055fdb1
to
72da4de
Compare
Updated with |
the build has failed a step.
clean from running if the build failed.
to leave workspaces around for test failure
investigation.
Signed-off-by: Adam Brousseau adam.brousseau88@gmail.com