java.lang.Object
com.vectorcast.plugins.vectorcastexecution.job.BaseJob
Direct Known Subclasses:
NewPipelineJob, NewSingleJob

public abstract class BaseJob extends Object
Base job management - create/delete/update.
  • Constructor Details

  • 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

      protected String getEnvironmentSetupWin()
      Get environment setup for windows.
      Returns:
      setup
    • getExecutePreambleWin

      protected String getExecutePreambleWin()
      Get execute preamble for windows.
      Returns:
      preamble
    • getEnvironmentTeardownWin

      protected String getEnvironmentTeardownWin()
      Get environment tear down for windows.
      Returns:
      environment tear down for windows
    • getEnvironmentSetupUnix

      protected String getEnvironmentSetupUnix()
      Get environment setup for unix.
      Returns:
      environment setup
    • getExecutePreambleUnix

      protected String getExecutePreambleUnix()
      Get execute preamble for unix.
      Returns:
      preamble
    • getEnvironmentTeardownUnix

      protected String 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

      protected String 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

      protected String 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

      protected Long getMaxParallel()
      Get for maxParallel to control maximum number of jobs to be queue at at any one point.
      Returns:
      MaxParallel integer number
    • getUseCILicensesWin

      protected String getUseCILicensesWin()
      Get use CI license for Linux.
      Returns:
      String command to set
    • getUseCILicensesUnix

      protected String getUseCILicensesUnix()
      Get use CI license for Linux.
      Returns:
      String command to set
    • getWaitTime

      protected Long getWaitTime()
      Get the time to wait between retries.
      Returns:
      number of seconds
    • getWaitLoops

      protected Long getWaitLoops()
      Get the number of wait loops.
      Returns:
      number of iterations
    • getJobName

      protected String getJobName()
      Get the user-specified job name.
      Returns:
      job name (null for use default)
    • getTopProject

      protected Project<?,?> getTopProject()
      Get top-level project.
      Returns:
      project
    • getManageProjectName

      protected String getManageProjectName()
      Get manage project name.
      Returns:
      manage project name
    • getBaseName

      protected String getBaseName()
      Get base name of manage project.
      Returns:
      base name
    • getNodeLabel

      protected String getNodeLabel()
      Get node label.
      Returns:
      node label
    • getPclpCommand

      protected String getPclpCommand()
      Get pc-lint plus command.
      Returns:
      pc-lint plus command
    • getPclpResultsPattern

      protected String getPclpResultsPattern()
      Get pc-lint plus result pattern.
      Returns:
      pc-lint plus result pattern
    • getSquoreCommand

      protected String getSquoreCommand()
      Get command for running Squore.
      Returns:
      Squore command
    • getRequest

      protected org.kohsuke.stapler.StaplerRequest getRequest()
      Get request.
      Returns:
      request
    • getInstance

      protected Jenkins getInstance()
      Get Jenkins instance.
      Returns:
      Jenkins instance
    • getProjectName

      public String getProjectName()
      Get the name of the project.
      Returns:
      the project name
    • setProjectName

      public void setProjectName(String pName)
      Sets the name of the project.
      Parameters:
      pName - - project name
    • getResponse

      protected org.kohsuke.stapler.StaplerResponse getResponse()
      Get response.
      Returns:
      response
    • addDelWSBeforeBuild

      protected void addDelWSBeforeBuild(Project<?,?> project)
      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, AccessDeniedException3
      Create the job(s).
      Throws:
      IOException - exception
      javax.servlet.ServletException - exception
      Descriptor.FormException - exception
      JobAlreadyExistsException - exception
      InvalidProjectFileException - exception
      AccessDeniedException3 - exception
    • createProject

      protected abstract Project<?,?> createProject() throws IOException, JobAlreadyExistsException
      Create top-level project.
      Returns:
      created project
      Throws:
      IOException - exception
      JobAlreadyExistsException - 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, InvalidProjectFileException
      Do create of project details.
      Throws:
      IOException - exception
      javax.servlet.ServletException - exception
      Descriptor.FormException - exception
      InvalidProjectFileException - exception
    • addSetup

      protected VectorCASTSetup addSetup(Project<?,?> project) throws IOException
      Add the VectorCAST setup step to copy the python scripts to. the workspace
      Parameters:
      project - project
      Returns:
      the setup build step
      Throws:
      IOException
    • addArchiveArtifacts

      protected void addArchiveArtifacts(Project<?,?> project)
      Add archive artifacts step.
      Parameters:
      project - project to add to
    • addCopyResultsToImport

      protected void addCopyResultsToImport(Project<?,?> project)
      Add archive artifacts step.
      Parameters:
      project - project to add to
    • addJunit

      protected void addJunit(Project<?,?> project)
      Add JUnit rules step.
      Parameters:
      project - project to add step to
    • addPCLintPlus

      protected void addPCLintPlus(Project<?,?> project)
      Add PC-Lint Plus step.
      Parameters:
      project - project to add step to do PC-Lint Plus
    • addVCCoverage

      protected void addVCCoverage(Project<?,?> project)
      Add VectorCAST coverage reporting step.
      Parameters:
      project - project to add step to
    • addReferenceBuild

      protected void addReferenceBuild(Project<?,?> project)
      Add Jenkins coverage reporting step.
      Parameters:
      project - project to add step to
    • addJenkinsCoverage

      protected void addJenkinsCoverage(Project<?,?> project)
      Add Jenkins coverage reporting step.
      Parameters:
      project - project to add step to
    • getBaselineWindowsSingleFile

      protected URL getBaselineWindowsSingleFile()
      Call to get baseline windows single job file.
      Returns:
      URL for baseline file
    • getBaselineLinuxSingleFile

      protected URL getBaselineLinuxSingleFile()
      Call to get baseline linux single job file.
      Returns:
      URL for baseline file
    • getBaselinePostBuildGroovyScript

      protected URL getBaselinePostBuildGroovyScript()
      Call to get baseline post-build groovy job file.
      Returns:
      URL for baseline file
    • getPipelineConfigParametersXML

      protected URL getPipelineConfigParametersXML()
      Call to get baseline config.xml with parameters for pipeline job .
      Returns:
      URL for baseline file
    • getPipelineConfigXML

      protected URL getPipelineConfigXML()
      Call to get baseline config.xml for pipeline job .
      Returns:
      URL for baseline file
    • getBaselinePipelineGroovy

      protected URL getBaselinePipelineGroovy()
      Call to get baseline groovy script for pipeline job.
      Returns:
      URL for baseline file