-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
25778dd
commit 637ccde
Showing
6 changed files
with
176 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 37 additions & 0 deletions
37
...va/org/jenkinsci/plugins/osfbuildersuiteforsfcc/dataimport/repeatable/IncludePattern.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
package org.jenkinsci.plugins.osfbuildersuiteforsfcc.dataimport.repeatable; | ||
|
||
import hudson.Extension; | ||
import hudson.model.Describable; | ||
import hudson.model.Descriptor; | ||
import jenkins.model.Jenkins; | ||
import org.kohsuke.stapler.DataBoundConstructor; | ||
|
||
import java.io.Serializable; | ||
|
||
public class IncludePattern implements Serializable, Describable<IncludePattern> { | ||
|
||
private final String includePattern; | ||
|
||
@DataBoundConstructor | ||
public IncludePattern(String includePattern) { | ||
this.includePattern = includePattern; | ||
} | ||
|
||
public String getIncludePattern() { | ||
return includePattern; | ||
} | ||
|
||
@Override | ||
public DescriptorImpl getDescriptor() { | ||
return (DescriptorImpl) Jenkins.get().getDescriptor(getClass()); | ||
} | ||
|
||
@Extension | ||
public static final class DescriptorImpl extends Descriptor<IncludePattern> { | ||
|
||
@Override | ||
public String getDisplayName() { | ||
return "OSF Builder Suite For Salesforce Commerce Cloud :: Data Import (IncludePattern)"; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
...enkinsci/plugins/osfbuildersuiteforsfcc/dataimport/repeatable/IncludePattern/config.jelly
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<?jelly escape-by-default='true'?> | ||
<j:jelly xmlns:j="jelly:core" xmlns:f="/lib/form"> | ||
<f:textbox field="includePattern" /> | ||
</j:jelly> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
<div> | ||
List of patterns to be included. If a path matches any of the patterns in this list then it will be added to | ||
the build. | ||
<br> | ||
The pattern needs to be relative to the source path defined above. | ||
<br> | ||
<br> | ||
When a path is matched against a pattern, the following special characters can be used: | ||
<ul> | ||
<li> | ||
<tt>?</tt> | ||
<br> | ||
Matches one character (any character except path separators) | ||
</li> | ||
<li> | ||
<tt>*</tt> | ||
<br> | ||
Matches zero or more characters (not including path separators) | ||
</li> | ||
<li> | ||
<tt>**</tt> | ||
<br> | ||
Matches zero or more path segments | ||
</li> | ||
</ul> | ||
|
||
Examples: | ||
<ul> | ||
<li> | ||
<tt>**/*.js</tt> | ||
<br> | ||
Matches all .js files/dirs in a directory tree | ||
</li> | ||
<li> | ||
<tt>node_modules/**</tt> | ||
<br> | ||
Matches the node_modules folder and all its contents | ||
</li> | ||
<li> | ||
<tt>test/a??.js</tt> | ||
<br> | ||
Matches all files/dirs which start with an <tt>a</tt>, then two more characters and then <tt>.js</tt>, | ||
in a directory called test | ||
</li> | ||
<li> | ||
<tt>**</tt> | ||
<br> | ||
Matches everything in a directory tree | ||
</li> | ||
<li> | ||
<tt>**/test/**/XYZ*</tt> | ||
<br> | ||
Matches all files/dirs which start with <tt>XYZ</tt> and where there is a parent directory called | ||
<tt>test</tt> (e.g. <tt>abc/test/def/ghi/XYZ123</tt>) | ||
</li> | ||
</ul> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters