taskfile

CI Pipeline — Stages, Generate, Run Locally

Demonstrates the pipeline section and taskfile ci commands.

Features covered

Pipeline

lint (ruff, mypy, pip-audit, bandit)
  → test (unit + integration with Docker)
    → build (docker build + push to GHCR)
      → deploy-staging (auto on develop branch)
        → deploy-prod (manual approval)

Usage

# Generate CI configs from pipeline section
taskfile ci generate --target github    # → .github/workflows/taskfile.yml
taskfile ci generate --target gitlab    # → .gitlab-ci.yml
taskfile ci generate --all              # all 6 platforms

# Preview without writing files
taskfile ci preview --target github

# Run pipeline locally (same stages as CI)
taskfile ci run                         # full pipeline
taskfile ci run --stage test            # only test stage
taskfile ci run --skip deploy-prod      # all except prod deploy
taskfile ci run --stop-at build         # lint → test → build, skip deploy

# Run individual tasks
taskfile run test
taskfile --env staging run deploy-staging
taskfile --env prod run deploy-prod --dry-run

# List pipeline stages
taskfile ci list

Key concepts