A Buildkite plugin for customizing the git clean flags. Helpful if you want to exlude directories from being removed between job runs on the same agent and pipeline.
See the git clean documentation for detailed information about all the flags available, and the git-clean-flags
buildkite-agent configuration option.
The following will clean all files between running the job (including those in .gitignore
), except for the node_modules
directory:
steps:
- commands:
- npm install
- npm test
plugins:
- git-clean#v1.0.0:
flags: "-fdqx --exclude=node_modules"
The command line arguments to pass to git clean
.
Example: "-fdqx --exclude=node_modules"
MIT (see LICENSE)