Skip to content

Clean workspace fails #4

@cpitkin

Description

@cpitkin

Issue: Errors like the below happen when a build fails on the deployment stage.

19:24:56 UTC ERROR: Failed to clean the workspace
19:24:56 UTC java.io.IOException: Unable to delete '/var/lib/jenkins/jobs/Clients/jobs/<client_name>/branches/dev/workspace'. Tried 3 times (of a maximum of 3) waiting 0.1 sec between attempts.

Solution:
Since the cleanup stage happens at the beginning and end of builds it needs to be assumed that the previous build failed. We should run all builds as non-root users in the container or better yet run all builds as user jenkins. This would allow the main build process to delete the workspace without changing or requiring extra file permissions.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions