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 ClassesNested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson -
Constructor Summary
ConstructorsConstructorDescriptionIgnoreCommitterStrategy(String ignoredAuthors, Boolean allowBuildIfNotExcludedAuthor) -
Method Summary
Modifier and TypeMethodDescriptionDetermine if build is allowed if at least one author in the changeset is not excludedDetermine if only the HEAD (latest) commit should be checkedGet comma-separated list of ignored commit authorsbooleanisAutomaticBuild(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 allowedvoidsetCheckOnlyHead(boolean checkOnlyHead) Check only the latest commit instead of all commits in the changeset.Methods 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
-
setCheckOnlyHead
@DataBoundSetter public void setCheckOnlyHead(boolean checkOnlyHead) Check only the latest commit instead of all commits in the changeset.- Parameters:
checkOnlyHead- if true, then only the latest commit is checked
-
getCheckOnlyHead
Determine if only the HEAD (latest) commit should be checked- Returns:
- indicates if only the HEAD commit should be checked instead of all commits in the changeset
-
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:
isAutomaticBuildin 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
-