Skip to content

Infrastructure, cloud, and GitOps · T26–T40 ​

Encyclopedia home · Search machine-readable catalog

Each code block is a complete workflow file for the stated platform. App code, provisioned resources, and tools listed as prerequisites are supplied by the consuming repository or lab. Privileged templates are manual and use trusted, dedicated runners and reviewed target environments.

T26 ​

Self-hosted Gitea runner infrastructure

  • Platform Gitea Actions.
  • File .gitea/workflows/t26-self-hosted-gitea-runner-infrastructure.yml.
  • Prerequisites registered act_runner, dedicated trusted Linux runner, Gitea Actions enabled.
  • Execution verify.
  • Validation syntax-validated. External tools and provider controls require validation in your lab.
yaml
name: Self-hosted Gitea runner infrastructure
on:
  workflow_dispatch: {}
jobs:
  verify:
    runs-on: ubuntu-latest
    timeout-minutes: 20
    defaults:
      run:
        shell: bash
    if: github.ref == 'refs/heads/main'
    env:
      GITEA_URL: ${{ vars.GITEA_URL }}
    steps:
    - uses: https://github.com/actions/checkout@v4
      with:
        persist-credentials: false
        fetch-depth: 0
    - name: Verify checkout
      run: |-
        git rev-parse --verify HEAD
    - name: Execute
      run: |-
        test -s README.md
        printf 'job_host=%s\n' "$(hostname)"
    - name: Verify result
      run: |-
        curl -fsS --max-time 5 "${GITEA_URL:?}/api/v1/version" | jq -e '.version'

Verification and failure handling. Follow CICD-201 to CICD-215 to provision and constrain runner. A successful service probe confirms checkout and route wiring. On a dedicated runner VM, create a volume for the Gitea runner state, register the runner against your Gitea instance and start it in Docker or as a dedicated system service. Configure GITEA_URL as a repository variable that the job container can reach. Provision trust for any private CA and reserve a different runner label for privileged workloads.

Related CICD-201 · CICD-204 · CICD-205 · CICD-215 · Workflow reference

T27 ​

Autoscaling Kubernetes CI runners

  • Platform GitHub Actions.
  • File .github/workflows/t27-autoscaling-kubernetes-ci-runners.yml.
  • Prerequisites disposable cluster with ARC controller, trusted installed runner group and approved scale-set values.
  • Execution delivery.
  • Validation syntax-validated. External tools and provider controls require validation in your lab.
yaml
name: Autoscaling Kubernetes CI runners
on:
  workflow_dispatch: {}
jobs:
  delivery:
    runs-on:
    - self-hosted
    - linux
    - platform-lab
    timeout-minutes: 20
    defaults:
      run:
        shell: bash
    if: github.ref == 'refs/heads/main'
    environment: staging
    steps:
    - uses: actions/checkout@v4
      with:
        persist-credentials: false
        fetch-depth: 0
    - name: Preflight
      run: |-
        test -s platform/arc-values.yaml
    - name: Execute
      run: |-
        helm upgrade --install ci-runners oci://ghcr.io/actions/actions-runner-controller-charts/gha-runner-scale-set -n arc-runners --create-namespace -f platform/arc-values.yaml --wait --timeout 4m
    - name: Verify result
      run: |-
        kubectl -n arc-runners get autoscalingrunnersets.actions.github.com -o name | grep .
permissions:
  contents: read
concurrency:
  group: t27-reviewed-delivery
  cancel-in-progress: false

Verification and failure handling. After bootstrap, queue a known trusted job targeting ci-runners and measure min/max capacity.

Related CICD-209 · CICD-210 · Workflow reference

T28 ​

Multi-repository workflow orchestration

  • Platform GitHub Actions.
  • File .github/workflows/t28-multi-repository-workflow-orchestration.yml.
  • Prerequisites targets.txt holds one allowlisted repo per line; scoped GitHub App token and downstream consume.yml manual trigger.
  • Execution delivery.
  • Validation syntax-validated. External tools and provider controls require validation in your lab.
yaml
name: Multi-repository workflow orchestration
on:
  workflow_dispatch: {}
