Context: #7000
The Code References docs page only covers GitHub. We need a GitLab section so a developer can set this up in under five minutes.
Scope
Add an "Integrate with GitLab" section to docs/docs/managing-flags/code-references.md, mirroring the existing GitHub section (simple + advanced). Update the info box (lines 17–21) that says GitHub-only.
Simple configuration
The developer adds two CI/CD variables to their GitLab project and one include to their .gitlab-ci.yml:
include:
- remote: 'https://raw.githubusercontent.com/Flagsmith/ci/v1.0.0/templates/gitlab-ci.yml'
inputs:
flagsmith_project_id: "$FLAGSMITH_PROJECT_ID"
The two variables:
FLAGSMITH_PROJECT_ID — from the Flagsmith dashboard URL (/project/<id>/...)
FLAGSMITH_CODE_REFERENCES_API_KEY — from Organisation Settings > API Keys, set as masked so it doesn't leak in job logs
Optionally set FLAGSMITH_ADMIN_API_URL for self-hosted Flagsmith instances (defaults to https://api.flagsmith.com).
Advanced configuration
For teams that need to customise the pipeline (different stage, extra rules, multiple repos), show the full job definition that the template abstracts away. Use $CI_PROJECT_URL for repository_url and $CI_COMMIT_SHA for revision, and explain the mapping.
The simple config uses include:remote with inputs: — the advanced config replaces that with an explicit job so the developer can change the image, stage, or rules.
Acceptance criteria
Context: #7000
The Code References docs page only covers GitHub. We need a GitLab section so a developer can set this up in under five minutes.
Scope
Add an "Integrate with GitLab" section to
docs/docs/managing-flags/code-references.md, mirroring the existing GitHub section (simple + advanced). Update the info box (lines 17–21) that says GitHub-only.Simple configuration
The developer adds two CI/CD variables to their GitLab project and one
includeto their.gitlab-ci.yml:The two variables:
FLAGSMITH_PROJECT_ID— from the Flagsmith dashboard URL (/project/<id>/...)FLAGSMITH_CODE_REFERENCES_API_KEY— from Organisation Settings > API Keys, set as masked so it doesn't leak in job logsOptionally set
FLAGSMITH_ADMIN_API_URLfor self-hosted Flagsmith instances (defaults tohttps://api.flagsmith.com).Advanced configuration
For teams that need to customise the pipeline (different stage, extra rules, multiple repos), show the full job definition that the template abstracts away. Use
$CI_PROJECT_URLforrepository_urland$CI_COMMIT_SHAforrevision, and explain the mapping.The simple config uses
include:remotewithinputs:— the advanced config replaces that with an explicit job so the developer can change theimage,stage, orrules.Acceptance criteria