6 min read • Guide 526 of 877
Integrating CI/CD Pipelines with GitScrum
CI/CD pipelines automate build and deployment, but disconnected from project management creates visibility gaps. GitScrum's CI/CD integrations automatically update task status based on pipeline events, providing real-time deployment visibility and connecting code changes to project progress.
CI/CD Integration Points
| Pipeline Stage | GitScrum Action | Benefit |
|---|---|---|
| Branch created | Link to task | Traceability |
| PR opened | Comment on task | Visibility |
| Build fails | Comment + alert | Quick fix |
| Build passes | Update status | Progress tracking |
| Deployed to staging | Transition task | Testing ready |
| Deployed to production | Complete task | Release tracking |
Integration Architecture
CI/CD TO GITSCRUM FLOW
┌─────────────────────────────────────────────────┐
│ DEVELOPMENT │
│ │
│ 1. Developer creates branch │
│ Branch: feature/TASK-234-user-search │
│ │ │
│ ▼ │
│ 2. Commits reference task │
│ "TASK-234: Implement search API" │
│ │ │
│ ▼ │
│ 3. Opens Pull Request │
│ → GitScrum: Comment added to TASK-234 │
│ "PR #567 opened: [link]" │
└─────────────────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────┐
│ CI PIPELINE │
│ │
│ 4. Build & Test │
│ ├── If FAIL → Comment on TASK-234 │
│ │ "Build failed: [logs]" │
│ │ │
│ └── If PASS → Comment on TASK-234 │
│ "Build passed ✓" │
│ │ │
│ ▼ │
│ 5. Code Review Approved │
│ → GitScrum: TASK-234 → "In Review" │
│ │ │
│ ▼ │
│ 6. Merge to main │
│ → GitScrum: TASK-234 → "Ready for Deploy" │
└─────────────────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────┐
│ CD PIPELINE │
│ │
│ 7. Deploy to Staging │
│ → GitScrum: TASK-234 → "In Staging" │
│ Comment: "Deployed to staging [link]" │
│ │ │
│ ▼ │
│ 8. Deploy to Production │
│ → GitScrum: TASK-234 → "Done" │
│ Comment: "Released in v2.3.4" │
└─────────────────────────────────────────────────┘
Webhook Configuration
WEBHOOK SETUP
INCOMING WEBHOOKS (CI/CD → GitScrum):
┌─────────────────────────────────────────────────┐
│ Endpoint: /api/webhooks/ci-cd │
│ │
│ Events to send: │
│ ├── build.started │
│ ├── build.completed │
│ ├── build.failed │
│ ├── deploy.started │
│ ├── deploy.completed │
│ └── deploy.failed │
│ │
│ Payload structure: │
│ { │
│ "event": "build.completed", │
│ "task_id": "TASK-234", │
│ "status": "success", │
│ "details": { │
│ "build_url": "...", │
│ "commit": "abc123", │
│ "duration": "3m 42s" │
│ } │
│ } │
└─────────────────────────────────────────────────┘
OUTGOING WEBHOOKS (GitScrum → CI/CD):
┌─────────────────────────────────────────────────┐
│ Trigger: Task status change to "Deploy" │
│ │
│ Action: Start deployment pipeline │
│ │
│ Payload: │
│ { │
│ "task_id": "TASK-234", │
│ "environment": "staging", │
│ "initiated_by": "jane@company.com" │
│ } │
└─────────────────────────────────────────────────┘
Branch & Commit Conventions
TASK LINKING CONVENTIONS
BRANCH NAMING:
┌─────────────────────────────────────────────────┐
│ Pattern: <type>/TASK-<id>-<description> │
│ │
│ Examples: │
│ feature/TASK-234-user-search │
│ bugfix/TASK-567-login-timeout │
│ hotfix/TASK-890-payment-fix │
│ │
│ CI extracts: TASK-234 from branch name │
└─────────────────────────────────────────────────┘
COMMIT MESSAGE:
┌─────────────────────────────────────────────────┐
│ Pattern: TASK-<id>: <message> │
│ │
│ Examples: │
│ TASK-234: Add user search endpoint │
│ TASK-234: Add search result pagination │
│ TASK-234: Fix search query injection │
│ │
│ Multiple tasks: │
│ TASK-234, TASK-235: Refactor search module │
└─────────────────────────────────────────────────┘
PR TITLE:
┌─────────────────────────────────────────────────┐
│ Pattern: [TASK-<id>] <description> │
│ │
│ Example: │
│ [TASK-234] Implement user search functionality │
└─────────────────────────────────────────────────┘
Pipeline Script Examples
CI/CD SCRIPT INTEGRATION
GITHUB ACTIONS EXAMPLE:
name: Build and Notify
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Extract Task ID
id: task
run: |
TASK_ID=$(echo "${{ github.ref }}" | grep -oP 'TASK-\d+')
echo "task_id=$TASK_ID" >> $GITHUB_OUTPUT
- name: Run Tests
run: npm test
- name: Notify GitScrum - Success
if: success()
run: |
curl -X POST $GITSCRUM_WEBHOOK_URL \
-H "Authorization: Bearer $GITSCRUM_TOKEN" \
-d '{
"task_id": "${{ steps.task.outputs.task_id }}",
"event": "build.completed",
"status": "success",
"url": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
}'
- name: Notify GitScrum - Failure
if: failure()
run: |
curl -X POST $GITSCRUM_WEBHOOK_URL \
-H "Authorization: Bearer $GITSCRUM_TOKEN" \
-d '{
"task_id": "${{ steps.task.outputs.task_id }}",
"event": "build.failed",
"status": "failure",
"url": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
}'
Automation Benefits
INTEGRATION METRICS
BEFORE INTEGRATION:
┌─────────────────────────────────────────────────┐
│ Manual status updates: 15 min/day per dev │
│ Missing deployment info: Common │
│ Build failure notification: Delayed │
│ Release tracking: Spreadsheet │
└─────────────────────────────────────────────────┘
AFTER INTEGRATION:
┌─────────────────────────────────────────────────┐
│ Manual status updates: 0 (automated) │
│ Missing deployment info: None │
│ Build failure notification: Instant │
│ Release tracking: Automatic task links │
└─────────────────────────────────────────────────┘
TIME SAVINGS:
┌─────────────────────────────────────────────────┐
│ 5 developers × 15 min/day = 6.25 hours/week │
│ Annual savings: 325 developer hours │
└─────────────────────────────────────────────────┘
Best Practices
- Consistent naming for branches and commits
- Automate all transitions that can be automated
- Include links to builds and deployments
- Handle failures with actionable information
- Track deployments per environment
- Connect releases to completed tasks
- Monitor integration health
- Document conventions for the team
Anti-Patterns
✗ Manual status updates when automation possible
✗ No task IDs in commits/branches
✗ Silent build failures
✗ Deployments without task updates
✗ Overly complex automation
✗ No error handling in webhooks