jobs:
  delivery:
    runs-on:
    - self-hosted
    - linux
    - platform-lab
    timeout-minutes: 20
    defaults:
      run:
        shell: bash
    if: github.ref == 'refs/heads/main'
    environment: staging
    env:
      DISPATCH_TOKEN: ${{ secrets.DISPATCH_TOKEN }}
    steps:
    - uses: actions/checkout@v4
      with:
        persist-credentials: false
        fetch-depth: 0
    - name: Preflight
      run: |-
        test -s targets.txt
    - name: Execute
      run: |-
        while IFS= read -r repo; do [[ "$repo" =~ ^example-org/(api|worker|portal)$ ]]; GH_TOKEN="$DISPATCH_TOKEN" gh workflow run consume.yml --repo "$repo" --ref main -f source_sha="$GITHUB_SHA"; done < targets.txt
    - name: Verify result
      run: |-
        GH_TOKEN="$DISPATCH_TOKEN" gh run list --repo example-org/api --workflow consume.yml --limit 1 --json status,url
permissions:
  contents: read
concurrency:
  group: t28-reviewed-delivery
  cancel-in-progress: false

Verification and failure handling. Replace example-org with your approved organization. Downstream jobs must deduplicate SHA and emit correlation evidence.

Related CICD-218 · CICD-224 · CICD-230 · Workflow reference

T29 ​

Terraform plan, approval and apply

  • Platform GitHub Actions.
  • File .github/workflows/t29-terraform-plan-approval-and-apply.yml.
  • Prerequisites Pinned Terraform and AWS CLI, approved staging backend, restricted KMS-encrypted plan bucket, trusted runner identity and a staging approval rule. Reviewers require read-only access to the private plan review prefix.
  • Execution plan → apply.
  • Validation syntax-validated. External tools and provider controls require validation in your lab.
yaml
name: Terraform plan, approval and apply
on:
  workflow_dispatch: {}
jobs:
  plan:
    if: github.ref == 'refs/heads/main'
    runs-on: &id001
    - self-hosted
    - linux
    - platform-lab
    timeout-minutes: 20
    defaults:
      run:
        shell: bash
    outputs:
      checksum: ${{ steps.plan.outputs.checksum }}
    steps:
    - uses: actions/checkout@v4
      with:
        persist-credentials: false
        fetch-depth: 0
    - name: Validate configuration
      run: |-
        terraform -chdir=infra fmt -check -recursive
        terraform -chdir=infra init -backend=false -input=false
        terraform -chdir=infra validate
    - name: Create exact reviewed plan
      id: plan
      run: |-
        terraform -chdir=infra init -input=false -lockfile=readonly
        terraform -chdir=infra plan -input=false -lock-timeout=2m -out=tfplan
        tar -czf review-plan.tar.gz -C infra tfplan
        printf 'checksum=%s\n' "$(sha256sum review-plan.tar.gz | cut -d' ' -f1)" >> "$GITHUB_OUTPUT"
        terraform -chdir=infra show -no-color tfplan > "$RUNNER_TEMP/sensitive-plan.txt"
        aws s3 cp review-plan.tar.gz "s3://${PLAN_BUCKET:?}/plans/$GITHUB_RUN_ID-$GITHUB_RUN_ATTEMPT.tar.gz" --sse aws:kms --only-show-errors
        aws s3 cp "$RUNNER_TEMP/sensitive-plan.txt" "s3://$PLAN_BUCKET/reviews/$GITHUB_RUN_ID-$GITHUB_RUN_ATTEMPT.txt" --sse aws:kms --only-show-errors
    env:
      PLAN_BUCKET: ${{ vars.PLAN_BUCKET }}
  apply:
    runs-on: *id001
    timeout-minutes: 20
    defaults:
      run:
        shell: bash
    if: github.ref == 'refs/heads/main'
    environment: staging
    needs: plan
    env:
      PLAN_BUCKET: ${{ vars.PLAN_BUCKET }}
      EXPECTED_PLAN_SHA: ${{ needs.plan.outputs.checksum }}
    steps:
    - uses: actions/checkout@v4
      with:
        persist-credentials: false
        fetch-depth: 0
    - name: Fetch and verify approved plan
      run: |-
        aws s3 cp "s3://${PLAN_BUCKET:?}/plans/$GITHUB_RUN_ID-$GITHUB_RUN_ATTEMPT.tar.gz" review-plan.tar.gz --only-show-errors
        printf '%s  review-plan.tar.gz\n' "${EXPECTED_PLAN_SHA:?}" | sha256sum --strict --check
        tar -xzf review-plan.tar.gz -C infra
    - name: Apply and verify exact plan
      run: |-
        terraform -chdir=infra init -input=false -lockfile=readonly
        terraform -chdir=infra apply -input=false -lock-timeout=2m tfplan
        terraform -chdir=infra output -json | jq 'keys'
