CI/CD
Bitbucket pipelines
Set up CodeAnt into your Bitbucket pipeline.
Bitbucket Pipelines Workflow
Add the following to your bitbucket-pipelines.yml
. This single step will fetch the scan helper script and trigger a CodeAnt analysis for every commit:
Tip:
- Define an ACCESS_TOKEN secured Repository variable with a personal access token or repo token.
- Bitbucket Pipelines automatically provides BITBUCKET_REPO_FULL_NAME (e.g.
org/repo
) and BITBUCKET_COMMIT (current 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 you can run it directly. -
Invoke the scan The script POSTs your repo slug, commit SHA, file-globs, and token to
/analysis/ci/scan
. -
Fail-fast on issues
- Exits non-zero if the request fails (non-2xx), failing your pipeline.
- Prints the JSON response on success so you can inspect scan IDs or metadata.
With this in place, every push to Bitbucket will automatically trigger a CodeAnt security/quality scan.