Class AbstractBuildScanner

java.lang.Object
hudson.tasks.BuildStepCompatibilityLayer
hudson.tasks.Builder
org.jenkinsci.plugins.cortexcloud.builder.AbstractBuildScanner
All Implemented Interfaces:
ExtensionPoint, Describable<Builder>, BuildStep, SimpleBuildStep
Direct Known Subclasses:
ImageBuildScanner

public abstract class AbstractBuildScanner extends Builder implements SimpleBuildStep
Common base for Cortex Cloud build steps.

ImageBuildScanner is currently the only concrete step. Additional scan steps are planned, and they will share the options defined here (policy-violation gating, handling of unparseable results, timeout) and the environment-expansion and abort helpers. The base class keeps that behaviour consistent across steps.

  • Constructor Details

    • AbstractBuildScanner

      protected AbstractBuildScanner()
  • Method Details

    • isFailBuildOnPolicyViolation

      public boolean isFailBuildOnPolicyViolation()
    • setFailBuildOnPolicyViolation

      @DataBoundSetter public void setFailBuildOnPolicyViolation(boolean failBuildOnPolicyViolation)
    • isFailOnUnparseableResults

      public boolean isFailOnUnparseableResults()
    • setFailOnUnparseableResults

      @DataBoundSetter public void setFailOnUnparseableResults(boolean failOnUnparseableResults)
    • getTimeout

      public int getTimeout()
    • setTimeout

      @DataBoundSetter public void setTimeout(int timeout)
    • timeoutSecondsOrNull

      protected Integer timeoutSecondsOrNull()
      Returns:
      the configured timeout as a positive Integer, or null for "use CLI default".
    • resolveEnvs

      protected String resolveEnvs(String value, Run<?,?> run, TaskListener listener) throws IOException, InterruptedException
      Expands $VAR / ${VAR} references in a step parameter using the build environment, matching the legacy plugin's resolveEnvs behaviour.
      Throws:
      IOException
      InterruptedException
    • abort

      protected static void abort(String message) throws AbortException
      Aborts the build with a clear message (turns the build red).
      Throws:
      AbortException