Skip to main content
Version: 1.8

Codacy

Codacy is an automated code analysis/quality tool that helps developers to ship better software in a faster manner.

Prerequisite: Make sure you have set up an account in Codacy 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 Codacy from PRESET PLUGINS and configure it.

    1. Enter a relevant name in the Task name field. It is a mandatory field.

    2. Enter a descriptive message for the task in the Description field. It is an optional field.

    3. 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
      CodacyEndpointStringAPI endpoint for Codacy
      GitProviderStringGit provider for the scanning
      CodacyApiTokenStringAPI token for Codacy. If it is provided, it will be used; otherwise it will be picked from the Global secret (CODACY_API_TOKEN).
      OrganisationStringYour Organization for Codacy
      RepoNameStringYour Repository name
      BranchStringYour branch name
    4. 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

    5. Pass/Failure Condition refers to conditions to execute a pass or fail of your build. You can select either:

      • Set pass conditions or
      • Set failure conditions

  4. Click Update Pipeline.

  5. Go to the Build & Deploy, click the build pipeline and start your build.

  6. Click Details on the build pipeline, and you can view the details on the Logs.