GitLab integration
Buildpathio integrates with GitLab Cloud and self-hosted instances via CI/CD pipeline jobs. Results are posted as external status checks on merge requests.
Cloud GitLab setup
Add the Buildpathio job to your existing .gitlab-ci.yml:
script:
- |
curl -X POST https://api.buildpathio.com/v1/manifests \
-H "Authorization: Bearer $BUILDPATH_TOKEN" \
-H "Content-Type: application/json" \
-d @buildpath-manifest.json
- |
RESULT=$(curl -s \
-H "Authorization: Bearer $BUILDPATH_TOKEN" \
"https://api.buildpathio.com/v1/check/$CI_PROJECT_NAME")
echo "$RESULT"
echo "$RESULT" | grep -q '"breaking":[]' || exit 1
only:
- merge_requests
Add BUILDPATH_TOKEN as a CI/CD variable under Settings → CI/CD → Variables. Mark it as Masked to prevent it appearing in job logs.
Self-hosted GitLab
Self-hosted instances work the same way. The CI runner must be able to reach api.buildpathio.com outbound on port 443. If your instance uses an allowlist, add:
api.buildpathio.comauth.buildpathio.com
MR annotations
To show inline comments on merge requests (rather than just a pass/fail status), the integration uses the GitLab External Status Checks API. Enable this in your workspace under Settings → Integrations → GitLab → Enable MR annotations. You'll need to provide your GitLab personal access token with api scope.