jenkinsci / jenkinsci/git-plugin
[JENKINS-27211] Please add ability to use the git 'clean' options AFTER job execution
- Dominant language
- Java
- Stars
- 694
- Forks
- 1.1k
- Avg merge
- 1h 29m
- Merged PRs (30d)
- 3
Description
I would love to be able to have my jobs automatically return the workspace to a clean state after execution - but otherwise leave the cloned repo present at the end of a job automatically. I could do this myself in a post step, but seems like it would be nice to be able to just define this in the SCM section and have it done automatically.
Even better would be ability to say "Clean after job, if:
{stable|unstable|failed}
" - to allow leaving the workspace around for examination if the job fails, but otherwise clean when done.
---
Originally reported by
nneul, imported from: Please add ability to use the git 'clean' options AFTER job execution
Raw content of original issue
I would love to be able to have my jobs automatically return the workspace to a clean state after execution - but otherwise leave the cloned repo present at the end of a job automatically. I could do this myself in a post step, but seems like it would be nice to be able to just define this in the SCM section and have it done automatically.
Even better would be ability to say "Clean after job, if:
{stable|unstable|failed}" - to allow leaving the workspace around for examination if the job fails, but otherwise clean when done.
Contributor guide
Assessment
This issue has not been assessed yet.