Deployment Tracking Setup

Enable deployment tracking for DORA metrics

How Coderbuds Tracks Deployments

Coderbuds automatically tracks your deployments by listening to deployment events from GitHub and Bitbucket. To enable this, your CI/CD workflow needs to create deployment environments when deploying.

The key requirement is using a production environment in your workflow. Once configured, Coderbuds will automatically calculate your deployment frequency, lead time, and other DORA metrics.

GitHub Actions Workflow

The easiest way to enable DORA metrics is through a GitHub Actions workflow that uses GitHub's built-in deployment tracking.

Benefits:

  • • Automatic deployment event creation
  • • Built-in environment URL tracking
  • • Status monitoring (pending, success, failure)
  • • Seamless DORA metrics integration
.github/workflows/deploy.yml
name: Deploy to Production

on:
  push:
    branches: [main]

permissions:
  contents: read
  deployments: write

jobs:
  deploy:
    runs-on: ubuntu-latest
    environment:
      name: production
      url: https://your-app.com
    
    steps:
      - name: Checkout code
        uses: actions/checkout@v4
      
      - name: Deploy to production
        run: |
          # Add your deployment commands here

Key Configuration:

environment.name Set environment (production, staging)
deployments: write Essential for DORA tracking

Bitbucket Pipelines

If you're using Bitbucket, enable DORA metrics using Bitbucket Pipelines with built-in deployment tracking.

bitbucket-pipelines.yml
image: node:18

pipelines:
  branches:
    main:
      - step:
          name: "Deploy to Production"
          deployment: production
          script:
            - npm ci
            - npm run build
            - echo "Deploying..."

Verify Your Setup

What to Check:

  • • Deployments appear in your dashboard after successful runs
  • • DORA metrics start calculating (may take a few deployments)
  • • Environment and status information is correct
  • • Pull requests are automatically linked to deployments
View Deployments

Troubleshooting

"No Deployments Found"

This usually means your workflow isn't creating deployment events. Make sure:

  • GitHub: Your workflow uses environment: in the job configuration
  • Bitbucket: Your pipeline uses deployment: in the step configuration
  • • Your repository is connected to Coderbuds with the correct permissions

"Deployments found but no production environment"

We found deployments, but they're going to environments other than production. DORA metrics focus on production deployments. Update your workflow to use production as the environment name:

environment:
  name: production  # Use exactly "production"

GitHub Users: Install the GitHub App

For the best experience, install the Coderbuds GitHub App on your repositories. This enables automatic webhook setup and ensures deployment events are captured in real-time. Visit your repository settings in Coderbuds to check the installation status.

FEATURED

In-Depth Guide

Learn the philosophy behind simple, reliable deployments with real-world examples.

Read: Structuring GitHub Workflows