OpsTrailsDocs
Console

Bitbucket Pipelines

Track events from Bitbucket Pipelines using the OpsTrails pipe.

Setup

  1. Go to Repository settings → Pipelines → Repository variables
  2. Add a variable named OPSTRAILS_API_KEY with a READ_WRITE API key
  3. Mark it as secured

Pipeline Step

yaml
pipelines:
  default:
    - step:
        name: Deploy
        script:
          - ./deploy.sh
        after-script:
          - pipe: opstrails/opstrails-track-event:1.0.0
            variables:
              OPSTRAILS_API_KEY: $OPSTRAILS_API_KEY
              EVENT_TYPE: "deployment"
              EVENT_SUBJECT: "production"
              EVENT_VERSION: $BITBUCKET_TAG

Variables

VariableRequiredDescription
OPSTRAILS_API_KEYrequiredOpsTrails API key (READ_WRITE scope)
EVENT_TYPErequiredEvent type
EVENT_SUBJECToptionalTarget environment
EVENT_VERSIONoptionalRelease version or tag