I am using the Clone Workspace SCM plugin in a build pipeline (see this related question). It is configured to include **/*
.
The plugin does not copy the .git
directory or the .gitignore
and .gitattributes
files. I need the .git
directory for one of the jobs in the pipeline and I cannot use the git SCM directly, because then the job would get triggered by push events and I don't want that. (see linked question)
So how do I tell the Clone Workspace SCM to include the .git
directory?
I tried with **/*,.git/
but that didn't work.
To answer my own question:
The Clone Workspace SCM apparently uses something called the "Ant default excludes". I found the answer in this SO answer that points to the Apache Ant docs.
**/.git
**/.git/**
**/.gitattributes
**/.gitignore
are part of the default excludes.
Fortunately the Clone Workspace SCM plugin has a checkbox Override Default Ant Excludes. Enable that, problem solved!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With