Class SCMSkipTools
- java.lang.Object
-
- net.plavcak.jenkins.plugins.scmskip.SCMSkipTools
-
public class SCMSkipTools extends Object
-
-
Constructor Summary
Constructors Constructor Description SCMSkipTools()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
deleteBuild(AbstractBuild<?,?> build)
Deletes given build.static void
deleteRun(Run<?,?> run)
Deletes given build.static boolean
inspectChangeSetAndCause(Run<?,?> run, SCMSkipMatcher matcher, TaskListener listener)
Inspect build for matched pattern in changelog and user cause.static boolean
isBuildToDelete(Run<?,?> run)
static void
stopBuild(Run<?,?> run)
static void
tagRunForDeletion(Run<?,?> run, boolean deleteBuild)
-
-
-
Method Detail
-
deleteBuild
public static void deleteBuild(AbstractBuild<?,?> build) throws IOException
Deletes given build.- Parameters:
build
- build to delete- Throws:
IOException
- if build cannot be deleted
-
deleteRun
public static void deleteRun(Run<?,?> run) throws IOException
Deletes given build.- Parameters:
run
- build to delete- Throws:
IOException
- if build cannot be deleted
-
tagRunForDeletion
public static void tagRunForDeletion(Run<?,?> run, boolean deleteBuild) throws IOException
- Throws:
IOException
-
isBuildToDelete
public static boolean isBuildToDelete(Run<?,?> run)
-
inspectChangeSetAndCause
public static boolean inspectChangeSetAndCause(Run<?,?> run, SCMSkipMatcher matcher, TaskListener listener)
Inspect 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, javax.servlet.ServletException, org.jenkinsci.plugins.workflow.steps.FlowInterruptedException
- Parameters:
run
- run to be terminated- Throws:
IOException
- may throw AbortException specifically to terminate buildjavax.servlet.ServletException
- when build stopping failsorg.jenkinsci.plugins.workflow.steps.FlowInterruptedException
- to terminate pipeline build
-
-