Search code examples
jenkinsucd

Exclude directory in uDeploy plugin for jenkins


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


Solution

  • 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.