All Integrations
CI/CD.gitlab-ci.yml notification job

GitLab CI Integration

Connect GitLab CI/CD pipelines to TigerOps. Pipeline events, deploy markers on dashboards, job duration trends, and production anomaly correlation — no plugin required.

Setup

How It Works

01

Store the API Key

Add TIGEROPS_API_KEY as a protected CI/CD variable in your GitLab project or group settings. Use the "Mask" option to prevent the key from appearing in job logs. Protected variables are only available on protected branches.

02

Add a Notification Job

Add a tigerops_notify stage to your .gitlab-ci.yml with an after_script or a dedicated notification job that POSTs pipeline metadata to the TigerOps Events API using curl.

03

Configure Environments

Use GitLab environment keywords in your deploy jobs to pass environment name and URL to the notification job. TigerOps maps GitLab environment slugs to your TigerOps service environments automatically.

04

Events Appear on Timeline

Every pipeline run to a production or staging environment creates a deploy marker on TigerOps dashboards. Failed pipelines trigger alert rules and are visible in the incident correlation timeline.

Capabilities

What You Get Out of the Box

Pipeline Event Ingestion

Pipeline created, running, passed, failed, and canceled events are sent to TigerOps with pipeline ID, ref, SHA, source (push/schedule/API), and total duration.

Deployment Markers

Production deploys appear as vertical markers on all TigerOps metric dashboards. The marker includes the GitLab environment name, deployer username, commit message, and SHA for instant context.

Job Duration Tracking

Send per-job timing data to TigerOps to track which stages are slowing down over time. Test, build, and lint job duration trends are monitored to catch CI performance regressions early.

Failed Pipeline Correlation

Pipeline failures are correlated with production anomalies. If an error rate spike follows a deploy, TigerOps surfaces the GitLab pipeline link in the incident context panel.

Multi-Environment Support

Separate events are tracked per environment (production, staging, review apps). TigerOps dashboards can be filtered by environment so you see deploy markers only for production services.

Review App & MR Tracking

Merge request pipeline events and review app deploys are tracked with MR IID, title, and author. This helps correlate feature deployments in staging with metric changes before they reach production.

Configuration

.gitlab-ci.yml Setup

Add a notification job to forward pipeline events to TigerOps after each deploy.

.gitlab-ci.yml
# .gitlab-ci.yml
stages:
  - build
  - test
  - deploy
  - notify

variables:
  TIGEROPS_SERVICE: "my-service"

build:
  stage: build
  script:
    - npm ci && npm run build
  artifacts:
    paths: [dist/]

test:
  stage: test
  script:
    - npm test

deploy_production:
  stage: deploy
  script:
    - ./scripts/deploy.sh
  environment:
    name: production
    url: https://myapp.com
  only:
    - main

# TigerOps notification job — runs after deploy
notify_tigerops:
  stage: notify
  image: curlimages/curl:latest
  needs: [deploy_production]
  when: always
  script:
    - |
      STATUS="success"
      if [ "$CI_JOB_STATUS" = "failed" ]; then STATUS="failed"; fi
      curl -sf -X POST https://api.tigerops.io/v1/events         -H "Authorization: Bearer $TIGEROPS_API_KEY"         -H "Content-Type: application/json"         -d "{
          "event_type": "ci.deploy",
          "service":    "$TIGEROPS_SERVICE",
          "environment": "production",
          "attributes": {
            "ci.pipeline.id":   "$CI_PIPELINE_ID",
            "ci.pipeline.url":  "$CI_PIPELINE_URL",
            "ci.build.status":  "$STATUS",
            "ci.commit.sha":    "$CI_COMMIT_SHA",
            "ci.commit.branch": "$CI_COMMIT_REF_NAME",
            "ci.commit.title":  "$CI_COMMIT_TITLE",
            "ci.deployer":      "$GITLAB_USER_LOGIN"
          }
        }"
  only:
    - main
FAQ

Common Questions

Does this integration require GitLab Premium or Ultimate?

No. The integration uses the standard .gitlab-ci.yml pipeline configuration and protected CI/CD variables, which are available on all GitLab tiers including Free. No GitLab webhooks or advanced deploy features are required.

Can I use this with GitLab.com and self-managed GitLab?

Yes. Both GitLab.com (SaaS) and self-managed GitLab instances are supported. The notification job makes outbound HTTPS POST requests to the TigerOps Events API, so your GitLab runners need outbound internet access.

How do I differentiate deploys to staging vs production?

Set the TIGEROPS_ENVIRONMENT variable in your CI/CD variables or directly in the notification step. Use GitLab environment:name to dynamically set it based on which environment the job is deploying to.

Can TigerOps receive events from GitLab pipeline webhooks instead?

Yes. Instead of a notification job in .gitlab-ci.yml, you can configure a GitLab project webhook to POST to the TigerOps Webhook receiver URL. This requires no changes to your pipeline files.

Does TigerOps capture test result counts from GitLab CI?

Yes. Parse the JUnit XML test results in the notification job and include test_count, failure_count, and skipped_count in the event payload. TigerOps displays these as trend metrics over pipeline runs.

Get Started

Correlate GitLab Deploys with Production Metrics

Pipeline events, deploy markers, and job duration trends — add one notify job to .gitlab-ci.yml.