Class SCMSkipTools
java.lang.Object
net.plavcak.jenkins.plugins.scmskip.SCMSkipTools
-
Method Summary
Modifier and TypeMethodDescriptionstatic voiddeleteBuild(AbstractBuild<?, ?> build) Deletes given build.static voidDeletes given build.static booleaninspectChangeSetAndCause(Run<?, ?> run, SCMSkipMatcher matcher, TaskListener listener) Inspects build for matched pattern in changelog and user cause.static booleanisBuildToDelete(Run<?, ?> run) static voidStops a build.static voidtagRunForDeletion(Run<?, ?> run, boolean deleteBuild)
-
Method Details
-
deleteBuild
Deletes given build.- Parameters:
build- build to delete- Throws:
IOException- if build cannot be deleted
-
deleteRun
Deletes given build.- Parameters:
run- build to delete- Throws:
IOException- if build cannot be deleted
-
tagRunForDeletion
- Throws:
IOException
-
isBuildToDelete
-
inspectChangeSetAndCause
public static boolean inspectChangeSetAndCause(Run<?, ?> run, SCMSkipMatcher matcher, TaskListener listener) Inspects build for matched pattern in changelog and user cause.- Parameters:
run- current buildmatcher- matcher objectlistener- runtime listener- Returns:
- true if at least one entry matched and build not started by user
-
stopBuild
public static void stopBuild(Run<?, ?> run) throws IOException, jakarta.servlet.ServletException, org.jenkinsci.plugins.workflow.steps.FlowInterruptedExceptionStops a build.- Parameters:
run- run to be terminated- Throws:
IOException- may throw AbortException specifically to terminate buildjakarta.servlet.ServletException- when build stopping failsorg.jenkinsci.plugins.workflow.steps.FlowInterruptedException- to terminate pipeline build
-