permissions:
  contents: read
concurrency:
  group: terraform-staging-state
  cancel-in-progress: false

Verification and failure handling. The plan job stores a restricted review file and an immutable per-attempt binary plan with its checksum. The staging environment reviewer checks that exact plan summary before allowing apply. Use separate scoped credentials for planning and applying, and emergency recovery if state moves. Do not rerun only the apply job after a failed attempt, because the run attempt is part of the plan key.

Related CICD-235 · CICD-237 · CICD-239 · Workflow reference

T30 ​

Terraform drift detection and remediation

  • Platform GitHub Actions.
  • File .github/workflows/t30-terraform-drift-detection-and-remediation.yml.
  • Prerequisites Terraform provisioned, read-only plan identity and disposable approved backend.
  • Execution delivery.
  • Validation syntax-validated. External tools and provider controls require validation in your lab.
yaml
name: Terraform drift detection and remediation
on:
  workflow_dispatch: {}
jobs:
  delivery:
    runs-on:
    - self-hosted
    - linux
    - platform-lab
    timeout-minutes: 20
    defaults:
      run:
        shell: bash
    steps:
    - uses: actions/checkout@v4
      with:
        persist-credentials: false
        fetch-depth: 0
    - name: Preflight
      run: |-
        terraform -chdir=infra fmt -check -recursive
    - name: Execute
      run: |-
        terraform -chdir=infra init -input=false -lockfile=readonly
        status=0
        terraform -chdir=infra plan -refresh-only -input=false -detailed-exitcode -no-color || status=$?
        if test "$status" -eq 2; then echo 'Drift: review configuration or investigate the external change'; exit 2; fi
        exit "$status"
    - name: Verify result
      run: |-
        echo 'No observed external changes'
permissions:
  contents: read

Verification and failure handling. The drift job never applies a refresh plan automatically. Remediate through reviewed source and T29, then rerun.

Related CICD-240 · CICD-241 · Workflow reference

T31 ​

Ansible server provisioning

  • Platform GitHub Actions.
  • File .github/workflows/t31-ansible-server-provisioning.yml.
  • Prerequisites pinned Ansible and collections, approved staging SSH trust and inventory.
  • Execution delivery.
  • Validation syntax-validated. External tools and provider controls require validation in your lab.
yaml
name: Ansible server provisioning
on:
  workflow_dispatch: {}
jobs:
  delivery:
    runs-on:
    - self-hosted
    - linux
    - platform-lab
    timeout-minutes: 20
    defaults:
      run:
        shell: bash
    if: github.ref == 'refs/heads/main'
    environment: staging
    steps:
    - uses: actions/checkout@v4
      with:
        persist-credentials: false
        fetch-depth: 0
    - name: Preflight
      run: |-
        ansible-playbook -i inventory/staging.yml --syntax-check playbooks/bootstrap.yml
    - name: Execute
      run: |-
        ansible-playbook -i inventory/staging.yml --limit canary --check playbooks/bootstrap.yml
        ansible-playbook -i inventory/staging.yml --limit canary playbooks/bootstrap.yml
    - name: Verify result
      run: |-
        ansible-playbook -i inventory/staging.yml --limit canary playbooks/health.yml
permissions:
  contents: read
concurrency:
  group: t31-reviewed-delivery
  cancel-in-progress: false

