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.
-
On the Edit build pipeline page, select the Pre-Build Stage (or Post-Build Stage).
-
Click + Add task.
-
Select Codacy from PRESET PLUGINS and configure it.
-
Enter a relevant name in the
Task namefield. It is a mandatory field. -
Enter a descriptive message for the task in the
Descriptionfield. 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.Variable Format Description CodacyEndpoint String API endpoint for Codacy GitProvider String Git provider for the scanning CodacyApiToken String API token for Codacy. If it is provided, it will be used; otherwise it will be picked from the Global secret (CODACY_API_TOKEN). Organisation String Your Organization for Codacy RepoName String Your Repository name Branch String Your branch name -
Trigger/Skip Conditionrefers to a conditional statement to execute or skip the task. You can select either:Set trigger conditionsorSet skip conditions
-
Pass/Failure Conditionrefers to conditions to execute a pass or fail of your build. You can select either:Set pass conditionsorSet failure conditions
-
-
Click Update Pipeline.
-
Go to the Build & Deploy, click the build pipeline and start your build.
-
Click
Detailson the build pipeline, and you can view the details on theLogs.