clienwork
ComparePricingDocsBlog
Documentation
IntroductionQuick StartCore Concepts
GitHub IntegrationSlack IntegrationEmail InboundMCP ServerError TrackingDeployment Tracking
Previous
Error Tracking
Next
AI Assistant

© 2025 Clienwork. All rights reserved.

Terms of ServiceRefund PolicyPrivacy PolicySupportBlog

Deployment Tracking

Track deployments from your CI/CD pipeline and link them to requests.

Overview

Clienwork's deployment tracking:

  • Records deployments from any CI/CD provider
  • Auto-links requests mentioned in commit messages
  • Updates request status on successful deployment
  • Tracks deployment history by environment
  • Supports GitHub Actions, GitLab CI, Jenkins, CircleCI, and custom providers

Viewing Deployments

  1. Go to Project → Settings → Deployments
  2. View deployment history with status and details
  3. Filter by environment (production, staging, development)

Deployment Information

Each deployment shows:

FieldDescription
Statussuccess, failure, pending, running, cancelled
Environmentproduction, staging, development, etc.
Commit SHAGit commit hash
Commit MessageGit commit message
RefBranch or tag reference
CI ProviderGitHub Actions, GitLab CI, etc.
CI Run URLLink to CI/CD run details
Deployed ByUser who triggered the deployment
TimestampsStarted and completed times

CI/CD Webhook Setup

API Endpoint

POST https://app.clienwork.com/api/webhooks/ci

Authentication

Include your API key in one of these headers:

Authorization: Bearer <api-key>
X-API-Key: <api-key>
X-Clienwork-API-Key: <api-key>

Get your API key from Workspace → Settings → API Keys.

Request Headers

HeaderDescriptionValues
AuthorizationAPI keyBearer <api-key>
Content-TypeJSON contentapplication/json
X-CI-ProviderCI providergithub-actions, gitlab-ci, jenkins, circleci, custom

Request Body

{
  "event": "deploy.completed",
  "project_id": "project-uuid-or-slug",
  "status": "success",
  "ref": "refs/heads/main",
  "commit_sha": "abc123def456",
  "commit_message": "feat: add login feature #PR-123",
  "environment": "production",
  "url": "https://github.com/org/repo/actions/runs/123456"
}

Events

EventDescription
build.startedBuild process started
build.completedBuild process completed
test.startedTest suite started
test.completedTest suite completed
deploy.startedDeployment started
deploy.completedDeployment completed

Status Values

  • pending - Waiting to start
  • running - Currently in progress
  • success - Completed successfully
  • failure - Failed
  • cancelled - Cancelled by user

Provider Examples

GitHub Actions

# .github/workflows/deploy.yml
name: Deploy

on:
  push:
    branches: [main]

jobs:
  deploy:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v4

      - name: Deploy
        run: |
          # Your deployment steps here

      - name: Notify Clienwork
        if: always()
        run: |
          curl -X POST https://app.clienwork.com/api/webhooks/ci \
            -H "Authorization: Bearer ${{ secrets.CLIENWORK_API_KEY }}" \
            -H "Content-Type: application/json" \
            -H "X-CI-Provider: github-actions" \
            -d '{
              "event": "deploy.completed",
              "project_slug": "my-project",
              "status": "${{ job.status == 'success' && 'success' || 'failure' }}",
              "ref": "${{ github.ref }}",
              "commit_sha": "${{ github.sha }}",
              "commit_message": "${{ github.event.head_commit.message }}",
              "environment": "production",
              "url": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
            }'

GitLab CI

# .gitlab-ci.yml
deploy:
  stage: deploy
  script:
    - # Your deployment steps here
  after_script:
    - |
      curl -X POST https://app.clienwork.com/api/webhooks/ci \
        -H "Authorization: Bearer $CLIENWORK_API_KEY" \
        -H "Content-Type: application/json" \
        -H "X-CI-Provider: gitlab-ci" \
        -d "{
          \"event\": \"deploy.completed\",
          \"project_slug\": \"my-project\",
          \"status\": \"$CI_JOB_STATUS\",
          \"ref\": \"$CI_COMMIT_REF_NAME\",
          \"commit_sha\": \"$CI_COMMIT_SHA\",
          \"commit_message\": \"$CI_COMMIT_MESSAGE\",
          \"environment\": \"production\",
          \"url\": \"$CI_PIPELINE_URL\"
        }"

Jenkins

// Jenkinsfile
pipeline {
    agent any

    environment {
        CLIENWORK_API_KEY = credentials('clienwork-api-key')
    }

    stages {
        stage('Deploy') {
            steps {
                // Your deployment steps here
            }
        }
    }

    post {
        always {
            script {
                def status = currentBuild.result == 'SUCCESS' ? 'success' : 'failure'
                sh """
                    curl -X POST https://app.clienwork.com/api/webhooks/ci \
                        -H "Authorization: Bearer ${CLIENWORK_API_KEY}" \
                        -H "Content-Type: application/json" \
                        -H "X-CI-Provider: jenkins" \
                        -d '{
                            "event": "deploy.completed",
                            "project_slug": "my-project",
                            "status": "${status}",
                            "ref": "${GIT_BRANCH}",
                            "commit_sha": "${GIT_COMMIT}",
                            "environment": "production",
                            "url": "${BUILD_URL}"
                        }'
                """
            }
        }
    }
}

Auto-Linking Requests

Clienwork automatically links deployments to requests when commit messages contain:

  • #PR-123 - Links to request PR-123
  • #REQ-456 - Links to request REQ-456
  • fixes #PR-123 - Links and updates status
  • closes #PR-123 - Links and updates status

Example

git commit -m "feat: add user authentication #PR-123 #PR-124"

When this deployment completes successfully, requests PR-123 and PR-124 are automatically linked and can be marked as deployed.

Webhook Response

Success

{
  "success": true,
  "deployment_id": "dep_abc123",
  "linked_requests": ["PR-123", "PR-124"],
  "message": "Processed deploy.completed event. Linked 2 request(s)."
}

Error

{
  "error": "Invalid event type: invalid",
  "valid_events": [
    "build.started",
    "build.completed",
    "test.started",
    "test.completed",
    "deploy.started",
    "deploy.completed"
  ]
}