Verification and failure handling. The canary provision and health gate precede a separately approved wider rollout.

Related CICD-247 · CICD-251 · CICD-260 · Workflow reference

T32 ​

Automated Linux security patching

  • Platform GitHub Actions.
  • File .github/workflows/t32-automated-linux-security-patching.yml.
  • Prerequisites approved Debian canary inventory, reviewed patch and health playbooks with serial batches.
  • Execution delivery.
  • Validation syntax-validated. External tools and provider controls require validation in your lab.
yaml
name: Automated Linux security patching
on:
  workflow_dispatch: {}
jobs:
  delivery:
    runs-on:
    - self-hosted
    - linux
    - platform-lab
    timeout-minutes: 20
    defaults:
      run:
        shell: bash
    if: github.ref == 'refs/heads/main'
    environment: staging
    steps:
    - uses: actions/checkout@v4
      with:
        persist-credentials: false
        fetch-depth: 0
    - name: Preflight
      run: |-
        ansible-playbook -i inventory/staging.yml --syntax-check playbooks/security.yml
    - name: Execute
      run: |-
        ansible-playbook -i inventory/staging.yml --limit debian_canary --check playbooks/security.yml
        ansible-playbook -i inventory/staging.yml --limit debian_canary playbooks/security.yml
    - name: Verify result
      run: |-
        ansible-playbook -i inventory/staging.yml --limit debian_canary playbooks/health.yml
permissions:
  contents: read
concurrency:
  group: t32-reviewed-delivery
  cancel-in-progress: false

Verification and failure handling. Review allowed package origins and reboot strategy. Run the workflow only during an approved patch window.

Related CICD-255 · CICD-258 · Workflow reference

T33 ​

AWS ECS continuous delivery

  • Platform GitHub Actions.
  • File .github/workflows/t33-aws-ecs-continuous-delivery.yml.
  • Prerequisites trusted AWS CLI identity, ECS cluster, service and immutable registered task definition.
  • Execution delivery.
  • Validation syntax-validated. External tools and provider controls require validation in your lab.
yaml
name: AWS ECS continuous delivery
on:
  workflow_dispatch: {}
jobs:
  delivery:
    runs-on:
    - self-hosted
    - linux
    - platform-lab
    timeout-minutes: 20
    defaults:
      run:
        shell: bash
    if: github.ref == 'refs/heads/main'
    environment: staging
    env:
      ECS_CLUSTER: ${{ vars.ECS_CLUSTER }}
      ECS_SERVICE: ${{ vars.ECS_SERVICE }}
      TASK_DEF_ARN: ${{ vars.TASK_DEF_ARN }}
    steps:
    - uses: actions/checkout@v4
      with:
        persist-credentials: false
        fetch-depth: 0
    - name: Preflight
      run: |-
        aws sts get-caller-identity --query Arn --output text
    - name: Execute
      run: |-
        aws ecs update-service --cluster "${ECS_CLUSTER:?}" --service "${ECS_SERVICE:?}" --task-definition "${TASK_DEF_ARN:?}" >/dev/null
        aws ecs wait services-stable --cluster "$ECS_CLUSTER" --services "$ECS_SERVICE"
    - name: Verify result
      run: |-
        aws ecs describe-services --cluster "$ECS_CLUSTER" --services "$ECS_SERVICE" --query 'services[0].taskDefinition' --output text | grep -Fx "$TASK_DEF_ARN"
permissions:
  contents: read
concurrency:
  group: t33-reviewed-delivery
  cancel-in-progress: false

Verification and failure handling. Stable alone is insufficient when deployments roll back. Verify intended revision and application health.

Related CICD-261 · CICD-265 · Workflow reference

T34 ​

AWS Lambda serverless delivery

  • Platform GitHub Actions.
  • File .github/workflows/t34-aws-lambda-serverless-delivery.yml.
  • Prerequisites build inputs in lambda/, Python Lambda function, authorized CLI identity and test function.
  • Execution delivery.
  • Validation syntax-validated. External tools and provider controls require validation in your lab.
