-
Notifications
You must be signed in to change notification settings - Fork 354
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
Pull Request policy for "Merging" with target polluting workspace disk space on Jenkins master with commits in detached head #847
Comments
Hi, we have the same problem on our build systems, cluttering up jenkins controller nodes in k8s as the controller workspaces do not get cleaned up. This leads to us having to perform several manual cleanups weekly. This can really 'explode' the disk usage, as we have several repos that are > 1GB with several hundreds of PR builds a day. |
The expectation is not correct, the strategy is about what checkout, Any kind of workspace cleanup are delegated to traits like |
Did you configure in your project "localBranch" trait?
This should resolve your issue. |
I don't see how this is a duplicate of JENKINS-44734. The problem there was that the detached HEAD made it more difficult to push new commits from Jenkins to Bitbucket, and the advice was to add a trait that makes Git use a named branch instead. Here, the problem is that multiple workspaces are created in the Jenkins controller and not automatically cleaned up soon enough and they consume too much disk space. How does it matter for workspace creation or cleanup whether HEAD is detached or a branch? |
If you add "checkout to local branch" trait, you can also use the "Prune stale remote-tracking branches" trait |
Jenkins and plugins versions report
Environment
What Operating System are you using (both controller, and any agents involved in the problem)?
Distributor ID: Ubuntu
Description: Ubuntu 20.04.6 LTS
Reproduction steps
@script
foldersExpected Results
Merged head being removed from the Jenkins Master after the operation is finished.
Clean Workspace commands working to remove these files from Jenkins Master.
Actual Results
Jenkins Master being cluttered with detached heads until the disc space explodes.
Anything else?
An option to clear the script workspace for configuration could help a lot.
Are you interested in contributing a fix?
There may be already a fix but I haven't seen it.
The text was updated successfully, but these errors were encountered: