-
Notifications
You must be signed in to change notification settings - Fork 6
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
jenkins: fix cleanup permission issue #19
Conversation
a183af9
to
4f22f62
Compare
2d8d1ea
to
ecebe21
Compare
ecebe21
to
bd869c1
Compare
@halkyon I wanted to suggest you as reviewer but you're not in the storj-thirdparty org |
bd869c1
to
afe0189
Compare
Replace build.sh script by Makefile (god help us) so part of it can be run on a different platform or container. The new release contains 2 binaries, one for each of the supported platforms. I tested this on a Dragonboard 410c.
afe0189
to
976f383
Compare
} | ||
post { | ||
always { | ||
cleanWs() |
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.
post
code isn't guaranteed to run due to issues within Jenkins
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.
Stefan showed me that cleanup is done by https://plugins.jenkins.io/resource-disposer/ but this fails and he has to do it manually, so therefor this PR exists.
What do you suggest? I don't see harm in leaving cleanWs()
here.
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.
storj/storj does a delete before running: https://github.com/storj/storj/blob/main/Jenkinsfile.public#L23
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.
storj/storj is forced to do that, because it leaves behind files in the workspace with root owner, which can only be removed by the root user.
After this PR uplink-php doesn't have that problem. Normal cleanup should work.
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.
The cleanup failed due to a timeout / jenkins crash not due to the permissions part.
Don't run commands as root so cleanup can take place.
On top of #14 to preempt conflicts.
Fixes #17