Exclude directory in uDeploy plugin for jenkins

1.7k views Asked by At

I'm trying to import a new version of a udeploy component through Jenkins and the uDeploy plugin that comes from a Git repository and has the .git folder in it. Everything I've tried to exclude the .git folder from syncing doesn't work. I'm thinking that the plugin is looking for files with a .git extension rather than folder. How do I exclude the .git folder form syncing?

I tried ".git", **/.git/, *.git/*, **.git/*, and a handful of other 'terms' and they all show up in the console output as:

Working Directory: C:\Program Files (x86)\Jenkins\jobs\DIT Com\workspace Includes: **/ Excludes: ".git" Uploading files in C:\Program Files (x86)\Jenkins\jobs\DIT Com\workspace Uploading: .git/hooks/pre-commit.sample ... Uploading: .git/refs/heads Files committed Finished: SUCCESS

This is what the exclude section looks like, with the help bubble clicked (that's what's in the gray box) enter image description here

3

There are 3 answers

0
Devesh On BEST ANSWER

Unable to comment so adding as an answer-


Two consecutive asterisks ("**") in patterns matched against full pathname may have special meaning:

A leading "**" followed by a slash means match in all directories. For example, "**/foo" matches file or directory "foo" anywhere, the same as pattern "foo". "**/foo/bar" matches file or directory "bar" anywhere that is directly under directory "foo".

A trailing "/**" matches everything inside. For example, "abc/**" matches all files inside directory "abc", relative to the location of the .gitignore file, with infinite depth.

A slash followed by two consecutive asterisks then a slash matches zero or more directories. For example, "a/**/b" matches "a/b", "a/x/b", "a/x/y/b" and so on.

Other consecutive asterisks are considered invalid.

1
Devesh On

Have you tried a regular expression? say, ^/.*/.git/

0
pcort On

Looks like the answer to excluding directories is in the form of **/dir_name/**.

If someone could give some more information on what the leading *'s are doing (not sure how the second * wildcard interacts, nor the trailing second *) I would be really interested in understanding why it works!

reference: ant fileset dir exclude certain directory