yaml
name: AWS Lambda serverless delivery
on:
  workflow_dispatch: {}
jobs:
  delivery:
    runs-on:
    - self-hosted
    - linux
    - platform-lab
    timeout-minutes: 20
    defaults:
      run:
        shell: bash
    if: github.ref == 'refs/heads/main'
    environment: staging
    env:
      LAMBDA_NAME: ${{ vars.LAMBDA_NAME }}
    steps:
    - uses: actions/checkout@v4
      with:
        persist-credentials: false
        fetch-depth: 0
    - name: Preflight
      run: |-
        test -s lambda/lambda_function.py
    - name: Execute
      run: |-
        (cd lambda && zip -r ../function.zip .)
        aws lambda update-function-code --function-name "${LAMBDA_NAME:?}" --zip-file fileb://function.zip >/dev/null
        aws lambda wait function-updated --function-name "$LAMBDA_NAME"
        aws lambda publish-version --function-name "$LAMBDA_NAME" --query Version --output text > candidate-version
    - name: Verify result
      run: |-
        aws lambda invoke --function-name "$LAMBDA_NAME" --qualifier "$(cat candidate-version)" --payload '{}' --cli-binary-format raw-in-base64-out response.json | jq -e '.StatusCode == 200 and (.FunctionError|not)'
permissions:
  contents: read
concurrency:
  group: t34-reviewed-delivery
  cancel-in-progress: false

Verification and failure handling. Smoke-test the version before moving an alias through a reviewed step.

Related CICD-267 · Workflow reference

T35 ​

Azure AKS continuous delivery

  • Platform GitHub Actions.
  • File .github/workflows/t35-azure-aks-continuous-delivery.yml.
  • Prerequisites preconfigured federated Azure CLI session, kubelogin and scoped AKS RBAC.
  • Execution delivery.
  • Validation syntax-validated. External tools and provider controls require validation in your lab.
yaml
name: Azure AKS continuous delivery
on:
  workflow_dispatch: {}
jobs:
  delivery:
    runs-on:
    - self-hosted
    - linux
    - platform-lab
    timeout-minutes: 20
    defaults:
      run:
        shell: bash
    if: github.ref == 'refs/heads/main'
    environment: staging
    env:
      AKS_NAME: ${{ vars.AKS_NAME }}
      AKS_RG: ${{ vars.AKS_RG }}
      HEALTH_URL: ${{ vars.HEALTH_URL }}
      IMAGE: ${{ vars.IMAGE }}
    steps:
    - uses: actions/checkout@v4
      with:
        persist-credentials: false
        fetch-depth: 0
    - name: Preflight
      run: |-
        command -v kubectl
        command -v az
    - name: Execute
      run: |-
        az aks get-credentials --resource-group "${AKS_RG:?}" --name "${AKS_NAME:?}" --file "$RUNNER_TEMP/aks-config" --overwrite-existing
        export KUBECONFIG="$RUNNER_TEMP/aks-config"
        [[ "${IMAGE:?}" =~ @sha256:[0-9a-f]{64}$ ]]
        kubectl -n staging set image deployment/web web="$IMAGE"
        kubectl -n staging rollout status deploy/web --timeout=180s
    - name: Verify result
      run: |-
        curl -fsS --max-time 10 "${HEALTH_URL:?}"
permissions:
  contents: read
concurrency:
  group: t35-reviewed-delivery
  cancel-in-progress: false

Verification and failure handling. Verify subscription and RBAC. Use the scoped runner identity instead of admin kubeconfig.

Related CICD-270 · CICD-272 · Workflow reference

T36 ​

Google GKE continuous delivery

  • Platform GitHub Actions.
  • File .github/workflows/t36-google-gke-continuous-delivery.yml.
  • Prerequisites scoped gcloud federation, gke-gcloud-auth-plugin and staging RBAC.
  • Execution delivery.
  • Validation syntax-validated. External tools and provider controls require validation in your lab.
yaml
name: Google GKE continuous delivery
on:
  workflow_dispatch: {}
