CI/CD
Azure Pipelines
Set up Azure Pipelines workflow for CodeAnt CI scan.
Azure Pipelines Workflow
Add the following to your azure-pipelines.yml
. This single step will fetch the scan helper script and trigger a CodeAnt analysis on every commit to your target branch:
Tip:
- In Project → Pipelines → Library, add a secret variable named
ACCESS_TOKEN
with your personal or repo token.- Azure DevOps automatically provides
$(Build.Repository.Name)
(your repo slug) and$(Build.SourceVersion)
(the commit SHA).
How It Works
-
Download scan script We
curl
the helper (start_scan.sh
) from the CodeAnt CI endpoint. -
Make it executable
chmod +x
so the script can run. -
Invoke the scan The script sends your repo name, commit SHA, file-globs, and token to
/analysis/ci/scan
. -
Fail-fast on errors
- Exits non-zero if the HTTP request isn’t a 2xx, causing the pipeline to fail.
- Prints the JSON response on success so you can inspect scan IDs or metadata.
With this configured, every push to your Azure DevOps pipeline will automatically trigger a CodeAnt security and quality scan.