GitLab CI/CD Setup
- a GitLab project with a test runner reporter already configured (see Getting Started)
- the project is built on the GitLab instance configured for your Flakiness.io deployment
- your Flakiness.io project linked to that GitLab project
- CI uploading reports to Flakiness.io on every push and merge request, using a short-lived token exchanged via GitLab OIDC.
On GitLab CI/CD, reporters can authenticate via GitLab OIDC, so there are no secrets to create, rotate, or leak.
-
Confirm the reporter has
flakinessProjectset. OIDC requires the project identifier so Flakiness.io knows where to route the upload. If you followed Getting Started, this is already done. -
Declare an ID token named
FLAKINESS_ID_TOKEN. Itsaudmust be your Flakiness.io project identifier..gitlab-ci.yml test:stage: testid_tokens:FLAKINESS_ID_TOKEN:aud: my-org/my-appscript:- npx playwright test -
Push. The reporter picks up the ID token automatically at upload time.
On success you’ll see a confirmation line in the test output:
[flakiness.io] ✓ Uploaded as https://flakiness.io/my-org/my-app/run/42Self-managed GitLab
Section titled “Self-managed GitLab”Hosted Flakiness.io verifies ID tokens from https://gitlab.com. A self-hosted
Flakiness.io deployment can instead set GITLAB_ORIGIN to its self-managed
GitLab instance. The same OIDC configuration then works because Flakiness.io
uses that instance as the token issuer and reads its signing keys. The GitLab
origin must be reachable from the Flakiness.io container.