jobs:
  delivery:
    runs-on:
    - self-hosted
    - linux
    - platform-lab
    timeout-minutes: 20
    defaults:
      run:
        shell: bash
    if: github.ref == 'refs/heads/main'
    environment: staging
    env:
      GCP_PROJECT: ${{ vars.GCP_PROJECT }}
      GKE_CLUSTER: ${{ vars.GKE_CLUSTER }}
      GKE_LOCATION: ${{ vars.GKE_LOCATION }}
      HEALTH_URL: ${{ vars.HEALTH_URL }}
      IMAGE: ${{ vars.IMAGE }}
    steps:
    - uses: actions/checkout@v4
      with:
        persist-credentials: false
        fetch-depth: 0
    - name: Preflight
      run: |-
        command -v gke-gcloud-auth-plugin
        command -v kubectl
    - name: Execute
      run: |-
        export KUBECONFIG="$RUNNER_TEMP/gke-config"
        gcloud container clusters get-credentials "${GKE_CLUSTER:?}" --location "${GKE_LOCATION:?}" --project "${GCP_PROJECT:?}"
        [[ "${IMAGE:?}" =~ @sha256:[0-9a-f]{64}$ ]]
        kubectl -n staging set image deploy/web web="$IMAGE"
        kubectl -n staging rollout status deploy/web --timeout=180s
    - name: Verify result
      run: |-
        curl -fsS --max-time 10 "${HEALTH_URL:?}"
permissions:
  contents: read
concurrency:
  group: t36-reviewed-delivery
  cancel-in-progress: false

Verification and failure handling. Verify project/location and match test digest. Add separate endpoint authentication as needed.

Related CICD-273 · CICD-275 · Workflow reference

T37 ​

Multi-cluster Kubernetes delivery

  • Platform GitHub Actions.
  • File .github/workflows/t37-multi-cluster-kubernetes-delivery.yml.
  • Prerequisites two isolated staging cluster contexts, scoped identity and manifests/web.yaml.
  • Execution delivery.
  • Validation syntax-validated. External tools and provider controls require validation in your lab.
yaml
name: Multi-cluster Kubernetes delivery
on:
  workflow_dispatch: {}
jobs:
  delivery:
    runs-on:
    - self-hosted
    - linux
    - platform-lab
    timeout-minutes: 20
    defaults:
      run:
        shell: bash
    if: github.ref == 'refs/heads/main'
    environment: staging
    env:
      PRIMARY_CONTEXT: ${{ vars.PRIMARY_CONTEXT }}
      SECONDARY_CONTEXT: ${{ vars.SECONDARY_CONTEXT }}
    steps:
    - uses: actions/checkout@v4
      with:
        persist-credentials: false
        fetch-depth: 0
    - name: Preflight
      run: |-
        test -s manifests/web.yaml
    - name: Execute
      run: |-
        for cluster in "${PRIMARY_CONTEXT:?}" "${SECONDARY_CONTEXT:?}"; do kubectl --context "$cluster" -n staging apply --dry-run=server -f manifests/web.yaml; done
        for cluster in "$PRIMARY_CONTEXT" "$SECONDARY_CONTEXT"; do kubectl --context "$cluster" -n staging apply -f manifests/web.yaml; kubectl --context "$cluster" -n staging rollout status deployment/web --timeout=180s; done
    - name: Verify result
      run: |-
        for cluster in "$PRIMARY_CONTEXT" "$SECONDARY_CONTEXT"; do kubectl --context "$cluster" -n staging get deploy web -o json | jq -e '.status.availableReplicas == .spec.replicas'; done
permissions:
  contents: read
concurrency:
  group: t37-reviewed-delivery
  cancel-in-progress: false

Verification and failure handling. The second write requires primary success. Watch each cluster independently and preserve partial deployment state.

Related CICD-290 · Workflow reference

T38 ​

Argo CD ApplicationSet delivery

  • Platform GitHub Actions.
  • File .github/workflows/t38-argo-cd-applicationset-delivery.yml.
  • Prerequisites staging Argo CD installed with authorized cluster access and reviewed ApplicationSet file.
  • Execution delivery.
  • Validation syntax-validated. External tools and provider controls require validation in your lab.
