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
Clean up working directories after pipeline runs #7386
Comments
@dziemba have you tried the |
Yes I am aware of this option and we're already using it. The issue is that we have a lot (>500) pipelines that run on a relatively small amount of agents. This means that even though the working dir gets cleaned up before the job runs, having the build artifacts stay on disk for this large amount of pipelines wastes a lot of disk space quicky. Thus it would be great if we can also clean up after the jobs have run. |
+1 to this issue. We are manually cleaning up the working directory in several of our pipelines to save disk space. (We also have >500 pipelines, and it isn't sufficient to just use "clean working directory".) |
This issue has been automatically marked as stale because it has not had activity in the last 90 days. |
Issue still exists as described. |
This issue has been automatically marked as stale because it has not had activity in the last 90 days. |
Issue still exists as described. |
This issue has been automatically marked as stale because it has not had activity in the last 90 days. |
Issue still exists as described. |
This issue has been automatically marked as stale because it has not had activity in the last 90 days. |
Issue still exists as described. |
This issue has been automatically marked as stale because it has not had activity in the last 90 days. |
So you’d like a “Clean working directory after uploading Artifacts “ option?
Ram
…On Wed, 21 Apr 2021 at 10:11 AM, stale[bot] ***@***.***> wrote:
This issue has been automatically marked as stale because it has not had
activity in the last 90 days.
If you can still reproduce this error on the master branch using local
development environment
<https://developer.gocd.org/current/#setting-up-your-development-environment>
or on the latest GoCD Release <https://www.gocd.org/download>, please
reply with all of the information you have about it in order to keep the
issue open.
Thank you for all your contributions.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#7386 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAF5JGRZYLXBPIXJHG3PWTDTJYX6LANCNFSM4JV4RBGQ>
.
|
@sriramnrn Yes, that's exactly it :) |
This issue has been automatically marked as stale because it has not had activity in the last 90 days. |
Telling the stale bot to not handle this issue / mark it stale. |
In my view what the GoCD pipeline model is missing is "post" type actions. I am already so badly in need of a post-job action (running after all job activities including uploading artifacts have finished) and a post-stage action (running after all jobs have completed). Such post actions may be further configured to run on success, on failure or always. |
Issue Type
Summary
When a build is finished, we should clean up the working directory to save disk space.
Basic environment details
Expected Results
When a build is finished and artifacts have been uploaded, the working directory of the pipeline should be cleaned up (
git clean -xdf
).Actual Results
The working directory is not being cleaned up. When running many different builds on one agent, we run out of disk space quickly.
Possible Fix
Add an option to the pipeline configuration that runs
git clean -xdf
or similar after a pipeline has run. We already do this before each pipeline run to ensure a clean slate.We can't easily add a generic cleanup step as a pipeline tasks because it breaks uploading artifacts (such as test reports) to the GoCD server (they will be cleaned up before they can be uploaded).
The text was updated successfully, but these errors were encountered: