Class BaseJob
java.lang.Object
com.vectorcast.plugins.vectorcastexecution.job.BaseJob
- Direct Known Subclasses:
NewPipelineJob,NewSingleJob
Base job management - create/delete/update.
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedBaseJob(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse resp) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddArchiveArtifacts(Project<?, ?> project) Add archive artifacts step.protected voidaddCopyResultsToImport(Project<?, ?> project) Add archive artifacts step.protected voidaddDelWSBeforeBuild(Project<?, ?> project) Add the delete workspace before build starts option.protected voidaddJenkinsCoverage(Project<?, ?> project) Add Jenkins coverage reporting step.protected voidAdd JUnit rules step.protected voidaddPCLintPlus(Project<?, ?> project) Add PC-Lint Plus step.protected voidaddReferenceBuild(Project<?, ?> project) Add Jenkins coverage reporting step.protected VectorCASTSetupAdd the VectorCAST setup step to copy the python scripts to.protected voidaddVCCoverage(Project<?, ?> project) Add VectorCAST coverage reporting step.protected abstract voidCleanup top-level project, as in delete.voidcreate()Create the job(s).protected abstract Project<?, ?> Create top-level project.protected abstract voiddoCreate()Do create of project details.protected URLCall to get baseline linux single job file.protected URLCall to get baseline groovy script for pipeline job.protected URLCall to get baseline post-build groovy job file.protected URLCall to get baseline windows single job file.protected StringGet base name of manage project.protected StringGet environment setup for unix.protected StringGet environment setup for windows.protected StringGet environment tear down for unix.protected StringGet environment tear down for windows.protected StringGet execute preamble for unix.protected StringGet execute preamble for windows.protected StringGet option to Use as external result filename.protected JenkinsGet Jenkins instance.protected StringGet the user-specified job name.protected StringGet manage project name.protected LongGet for maxParallel to control maximum number of jobs to be queue at at any one point.protected StringGet node label.protected booleanGet option to clean workspace before build.protected intGet error level.protected booleanUse execution report.protected StringUse HTML Build Description.protected booleanGet use Jenkins reporting option.protected StringGet pc-lint plus command.protected StringGet pc-lint plus result pattern.protected URLCall to get baseline config.xml with parameters for pipeline job .protected URLCall to get baseline config.xml for pipeline job .Get the name of the project.protected org.kohsuke.stapler.StaplerRequestGet request.protected org.kohsuke.stapler.StaplerResponseGet response.protected StringGet command for running Squore.protected Project<?, ?> Get top-level project.protected booleanGet option to use CI licenses.protected StringGet use CI license for Linux.protected StringGet use CI license for Linux.booleanGet option to Use coverage history to control build status.protected booleanGet option to use coverage plugin or vectorcast coverage plugin.protected booleanGet option to Use external imported results.protected booleanGet option to Use imported results.protected booleanGet option to Use local imported results.protected booleanGet option to Use RGW3 capabilities.protected booleanGet option to Use strict testcase import.protected LongGet the number of wait loops.protected LongGet the time to wait between retries.protected booleanUsing some form of SCM.voidsetProjectName(String pName) Sets the name of the project.protected voidsetUsingSCM(boolean useScm) Set using some form of SCM.
-
Constructor Details
-
BaseJob
protected BaseJob(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse resp) throws javax.servlet.ServletException, IOException, ExternalResultsFileException, IllegalArgumentException, BadOptionComboException Constructor.- Parameters:
req- request objectresp- response object- Throws:
javax.servlet.ServletException- exceptionIOException- exceptionExternalResultsFileException- exceptionIllegalArgumentException- exceptionBadOptionComboException- exception
-
-
Method Details
-
isUsingScm
protected boolean isUsingScm()Using some form of SCM.- Returns:
- true or false
-
setUsingSCM
protected void setUsingSCM(boolean useScm) Set using some form of SCM.- Parameters:
useScm- true/false
-
getEnvironmentSetupWin
Get environment setup for windows.- Returns:
- setup
-
getExecutePreambleWin
Get execute preamble for windows.- Returns:
- preamble
-
getEnvironmentTeardownWin
Get environment tear down for windows.- Returns:
- environment tear down for windows
-
getEnvironmentSetupUnix
Get environment setup for unix.- Returns:
- environment setup
-
getExecutePreambleUnix
Get execute preamble for unix.- Returns:
- preamble
-
getEnvironmentTeardownUnix
Get environment tear down for unix.- Returns:
- teardown
-
getOptionUseReporting
protected boolean getOptionUseReporting()Get use Jenkins reporting option.- Returns:
- true to use, false to not
-
getOptionErrorLevel
protected int getOptionErrorLevel()Get error level.- Returns:
- int 0 - Do nothing, 1 - Unstable, 2 - Error
-
getOptionHTMLBuildDesc
Use HTML Build Description.- Returns:
- HTML or TEXT
-
getOptionExecutionReport
protected boolean getOptionExecutionReport()Use execution report.- Returns:
- true to use, false to not
-
getOptionClean
protected boolean getOptionClean()Get option to clean workspace before build.- Returns:
- true to clean, false to not
-
getUseCILicenses
protected boolean getUseCILicenses()Get option to use CI licenses.- Returns:
- true to use CI licenses, false to not
-
getUseStrictTestcaseImport
protected boolean getUseStrictTestcaseImport()Get option to Use strict testcase import.- Returns:
- true to Use strict testcase import, false to not
-
getUseRGW3
protected boolean getUseRGW3()Get option to Use RGW3 capabilities.- Returns:
- true use RGW3 capabilities, false to not
-
getUseCoveragePlugin
protected boolean getUseCoveragePlugin()Get option to use coverage plugin or vectorcast coverage plugin.- Returns:
- true use coverage plugin or vectorcast coverage plugin
-
getUseImportedResults
protected boolean getUseImportedResults()Get option to Use imported results.- Returns:
- true to Use imported results, false to not
-
getUseLocalImportedResults
protected boolean getUseLocalImportedResults()Get option to Use local imported results.- Returns:
- true to Use local imported results, false to not
-
getUseExternalImportedResults
protected boolean getUseExternalImportedResults()Get option to Use external imported results.- Returns:
- true to Use external imported results, false to not
-
getExternalResultsFilename
Get option to Use as external result filename.- Returns:
- string external result filename
-
getUseCoverageHistory
public boolean getUseCoverageHistory()Get option to Use coverage history to control build status.- Returns:
- true to Use imported results, false to not
-
getMaxParallel
Get for maxParallel to control maximum number of jobs to be queue at at any one point.- Returns:
- MaxParallel integer number
-
getUseCILicensesWin
Get use CI license for Linux.- Returns:
- String command to set
-
getUseCILicensesUnix
Get use CI license for Linux.- Returns:
- String command to set
-
getWaitTime
Get the time to wait between retries.- Returns:
- number of seconds
-
getWaitLoops
Get the number of wait loops.- Returns:
- number of iterations
-
getJobName
Get the user-specified job name.- Returns:
- job name (null for use default)
-
getTopProject
Get top-level project.- Returns:
- project
-
getManageProjectName
Get manage project name.- Returns:
- manage project name
-
getBaseName
Get base name of manage project.- Returns:
- base name
-
getNodeLabel
Get node label.- Returns:
- node label
-
getPclpCommand
Get pc-lint plus command.- Returns:
- pc-lint plus command
-
getPclpResultsPattern
Get pc-lint plus result pattern.- Returns:
- pc-lint plus result pattern
-
getSquoreCommand
Get command for running Squore.- Returns:
- Squore command
-
getRequest
protected org.kohsuke.stapler.StaplerRequest getRequest()Get request.- Returns:
- request
-
getInstance
Get Jenkins instance.- Returns:
- Jenkins instance
-
getProjectName
Get the name of the project.- Returns:
- the project name
-
setProjectName
Sets the name of the project.- Parameters:
pName- - project name
-
getResponse
protected org.kohsuke.stapler.StaplerResponse getResponse()Get response.- Returns:
- response
-
addDelWSBeforeBuild
Add the delete workspace before build starts option.- Parameters:
project- project to add to
-
create
@POST public void create() throws IOException, javax.servlet.ServletException, Descriptor.FormException, JobAlreadyExistsException, InvalidProjectFileException, AccessDeniedException3Create the job(s).- Throws:
IOException- exceptionjavax.servlet.ServletException- exceptionDescriptor.FormException- exceptionJobAlreadyExistsException- exceptionInvalidProjectFileException- exceptionAccessDeniedException3- exception
-
createProject
Create top-level project.- Returns:
- created project
- Throws:
IOException- exceptionJobAlreadyExistsException- exception
-
cleanupProject
protected abstract void cleanupProject()Cleanup top-level project, as in delete. -
doCreate
@POST protected abstract void doCreate() throws IOException, javax.servlet.ServletException, Descriptor.FormException, InvalidProjectFileExceptionDo create of project details.- Throws:
IOException- exceptionjavax.servlet.ServletException- exceptionDescriptor.FormException- exceptionInvalidProjectFileException- exception
-
addSetup
Add the VectorCAST setup step to copy the python scripts to. the workspace- Parameters:
project- project- Returns:
- the setup build step
- Throws:
IOException
-
addArchiveArtifacts
Add archive artifacts step.- Parameters:
project- project to add to
-
addCopyResultsToImport
Add archive artifacts step.- Parameters:
project- project to add to
-
addJunit
Add JUnit rules step.- Parameters:
project- project to add step to
-
addPCLintPlus
Add PC-Lint Plus step.- Parameters:
project- project to add step to do PC-Lint Plus
-
addVCCoverage
Add VectorCAST coverage reporting step.- Parameters:
project- project to add step to
-
addReferenceBuild
Add Jenkins coverage reporting step.- Parameters:
project- project to add step to
-
addJenkinsCoverage
Add Jenkins coverage reporting step.- Parameters:
project- project to add step to
-
getBaselineWindowsSingleFile
Call to get baseline windows single job file.- Returns:
- URL for baseline file
-
getBaselineLinuxSingleFile
Call to get baseline linux single job file.- Returns:
- URL for baseline file
-
getBaselinePostBuildGroovyScript
Call to get baseline post-build groovy job file.- Returns:
- URL for baseline file
-
getPipelineConfigParametersXML
Call to get baseline config.xml with parameters for pipeline job .- Returns:
- URL for baseline file
-
getPipelineConfigXML
Call to get baseline config.xml for pipeline job .- Returns:
- URL for baseline file
-
getBaselinePipelineGroovy
Call to get baseline groovy script for pipeline job.- Returns:
- URL for baseline file
-