Class ImageBuildScanner
java.lang.Object
hudson.tasks.BuildStepCompatibilityLayer
hudson.tasks.Builder
org.jenkinsci.plugins.cortexcloud.builder.AbstractBuildScanner
org.jenkinsci.plugins.cortexcloud.builder.ImageBuildScanner
- All Implemented Interfaces:
ExtensionPoint,Describable<Builder>,BuildStep,SimpleBuildStep
Build step that scans a container image with the Cortex CLI.
This is the Cortex replacement for the legacy prismaCloudScanImage step. It
works identically in freestyle jobs (added as a Build Step) and in Pipeline
via its @Symbol:
cortexScanImage image: 'myrepo/app:1.2.3'
Pass/fail gating is driven by the CLI exit code (0 = pass, 1 = policy fail,
other = error); when isFailBuildOnPolicyViolation() is enabled (the default) a
policy fail or error aborts the build. Either way a ScanResultAction is
attached so the findings are visible on the build page.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classDescriptor for ImageBuildScanner.Nested classes/interfaces inherited from interface hudson.tasks.BuildStep
BuildStep.PublisherListNested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudsonNested classes/interfaces inherited from interface jenkins.tasks.SimpleBuildStep
SimpleBuildStep.LastBuildAction, SimpleBuildStep.LastBuildActionFactory -
Field Summary
Fields inherited from interface hudson.tasks.BuildStep
BUILDERS, PUBLISHERS -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetImage()voidvoidsetDockerHost(String dockerHost) voidsetScanName(String scanName) voidsetSeverityThreshold(Severity severityThreshold) voidvoidsetUploadMode(String uploadMode) Methods inherited from class org.jenkinsci.plugins.cortexcloud.builder.AbstractBuildScanner
abort, getTimeout, isFailBuildOnPolicyViolation, isFailOnUnparseableResults, resolveEnvs, setFailBuildOnPolicyViolation, setFailOnUnparseableResults, setTimeout, timeoutSecondsOrNullMethods inherited from class hudson.tasks.Builder
all, getDescriptor, getRequiredMonitorService, prebuildMethods inherited from class hudson.tasks.BuildStepCompatibilityLayer
getProjectAction, getProjectAction, getProjectActions, perform, perform, prebuildMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface hudson.tasks.BuildStep
getProjectAction, getProjectActions, getRequiredMonitorService, perform, prebuildMethods inherited from interface jenkins.tasks.SimpleBuildStep
perform, perform, requiresWorkspace
-
Constructor Details
-
ImageBuildScanner
-
-
Method Details
-
getImage
-
getDockerHost
-
setDockerHost
-
getScanName
-
setScanName
-
getSource
-
setSource
-
getUploadMode
-
setUploadMode
-
getSeverityThreshold
-
perform
public void perform(@NonNull Run<?, ?> run, @NonNull FilePath workspace, @NonNull EnvVars env, @NonNull Launcher launcher, @NonNull TaskListener listener) throws InterruptedException, IOException- Throws:
InterruptedExceptionIOException
-