GitLab CI/CD Setup
You'll need
- a GitLab project with a test runner reporter already configured (see Getting Started)
- the project is built with GitLab CI/CD on gitlab.com
- your Flakiness.io project linked to that GitLab project
You'll have
- 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”Flakiness.io verifies ID tokens against https://gitlab.com. Pipelines on a self-managed instance cannot authenticate this way and should use an access token instead.