Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Prerequisites: To properly configure Salesforce Analyzer Code Scan in pipelines, you must first configure a Salesforce Analyzer Code Scan tool and a Jenkins tool in the Tool Registry.

Salesforce Analyzer Code Scan Tool Registry Configuration

  1. Create a new tool with Tool Type: Salesforce Code Analyzer.

  2. Navigate to the Validation Rules tab to add a new scan rule.

    Image Added
  3. Click + New SFDX Scan Rule and complete the form:

    Name -
    Category -
    Threshold -
    Quality Gates -

    Image Added
  4. Click Create to save the form.

Jenkins Tool Registry Configuration

  1. Navigate to a properly configured Jenkins tool and navigate to the Jobs tab.

  2. Click + New Jenkins Job and make the following selections in the form:

    Name - Provide a unique name for the job to be fetched in the Salesforce Code Analyzer. This will be fetched in the pipeline step.
    Job Type - Select Salesforce Code Analyzer from the drop-down list.

    Image Added
  3. Click Create to save the job.

Pipeline Configuration

  1. Create a new pipeline step and select Tool Type: Salesforce Code Analyzer. Save the step and then click the gear icon to configure it.

    Image Added
  2. In Step Configuration, make the following selections to configure the step:

    Step Tool - Select the configured Jenkins tool containing the Salesforce Code Analyzer job.
    Job - Select the Salesforce Code Analyzer job.
    Build/Package Step - Choose the pipeline step you wish to scan.
    Select Salesforce Scan Tool - Select the configured Salesforce Code Analyzer job.
    Quality Gates -

    Image Added
  3. asdf

Pipeline Logs