diff --git a/.buildkite/pipeline.cleanamis.yaml b/.buildkite/pipeline.cleanamis.yaml index a441ff0f5..4d8c174b3 100644 --- a/.buildkite/pipeline.cleanamis.yaml +++ b/.buildkite/pipeline.cleanamis.yaml @@ -6,10 +6,28 @@ steps: env: DRY_RUN: true AWS_REGION: "{{matrix}}" + # list of regions should match .buildkite/steps/copy.sh matrix: - "us-east-1" + - "us-east-2" + - "us-west-1" - "us-west-2" + - "af-south-1" + - "ap-east-1" + - "ap-south-1" + - "ap-northeast-2" + - "ap-northeast-1" - "ap-southeast-2" + - "ap-southeast-1" + - "ca-central-1" + - "eu-central-1" + - "eu-west-1" + - "eu-west-2" + - "eu-south-1" + - "eu-west-3" + - "eu-north-1" + - "me-south-1" + - "sa-east-1" plugins: - aws-assume-role-with-web-identity#v1.1.0: role-arn: arn:aws:iam::172840064832:role/pipeline-buildkite-elastic-stack-for-aws-ami-cleaner diff --git a/.buildkite/steps/copy.sh b/.buildkite/steps/copy.sh index 348c952e7..281fc2c70 100755 --- a/.buildkite/steps/copy.sh +++ b/.buildkite/steps/copy.sh @@ -77,6 +77,8 @@ if [[ -z "${BUILDKITE_AWS_STACK_BUCKET}" ]]; then exit 1 fi +# to ensure old images are garbage collected, the list of regions should +# match .buildkite/pipeline.cleanamis.yaml ALL_REGIONS=( us-east-1 us-east-2