# hkb-pipeline-approval

Fires on: Approval requested, granted or rejected in the pipeline.

Run the [common pre-checks](/wiki/runbooks/#common-pre-checks) first.

## Symptoms
An email from `hkb pipeline`: an approval action `STARTED`, `SUCCEEDED` or `FAILED`. These are notices, not incidents. Approval steps are off during the build (risk R-02), so this alert is dormant for now.

## Pre-checks
For `STARTED`: the change record for the run is in the pipeline's artifact bucket, and HKB-PipelineApprover can read it.

## Resolution
Review the change set summary, then approve or reject as HKB-PipelineApprover. An approval nobody answers expires after seven days and fails the run.

## Post-checks
The run continues past the approval, or fails cleanly if rejected.

## Rollback
A rejected change needs no rollback. An approved change that turns out wrong is reverted by PR.

## Alert details

| Property | Value |
| --- | --- |
| Runs in | Shared Services, us-east-1 |
| Email | From `hkb pipeline`: The event itself, as JSON |
| Source | `pipeline/hkb-pipeline-foundation.yaml`, resource `ApprovalRule` |

The event pattern, as deployed:

```yaml
EventPattern:
  source: [aws.codepipeline]
  detail-type: [CodePipeline Action Execution State Change]
  detail:
    pipeline: [!Ref PipelineName, !Ref SitePipelineName, !Ref ToolsPipelineName]
    type:
      category: [Approval]
    state: [STARTED, SUCCEEDED, FAILED]
```
