hkb-pipeline-failed
Fires on: A pipeline execution failed.
Run the common pre-checks first.
Symptoms
An email from hkb pipeline with the CodePipeline event: hkb-pipeline-main or hkb-pipeline-site, state FAILED.
Pre-checks
- Which stage failed:
aws codepipeline list-action-executions --profile ro-hkb-shared-services --pipeline-name <pipeline> --max-items 10, or the CodePipeline console in Shared Services. - A Validate failure is in the CodeBuild log (cfn-lint, Guard, the Access Analyzer checks, gitleaks). A Plan failure is a change set that couldn't be made. An Apply failure is CloudFormation rolling back.
Resolution
- Validate: fix the finding in a PR. The pipeline runs again on merge.
- Plan or Apply: read the stack's events in the target account for the first
FAILEDresource. Fix the template and merge; the pipeline is the only writer to the stacks it owns, so no fix is made by hand. - A rejected approval also shows as a failed run. Nothing is wrong; the change waits for the next merge.
Post-checks
The next run reaches Succeeded, and the site's pages return 200 in each environment it deployed to.
Rollback
Revert the PR that broke it. The revert is a new merge and deploys like any other.
Alert details
| Property | Value |
|---|---|
| Runs in | Shared Services, us-east-1 |
From hkb pipeline: The event itself, as JSON |
|
| Source | pipeline/hkb-pipeline-foundation.yaml, resource FailureRule |
The event pattern, as deployed:
EventPattern:
source: [aws.codepipeline]
detail-type: [CodePipeline Pipeline Execution State Change]
detail:
pipeline: [!Ref PipelineName, !Ref SitePipelineName, !Ref ToolsPipelineName]
state: [FAILED]
Page information
- Owner
- Detection and Response
- Status
- current Current: generated from the templates and records in the repository at this build.
- Generated from
site/content/runbooks.md,pipeline/hkb-pipeline-foundation.yaml- Linked from
- Runbooks, Pipeline events
- Plain markdown
- /wiki/runbooks/pipeline/hkb-pipeline-failed/index.md