Class IgnoreCommitterStrategy
java.lang.Object
hudson.model.AbstractDescribableImpl<jenkins.branch.BranchBuildStrategy>
jenkins.branch.BranchBuildStrategy
au.com.versent.jenkins.plugins.ignoreCommitterStrategy.IgnoreCommitterStrategy
- All Implemented Interfaces:
ExtensionPoint
,Describable<jenkins.branch.BranchBuildStrategy>
public class IgnoreCommitterStrategy
extends jenkins.branch.BranchBuildStrategy
-
Nested Class Summary
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
Constructor Summary
ConstructorDescriptionIgnoreCommitterStrategy
(String ignoredAuthors, Boolean allowBuildIfNotExcludedAuthor) -
Method Summary
Modifier and TypeMethodDescriptionDetermine if build is allowed if at least one author in the changeset is not excludedGet comma-separated list of ignored commit authorsboolean
isAutomaticBuild
(jenkins.scm.api.SCMSource source, jenkins.scm.api.SCMHead head, jenkins.scm.api.SCMRevision currRevision, jenkins.scm.api.SCMRevision lastBuiltRevision, jenkins.scm.api.SCMRevision lastSeenRevision, TaskListener listener) Determine if build is required by checking if any of the commit authors is in the ignore list and/or if changesets with at least one non excluded author are allowedMethods inherited from class jenkins.branch.BranchBuildStrategy
automaticBuild, automaticBuild, automaticBuild, getDescriptor, isAutomaticBuild, isAutomaticBuild, isAutomaticBuild, isAutomaticBuild
-
Constructor Details
-
IgnoreCommitterStrategy
-
-
Method Details
-
getIgnoredAuthors
Get comma-separated list of ignored commit authors- Returns:
- comma separated list of ignored authors
-
getAllowBuildIfNotExcludedAuthor
Determine if build is allowed if at least one author in the changeset is not excluded- Returns:
- indicates if build should be triggered if one of the authors is not in the exclude list
-
isAutomaticBuild
public boolean isAutomaticBuild(@NonNull jenkins.scm.api.SCMSource source, @NonNull jenkins.scm.api.SCMHead head, @NonNull jenkins.scm.api.SCMRevision currRevision, @CheckForNull jenkins.scm.api.SCMRevision lastBuiltRevision, @CheckForNull jenkins.scm.api.SCMRevision lastSeenRevision, @NonNull TaskListener listener) Determine if build is required by checking if any of the commit authors is in the ignore list and/or if changesets with at least one non excluded author are allowed- Specified by:
isAutomaticBuild
in classjenkins.branch.BranchBuildStrategy
- Returns:
- true if changeset does not have commits by ignored users or at least one user is not excluded and {allowBuildIfNotExcludedAuthor} is true
-