Class SCMSkipTools

java.lang.Object
net.plavcak.jenkins.plugins.scmskip.SCMSkipTools

public class SCMSkipTools extends Object
  • Method Details

    • 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)
      Inspects build for matched pattern in changelog and user cause.
      Parameters:
      run - current build
      matcher - matcher object
      listener - 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.FlowInterruptedException
      Stops a build.
      Parameters:
      run - run to be terminated
      Throws:
      IOException - may throw AbortException specifically to terminate build
      jakarta.servlet.ServletException - when build stopping fails
      org.jenkinsci.plugins.workflow.steps.FlowInterruptedException - to terminate pipeline build