Class BaseJob

    • Constructor Detail

      • BaseJob

        protected BaseJob​(org.kohsuke.stapler.StaplerRequest request,
                          org.kohsuke.stapler.StaplerResponse response,
                          boolean useSavedData)
                   throws javax.servlet.ServletException,
                          IOException,
                          ExternalResultsFileException
        Constructor
        Parameters:
        request - request object
        response - response object
        useSavedData - use saved data true/false
        Throws:
        javax.servlet.ServletException - exception
        IOException - exception
        ExternalResultsFileException - exception
    • Method Detail

      • useSavedData

        public void useSavedData​(VectorCASTSetup savedData)
        Use Saved Data
        Parameters:
        savedData - saved data to use
      • isUsingSCM

        protected boolean isUsingSCM()
        Using some form of SCM
        Returns:
        true or false
      • setUsingSCM

        protected void setUsingSCM​(boolean usingSCM)
        Set using some form of SCM
        Parameters:
        usingSCM - true/false
      • getEnvironmentSetupWin

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

        protected void setEnvironmentSetupWin​(String environmentSetupWin)
        Set environment setup for windows
        Parameters:
        environmentSetupWin - windows environment setup
      • getExecutePreambleWin

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

        protected void setExecutePreambleWin​(String executePreambleWin)
        Set execute preamble for windows
        Parameters:
        executePreambleWin - execute preamble for windows
      • getEnvironmentTeardownWin

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

        protected void setEnvironmentTeardownWin​(String environmentTeardownWin)
        Set environment tear down for windows
        Parameters:
        environmentTeardownWin - environment tear down for windows
      • getEnvironmentSetupUnix

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

        protected void setEnvironmentSetupUnix​(String environmentSetupUnix)
        Set environment setup for unix
        Parameters:
        environmentSetupUnix - environment setup for unix
      • getExecutePreambleUnix

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

        protected void setExecutePreambleUnix​(String executePreambleUnix)
        Set execute preamble for unix
        Parameters:
        executePreambleUnix - execute preamble for unix
      • getEnvironmentTeardownUnix

        protected String getEnvironmentTeardownUnix()
        Get environment tear down for unix
        Returns:
        teardown
      • setEnvironmentTeardownUnix

        protected void setEnvironmentTeardownUnix​(String environmentTeardownUnix)
        Set environment teardown for unix
        Parameters:
        environmentTeardownUnix - environment tear down for unix
      • getOptionUseReporting

        protected boolean getOptionUseReporting()
        Get use Jenkins reporting option
        Returns:
        true to use, false to not
      • setOptionUseReporting

        protected void setOptionUseReporting​(boolean optionUseReporting)
        Set use Jenkins reporting option
        Parameters:
        optionUseReporting - true to use, false to not
      • getOptionErrorLevel

        protected String getOptionErrorLevel()
        Get error level
        Returns:
        Unstable or Failure
      • setOptionErrorLevel

        protected void setOptionErrorLevel​(String optionErrorLevel)
        Set option error level
        Parameters:
        optionErrorLevel - Unstable or Failure
      • getOptionHTMLBuildDesc

        protected String getOptionHTMLBuildDesc()
        Use HTML Build Description
        Returns:
        HTML or TEXT
      • setOptionHTMLBuildDesc

        protected void setOptionHTMLBuildDesc​(String optionHtmlBuildDesc)
        Set use HTML Build description
        Parameters:
        optionHtmlBuildDesc - HTML build description
      • getOptionExecutionReport

        protected boolean getOptionExecutionReport()
        Use execution report
        Returns:
        true to use, false to not
      • setOptionExecutionReport

        protected void setOptionExecutionReport​(boolean optionExecutionReport)
        Set use execution report
        Parameters:
        optionExecutionReport - true to use, false to not
      • getOptionClean

        protected boolean getOptionClean()
        Get option to clean workspace before build
        Returns:
        true to clean, false to not
      • setOptionClean

        protected void setOptionClean​(boolean optionClean)
        Set option to clean workspace before build
        Parameters:
        optionClean - 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
      • setUseCILicenses

        protected void setUseCILicenses​(boolean useCILicenses)
        Set option to use CI licenses
        Parameters:
        useCILicenses - 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
      • setUseStrictTestcaseImport

        protected void setUseStrictTestcaseImport​(boolean useStrictTestcaseImport)
        Set option to Use strict testcase import
        Parameters:
        useStrictTestcaseImport - true to Use strict testcase import, false to not
      • getUseImportedResults

        protected boolean getUseImportedResults()
        Get option to Use imported results
        Returns:
        true to Use imported results, false to not
      • setUseImportedResults

        protected void setUseImportedResults​(boolean useImportedResults)
        Set option to Use imported results
        Parameters:
        useImportedResults - 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
      • setUseLocalImportedResults

        protected void setUseLocalImportedResults​(boolean useLocalImportedResults)
        Set option to Use imported results
        Parameters:
        useLocalImportedResults - 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
      • setUseExternalImportedResults

        protected void setUseExternalImportedResults​(boolean useExternalImportedResults)
        Set option to Use imported results
        Parameters:
        useExternalImportedResults - 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
      • setExternalResultsFilename

        protected void setExternalResultsFilename​(String externalResultsFilename)
        Set option to Use imported results
        Parameters:
        externalResultsFilename - true to Use external imported results, false to not
      • getUseCoverageHistory

        protected boolean getUseCoverageHistory()
        Get option to Use coverage history to control build status
        Returns:
        true to Use imported results, false to not
      • setUseCoverageHistory

        protected void setUseCoverageHistory​(boolean useCoverageHistory)
        Set option to Use coverage history to control build status
        Parameters:
        useCoverageHistory - 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
      • setMaxParallel

        protected void setMaxParallel​(Long maxParallel)
        Set option for maxParallel to control maximum number of jobs to be queue at at any one point
        Parameters:
        maxParallel - Long number
      • getUseCILicensesWin

        protected String getUseCILicensesWin()
        Get environment setup for windows
        Returns:
        setup
      • getUseCILicensesUnix

        protected String getUseCILicensesUnix()
      • 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 hudson.model.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
      • getTESTinsights_URL

        protected String getTESTinsights_URL()
        Get URL for TESTinsights
        Returns:
        TESTinsights URL
      • getTESTinsights_project

        protected String getTESTinsights_project()
        Get Project for TESTinsights
        Returns:
        TESTinsights Project
      • setTESTinsights_project

        protected void setTESTinsights_project​(String TESTinsights_project)
        Set Project for TESTinsights
        Parameters:
        TESTinsights_project - TESTinsights project name
      • getTESTinsights_proxy

        protected String getTESTinsights_proxy()
        Get Proxy for TESTinsights
        Returns:
        TESTinsights proxy
      • getTESTinsights_credentials_id

        protected String getTESTinsights_credentials_id()
        Get Credentials for TESTinsights
        Returns:
        TESTinsights Credentials
      • getTESTinsights_SCM_URL

        protected String getTESTinsights_SCM_URL()
        Get SCM URL for TESTinsights
        Returns:
        TESTinsights SCM URL
      • getTESTinsights_SCM_Tech

        protected String getTESTinsights_SCM_Tech()
        Get SCM Technology TESTinsights
        Returns:
        TESTinsights SCM Technology
      • setTESTinsights_SCM_URL

        protected void setTESTinsights_SCM_URL​(String TESTinsights_SCM_URL)
        Set SCM URL for TESTinsights
        Parameters:
        TESTinsights_SCM_URL - - String TESTinsights SCM URL
      • setTESTinsights_SCM_Tech

        protected void setTESTinsights_SCM_Tech​(String TESTinsights_SCM_Tech)
        Set SCM Technology TESTinsights
        Parameters:
        TESTinsights_SCM_Tech - - String TESTinsights SCM Techology (git or svn)
      • getRequest

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

        protected jenkins.model.Jenkins getInstance()
        Get Jenkins instance
        Returns:
        Jenkins instance
      • getResponse

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

        protected void addDeleteWorkspaceBeforeBuildStarts​(hudson.model.Project project)
        Add the delete workspace before build starts option
        Parameters:
        project - project to add to
      • cleanupProject

        protected abstract void cleanupProject()
        Cleanup top-level project, as in delete
      • doCreate

        protected abstract void doCreate​(boolean update)
                                  throws IOException,
                                         javax.servlet.ServletException,
                                         hudson.model.Descriptor.FormException,
                                         InvalidProjectFileException
        Do create of project details
        Parameters:
        update - true if doing an update rather than a create
        Throws:
        IOException - exception
        javax.servlet.ServletException - exception
        hudson.model.Descriptor.FormException - exception
        InvalidProjectFileException - exception
      • addSetup

        protected VectorCASTSetup addSetup​(hudson.model.Project project)
        Add the VectorCAST setup step to copy the python scripts to the workspace
        Parameters:
        project - project
        Returns:
        the setup build step
      • addArchiveArtifacts

        protected void addArchiveArtifacts​(hudson.model.Project project)
        Add archive artifacts step
        Parameters:
        project - project to add to
      • addCopyResultsToImport

        protected void addCopyResultsToImport​(hudson.model.Project project)
        Add archive artifacts step
        Parameters:
        project - project to add to
      • addJunit

        protected void addJunit​(hudson.model.Project project)
        Add JUnit rules step
        Parameters:
        project - project to add step to
      • addPCLintPlus

        protected void addPCLintPlus​(hudson.model.Project project)
        Add PC-Lint Plus step
        Parameters:
        project - project to add step to do PC-Lint Plus
      • addVCCoverage

        protected void addVCCoverage​(hudson.model.Project project)
        Add VectorCAST coverage reporting step
        Parameters:
        project - project to add step to
      • addCredentialID

        protected void addCredentialID​(hudson.model.Project project)