Class PathRestriction
- java.lang.Object
-
- hudson.model.AbstractDescribableImpl<GitSCMExtension>
-
- hudson.plugins.git.extensions.GitSCMExtension
-
- hudson.plugins.git.extensions.impl.PathRestriction
-
- All Implemented Interfaces:
Describable<GitSCMExtension>
public class PathRestriction extends GitSCMExtension
GitSCMExtensionthat ignores commits that only affects specific paths.- Author:
- Juerg Haefliger, Andrew Bayer, Kohsuke Kawaguchi
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classPathRestriction.DescriptorImpl
-
Constructor Summary
Constructors Constructor Description PathRestriction(String includedRegions, String excludedRegions)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetExcludedRegions()String[]getExcludedRegionsNormalized()StringgetIncludedRegions()String[]getIncludedRegionsNormalized()BooleanisRevExcluded(GitSCM scm, org.jenkinsci.plugins.gitclient.GitClient git, GitChangeSet commit, TaskListener listener, BuildData buildData)Given a commit found during polling, check whether it should be disregarded.booleanrequiresWorkspaceForPolling()-
Methods inherited from class hudson.plugins.git.extensions.GitSCMExtension
beforeCheckout, beforeCheckout, decorate, decorateCheckoutCommand, decorateCheckoutCommand, decorateCloneCommand, decorateCloneCommand, decorateFetchCommand, decorateFetchCommand, decorateMergeCommand, decorateMergeCommand, decorateRevisionToBuild, decorateRevisionToBuild, determineSupportForJGit, enableMultipleRevisionDetection, getDescriptor, getRequiredClient, getWorkingDirectory, getWorkingDirectory, onCheckoutCompleted, onCheckoutCompleted, onClean, populateEnvironmentVariables
-
-
-
-
Method Detail
-
requiresWorkspaceForPolling
public boolean requiresWorkspaceForPolling()
- Overrides:
requiresWorkspaceForPollingin classGitSCMExtension- Returns:
truewhen this extension has a requirement to get a workspace during polling, typically as it has to check for incoming changes, not just remote HEAD.
-
getIncludedRegions
public String getIncludedRegions()
-
getExcludedRegions
public String getExcludedRegions()
-
getExcludedRegionsNormalized
public String[] getExcludedRegionsNormalized()
-
getIncludedRegionsNormalized
public String[] getIncludedRegionsNormalized()
-
isRevExcluded
@CheckForNull public Boolean isRevExcluded(GitSCM scm, org.jenkinsci.plugins.gitclient.GitClient git, GitChangeSet commit, TaskListener listener, BuildData buildData)
Description copied from class:GitSCMExtensionGiven a commit found during polling, check whether it should be disregarded.- Overrides:
isRevExcludedin classGitSCMExtension- Parameters:
scm- GitSCM objectgit- GitClient objectcommit- The commit whose exclusion is being tested.listener- build logbuildData- build data to be used- Returns:
- true to disregard this commit and not trigger a build, regardless of what later
GitSCMExtensions say. false to trigger a build from this commit, regardless of what laterGitSCMExtensions say. null to allow otherGitSCMExtensions to decide.
-
-