-
-
Notifications
You must be signed in to change notification settings - Fork 72
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
Windows docker build ensure cleanWorkspace cleans build tmp workspace #1167
Conversation
Signed-off-by: Andrew Leonard <[email protected]>
Thank you for creating a pull request!Please check out the information below if you have not made a pull request here before (or if you need a reminder how things work). Code Quality and Contributing GuidelinesIf you have not done so already, please familiarise yourself with our Contributing Guidelines and Code Of Conduct, even if you have contributed before. TestsGithub actions will run a set of jobs against your PR that will lint and unit test your changes. Keep an eye out for the results from these on the latest commit you submitted. For more information, please see our testing documentation. In order to run the advanced pipeline tests (executing a set of mock pipelines), it requires an admin to post |
Signed-off-by: Andrew Leonard <[email protected]>
run tests |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. This looks to do the correct thing when the workspace directory is owned by the user in the container's host system due to a problematic earlier run. Noting that for this to be effective CLEAN_WORKSPACE
needs to be set to true
so perhaps we should also consider changing that to be the default in the PR tester.
Signed-off-by: Andrew Leonard <[email protected]>
Signed-off-by: Andrew Leonard <[email protected]>
PR TESTER RESULT ❎ Some pipelines failed or the job was aborted! ❎ |
Signed-off-by: Andrew Leonard <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I'm reading updates to this PR correctly it's masking some errors and just printing a warning now instead, so potentially continuing even if things aren't being cleaned up, therefore there seems to be a risk of running the builds with out of date things in the workspace.
I feel we should be aborting if such a condition occurs generally - is there a reason to mask the cleanup failure?
Also bear in mind that in the block around rm -rf
that is a command that cannot return a failure error code, so I don't believe the catch block can be triggered.
@sxa Note this is "post-build" cleanup if cleanWorkspaceAfter=true, which I believe will always fail for docker as the ci-jenkins-pipelines|temurin-build repo checkout is done by host, also note the hidden file cleanup was already within a catch clause Note the outer catch can be for a Jenkins context.timeout |
Co-authored-by: Stewart X Addison <[email protected]>
Co-authored-by: Stewart X Addison <[email protected]>
Co-authored-by: Stewart X Addison <[email protected]>
run tests |
Hmm apparently it does specifically in the |
Fair point. I'm now not so convinced it should have the |
yeah good point, i'll change to WARNING |
Signed-off-by: Andrew Leonard <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
run tests |
PR TESTER RESULT ✅ All pipelines passed! ✅ |
For Windows which builds within a tmp workspace, ensure when CLEAN_WORKSPACE is specified it is honoured.
ci-jenkins-pipelines/pipelines/build/common/openjdk_build_pipeline.groovy
Line 2190 in 207bcc8
Also, changed pr-tester default setting to cleanWorkspace prior to tester builds, which should now ensure windows host cleans workspace before container build
Some test builds: