Skip to main content
Version: 2.0 🆕

Sonarqube v1.1.0

Configuring Sonarqube-v1.1.0 in pre-build or post build task enhances your workflow with Continuous Code Quality & Code Security.

Prerequisite: Make sure you have set up an account in Sonarqube or get the API keys from an admin.

  1. On the Edit build pipeline page, select the Pre-Build Stage (or Post-Build Stage).

  2. Click + Add task.

  3. Select Sonarqube v1.1.0 from PRESET PLUGINS.

  • Enter a relevant name in the Task name field. It is a mandatory field.
  • Enter a descriptive message for the task in the Description field. It is an optional field.
  • Provide a value for the input variable.
    Note: The value may be any of the values from the previous build stages, a global variable, or a custom value.
VariableFormatDescription
SonarqubeProjectPrefixNameStringThis is the SonarQube project prefix name. If not provided, the prefix name is automatically generated.
SonarqubeBranchNameStringBranch name to be used to send the scanned result on sonarqube project.
SonarqubeProjectKeyStringProject key of SonarQube account
CheckForSonarAnalysisReportBoolBoolean value - true or false. Set true to poll for generated report from sonarqube.
AbortPipelineOnPolicyCheckFailedBoolBoolean value - true or false. Set true to abort on report check failed.
UsePropertiesFileFromProjectBoolBoolean value - true or false. Set true to use source code sonar-properties file.
SonarqubeEndpointStringAPI endpoint of SonarQube account.
CheckoutPathStringCheckout path of Git material.
SonarqubeApiKeyStringAPI key of SonarQube account
SonarContainerImageStringContainer Image that will be used for sonar scanning purpose.
  • Trigger/Skip Condition refers to a conditional statement to execute or skip the task. You can select either:

    • Set trigger conditions or
    • Set skip conditions

  • Pass/Fail Condition refers to a conditional statement to pass or fail the Pre-Build Stage (or Post-Build Stage). You can select either:

    • Set pass conditions or
    • Set failure conditions

  • Click Update Pipeline.