yaml
name: Argo CD ApplicationSet delivery
on:
  workflow_dispatch: {}
jobs:
  delivery:
    runs-on:
    - self-hosted
    - linux
    - platform-lab
    timeout-minutes: 20
    defaults:
      run:
        shell: bash
    if: github.ref == 'refs/heads/main'
    environment: staging
    steps:
    - uses: actions/checkout@v4
      with:
        persist-credentials: false
        fetch-depth: 0
    - name: Preflight
      run: |-
        test -s gitops/applicationset.yaml
    - name: Execute
      run: |-
        kubectl -n argocd apply --dry-run=server -f gitops/applicationset.yaml
        kubectl -n argocd apply -f gitops/applicationset.yaml
    - name: Verify result
      run: |-
        argocd app wait web-staging --sync --health --timeout 180
permissions:
  contents: read
concurrency:
  group: t38-reviewed-delivery
  cancel-in-progress: false

Verification and failure handling. Use a scoped Argo Project and verify the generated Applications reference approved repositories.

Related CICD-291 · CICD-292 · Workflow reference

T39 ​

Flux CD GitOps delivery

  • Platform GitHub Actions.
  • File .github/workflows/t39-flux-cd-gitops-delivery.yml.
  • Prerequisites Flux installed, approved staging Kustomization and GitRepository.
  • Execution delivery.
  • Validation syntax-validated. External tools and provider controls require validation in your lab.
yaml
name: Flux CD GitOps delivery
on:
  workflow_dispatch: {}
jobs:
  delivery:
    runs-on:
    - self-hosted
    - linux
    - platform-lab
    timeout-minutes: 20
    defaults:
      run:
        shell: bash
    if: github.ref == 'refs/heads/main'
    environment: staging
    steps:
    - uses: actions/checkout@v4
      with:
        persist-credentials: false
        fetch-depth: 0
    - name: Preflight
      run: |-
        flux check --pre
    - name: Execute
      run: |-
        flux reconcile source git platform -n flux-system
        flux reconcile kustomization web-staging -n flux-system --with-source
    - name: Verify result
      run: |-
        kubectl -n flux-system wait kustomization/web-staging --for=condition=Ready --timeout=180s
permissions:
  contents: read
concurrency:
  group: t39-reviewed-delivery
  cancel-in-progress: false

Verification and failure handling. Review desired state in Git. The pipeline reconciles and verifies, while rollback uses a reviewed revert.

Related CICD-299 · CICD-300 · Workflow reference

T40 ​

Metric-driven progressive delivery

  • Platform GitHub Actions.
  • File .github/workflows/t40-metric-driven-progressive-delivery.yml.
  • Prerequisites Argo Rollouts, Prometheus with loaded baseline rule and reviewed rollout/analysis manifests.
  • Execution delivery.
  • Validation syntax-validated. External tools and provider controls require validation in your lab.
yaml
name: Metric-driven progressive delivery
on:
  workflow_dispatch: {}
jobs:
  delivery:
    runs-on:
    - self-hosted
    - linux
    - platform-lab
    timeout-minutes: 20
    defaults:
      run:
        shell: bash
    if: github.ref == 'refs/heads/main'
    environment: staging
    steps:
    - uses: actions/checkout@v4
      with:
        persist-credentials: false
        fetch-depth: 0
    - name: Preflight
      run: |-
        test -s gitops/rollout.yaml
        test -s gitops/analysis.yaml
    - name: Execute
      run: |-
        kubectl -n staging apply -f gitops/analysis.yaml -f gitops/rollout.yaml
        kubectl argo rollouts status web -n staging --timeout=600s
    - name: Verify result
      run: |-
        kubectl -n staging get analysisruns -o json | jq -e '.items | any(.status.phase=="Successful")'
permissions:
  contents: read
concurrency:
  group: t40-reviewed-delivery
  cancel-in-progress: false

Verification and failure handling. Bind evidence to the current Rollout in real CI. Use a bounded metric window and a minimum sample gate.

Related CICD-301 · CICD-303 · CICD-304 · Workflow reference