Track deployments from your CI/CD pipeline and link them to requests.
Clienwork's deployment tracking:
Each deployment shows:
| Field | Description |
|---|---|
| Status | success, failure, pending, running, cancelled |
| Environment | production, staging, development, etc. |
| Commit SHA | Git commit hash |
| Commit Message | Git commit message |
| Ref | Branch or tag reference |
| CI Provider | GitHub Actions, GitLab CI, etc. |
| CI Run URL | Link to CI/CD run details |
| Deployed By | User who triggered the deployment |
| Timestamps | Started and completed times |
POST https://app.clienwork.com/api/webhooks/ci
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.
| Header | Description | Values |
|---|---|---|
| Authorization | API key | Bearer <api-key> |
| Content-Type | JSON content | application/json |
| X-CI-Provider | CI provider | github-actions, gitlab-ci, jenkins, circleci, custom |
{
"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"
}
| Event | Description |
|---|---|
| build.started | Build process started |
| build.completed | Build process completed |
| test.started | Test suite started |
| test.completed | Test suite completed |
| deploy.started | Deployment started |
| deploy.completed | Deployment completed |
pending - Waiting to startrunning - Currently in progresssuccess - Completed successfullyfailure - Failedcancelled - Cancelled by user# .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.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\"
}"
// 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}"
}'
"""
}
}
}
}
Clienwork automatically links deployments to requests when commit messages contain:
#PR-123 - Links to request PR-123#REQ-456 - Links to request REQ-456fixes #PR-123 - Links and updates statuscloses #PR-123 - Links and updates statusgit 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.
{
"success": true,
"deployment_id": "dep_abc123",
"linked_requests": ["PR-123", "PR-124"],
"message": "Processed deploy.completed event. Linked 2 request(s)."
}
{
"error": "Invalid event type: invalid",
"valid_events": [
"build.started",
"build.completed",
"test.started",
"test.completed",
"deploy.started",
"deploy.completed"
]
}