-
Notifications
You must be signed in to change notification settings - Fork 948
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 work dir on self hosted agent #453
Comments
Specifically you are looking for workspace:
clean: all Yes it's all in the docs, https://docs.microsoft.com/en-us/azure/devops/pipelines/yaml-schema?view=azure-devops&tabs=schema#job jobs:
- job: string # name of the job (A-Z, a-z, 0-9, and underscore)
displayName: string # friendly name to display in the UI
workspace:
clean: outputs | resources | all # what to clean up before the job runs
steps: [ script | bash | pwsh | powershell | checkout | task | templateReference ]
... |
Yea, but according to the doc you mention "clean: all" cleans up "before" the job runs. |
In order to consolidate to fewer feedback channels, we've moved suggestions and issue reporting to Developer Community. Sorry for any confusion resulting from this move. |
Since running pre-cleanup-jobs ( I have created https://github.com/EugenMayer/azure-agent-self-hosted-toolkit which fixes this project on the agent-level, not requiring any changes to the pipelines nor relying on those. To quote to project idea
This repository also offers a toolkit to start / setup x-agents and maintain them using the original tools of Microsoft, but wrapped in convenient scripts. If this helps anybody else, happy to share it. |
My pipeline build on my self hosted agent creates incremental folders in the _work directory (1, 2, 3 etc). These eventually fill up my hard disk as they are not cleaned after pipeline completion. I suspect I can add a final task to clean up but I can not find any documentation on how to do this.
Any suggestion, pointers or documentation?
The text was updated successfully, but these errors were encountered: