Package io.prismacloud.iac.jenkins
Class TemplateScanBuilder
- java.lang.Object
-
- hudson.tasks.BuildStepCompatibilityLayer
-
- hudson.tasks.Builder
-
- io.prismacloud.iac.jenkins.TemplateScanBuilder
-
- All Implemented Interfaces:
ExtensionPoint
,Describable<Builder>
,BuildStep
,SimpleBuildStep
public class TemplateScanBuilder extends Builder implements SimpleBuildStep
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
TemplateScanBuilder.Descriptor
Below method is used to display the plugin name on the Jenkins User interface-
Nested classes/interfaces inherited from interface hudson.tasks.BuildStep
BuildStep.PublisherList
-
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
Nested classes/interfaces inherited from interface jenkins.tasks.SimpleBuildStep
SimpleBuildStep.LastBuildAction, SimpleBuildStep.LastBuildActionFactory
-
-
Field Summary
-
Fields inherited from interface hudson.tasks.BuildStep
BUILDERS, PUBLISHERS
-
-
Method Summary
-
Methods inherited from class hudson.tasks.Builder
all, getDescriptor, getRequiredMonitorService, prebuild
-
Methods inherited from class hudson.tasks.BuildStepCompatibilityLayer
getProjectAction, getProjectAction, getProjectActions, perform, perform, prebuild
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface hudson.tasks.BuildStep
getProjectAction, getProjectActions, getRequiredMonitorService, perform, prebuild
-
-
-
-
Method Detail
-
getAssetName
public String getAssetName()
-
setAssetName
public void setAssetName(String assetName)
-
getTemplateType
public String getTemplateType()
-
setTemplateType
public void setTemplateType(String templateType)
-
getTemplateVersion
public String getTemplateVersion()
-
setTemplateVersion
public void setTemplateVersion(String templateVersion)
-
getTags
public String getTags()
-
setTags
public void setTags(String tags)
-
getFailureCriteriaHigh
public String getFailureCriteriaHigh()
-
setFailureCriteriaHigh
public void setFailureCriteriaHigh(String failureCriteriaHigh)
-
getFailureCriteriaMedium
public String getFailureCriteriaMedium()
-
setFailureCriteriaMedium
public void setFailureCriteriaMedium(String failureCriteriaMedium)
-
getFailureCriteriaLow
public String getFailureCriteriaLow()
-
setFailureCriteriaLow
public void setFailureCriteriaLow(String failureCriteriaLow)
-
getFailureCriteriaOperator
public String getFailureCriteriaOperator()
-
setFailureCriteriaOperator
public void setFailureCriteriaOperator(String failureCriteriaOperator)
-
perform
public void perform(@Nonnull Run build, @Nonnull FilePath workspace, @Nonnull Launcher launcher, @Nonnull TaskListener listener)
Below method is triggered when jenkins build is triggered.- Specified by:
perform
in interfaceSimpleBuildStep
-
createZipFile
protected boolean createZipFile(FilePath sourceFolder, FilePath destinationFile) throws IOException, InterruptedException
- Throws:
IOException
InterruptedException
-
callPrismaCloudAsyncEndPoint
public String callPrismaCloudAsyncEndPoint(FilePath filePath, TaskListener listener, EnvVars envVars, String workspace, String jobName, Map<String,String> configFileTags, IacTemplateParameters iacTemplateParameters) throws IOException, InterruptedException
Below method calls the prisma cloud API and get result through common module- Throws:
IOException
InterruptedException
-
checkSeverity
protected boolean checkSeverity(String result, TaskListener listener)
-
getJenkinsBuildNumber
protected int getJenkinsBuildNumber()
-
getSeverityMap
protected Map<String,String> getSeverityMap(String high, String medium, String low, String operator)
-
initializeIacTemplateParameters
public IacTemplateParameters initializeIacTemplateParameters(FilePath sourceFolder, TaskListener listener, String parentName) throws IOException, InterruptedException
- Throws:
IOException
InterruptedException
-
-