CodeScan with Windows Agents
Last updated
Last updated
You will need:
Jenkins
Salesforce CLI
Git
In user environment Path variable, add the Salesforce CLI and Git bin directories.
In the System environment Path variable add the Git\cmd, Git\usr\bin, and Salesforce CLI\bin directories.
In Jenkins, create a credential containing your CodeScan token (learn how to find this here).
Create a new Pipeline.
In the Pipeline script section you will need to paste in the code with the highlighted variables changed, these are:
Your credential_name should be the name of the credential you created.
my_project should be the project key you would like to assign to your project.
my_organization should be your Organization Key (learn how to find this here).
The --server=yourserveraddress flag is required for self hosted instances.
Run the pipeline. If everything is set up correctly and your Quality Gate passes, you will be able to see you pipeline pass.
If your Quality Gate fails, you will see the error in the CodeScan stage of the build.