CI/CD Best Practices | Automated Delivery Pipelines
Implement CI/CD pipelines that catch issues early and deploy with confidence. GitScrum integrates with CI/CD tools to show build status and deployment progress.
6 min read
Continuous Integration and Continuous Deployment transform how teams deliver software by automating builds, tests, and deployments. GitScrum integrates with CI/CD pipelines to provide visibility into deployment status, connect releases to project progress, and ensure team coordination around automated delivery processes.
Pipeline Fundamentals
CI/CD Pipeline Stages
STANDARD PIPELINE FLOW:
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β β
β ββββββββββ ββββββββββ ββββββββββ ββββββββββ ββββββββ β
β β Commit ββ β Build ββ β Test ββ β Deploy ββ βVerifyβ β
β ββββββββββ ββββββββββ ββββββββββ ββββββββββ ββββββββ β
β β β β β β β
β β β β β β β
β Push to Compile Unit + Staging Smoke β
β branch & Package Integration or Prod Tests β
β β
β GITSCRUM INTEGRATION: β
β β’ Task updated to "Building" β
β β’ Test results linked to task β
β β’ Deployment status tracked β
β β’ Release notes auto-generated β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Pipeline Configuration
RECOMMENDED PIPELINE SETUP:
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β STAGE β TIMEOUT β ON FAILURE β
βββββββββββββββββββΌββββββββββΌββββββββββββββββββββββββββββββββββ€
β Lint/Format β 2 min β Block merge β
β Unit Tests β 10 min β Block merge β
β Build β 5 min β Block merge β
β Integration β 15 min β Block merge β
β Security Scan β 10 min β Warn (block on critical) β
β Deploy Staging β 10 min β Stop pipeline β
β E2E Tests β 20 min β Stop pipeline β
β Deploy Prod β 10 min β Alert + rollback β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Test Automation
Test Pyramid
TESTING STRATEGY:
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β β
β β±β² β
β β± β² β
β β± E2Eβ² Few, slow, expensive β
β β±βββββββ² (5-10% of tests) β
β β± β² β
β β±Integrationβ² Some, medium speed β
β β±βββββββββββββ² (15-25% of tests) β
β β± β² β
β β± Unit Tests β² Many, fast, cheap β
β β±βββββββββββββββββββ² (65-80% of tests) β
β β
β EXECUTION TIME TARGETS: β
β β’ Unit tests: < 2 minutes β
β β’ Integration: < 10 minutes β
β β’ E2E: < 20 minutes β
β β’ Full pipeline: < 30 minutes β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Handling Flaky Tests
FLAKY TEST MANAGEMENT:
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β β
β DETECTION: β
β β’ Track test pass/fail rates over time β
β β’ Identify tests that fail intermittently β
β β’ Set threshold (e.g., <95% pass rate = flaky) β
β β
β QUARANTINE PROCESS: β
β 1. Mark test as flaky in GitScrum β
β 2. Move to separate test suite β
β 3. Don't block deployments on flaky tests β
β 4. Fix or remove within 2 weeks β
β β
β PREVENTION: β
β β’ Avoid time-dependent tests β
β β’ Use deterministic test data β
β β’ Isolate tests from external services β
β β’ Review test design in code reviews β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Deployment Strategies
Progressive Deployment
DEPLOYMENT OPTIONS:
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β β
β ROLLING DEPLOYMENT: β
β [β β β β β β‘β‘β‘β‘β‘] β [β β β β β β β β‘β‘β‘] β [β β β β β β β β β β ] β
β Old version Gradual New version β
β rollout β
β β
β BLUE-GREEN: β
β Blue (live) βββββββββββββ¬ββββ Blue (standby) β
β Green (standby) βββββββββ΄ββββ Green (live) β
β Instant switch, easy rollback β
β β
β CANARY: β
β [β β β β β β β β β β‘] β [β β β β β β β β‘β‘β‘] β [β β β β β β‘β‘β‘β‘β‘] β
β 1% traffic 10% traffic 50% traffic β
β Gradual increase based on metrics β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Feature Flags
FEATURE FLAG WORKFLOW:
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β β
β 1. DEVELOP: β
β if (featureFlags.isEnabled('new-checkout')) { β
β return newCheckout(); β
β } β
β return oldCheckout(); β
β β
β 2. DEPLOY (flag off): β
β Code goes to production, feature hidden β
β β
β 3. ROLLOUT: β
β β’ Enable for internal users β
β β’ Enable for beta users (10%) β
β β’ Enable for all users (100%) β
β β
β 4. CLEANUP: β
β Remove flag and old code after stable β
β β
β Track flag status in GitScrum: β
β β’ Link feature tasks to flags β
β β’ Track rollout progress β
β β’ Document cleanup tasks β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
GitScrum Integration
Pipeline Status Visibility
GITSCRUM CI/CD DASHBOARD:
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β RECENT DEPLOYMENTS β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β β
β β
v2.4.1 β Production 2 min ago [View Release] β
β βββ Tasks: #234, #256, #267 β
β β
β β
v2.4.1 β Staging 45 min ago [View Release] β
β βββ All tests passed (234/234) β
β β
β β v2.4.0 β Staging 2 hrs ago [View Logs] β
β βββ Integration tests failed β
β β
β PIPELINE HEALTH: β
β Today: 12 builds, 10 passed (83%) β
β Avg build time: 8m 32s β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Automated Task Updates
CI/CD β GITSCRUM AUTOMATION:
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β PIPELINE EVENT β GITSCRUM ACTION β
βββββββββββββββββββββββββββΌββββββββββββββββββββββββββββββββββββ€
β PR opened β Create/link task if needed β
β Build started β Update task to "Building" β
β Tests passed β Add "tests-passing" label β
β Tests failed β Add "tests-failing" label β
β Deployed to staging β Update task to "In Staging" β
β Deployed to production β Update task to "Released" β
β Deployment failed β Alert team, add blocker β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