-
Notifications
You must be signed in to change notification settings - Fork 12
80 lines (74 loc) · 2.74 KB
/
debug_destroy_test_infra.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
name: 🪲 Destroy Test Infra
on:
workflow_dispatch:
inputs:
unique_tag:
description: 'Unique tag or prefix'
required: true
clean_packaging_infra:
description: 'Destroy packaging infra?'
required: true
type: boolean
default: false
clean_canary_infra:
description: 'Destroy canary infra?'
required: true
type: boolean
default: false
platform:
description: 'Platform prefix for canary ec2 names'
required: true
type: string
default: "linux"
permissions:
id-token: write
jobs:
clean-infra:
name: Clean infra
runs-on: ubuntu-latest
steps:
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
with:
role-to-assume: ${{ secrets.AWS_ROLE_ARN }}
aws-region: us-east-2
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set branch name
run: |
# Short name for current branch. For PRs, use target branch (base ref)
GIT_BRANCH=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}
# Is the ref a tag? If so, remove refs/tags/ prefix
GIT_BRANCH=${GIT_BRANCH#refs/tags/}
echo "GIT_BRANCH=$GIT_BRANCH" >> $GITHUB_ENV
- name: Clean packaging infra
uses: newrelic/fargate-runner-action@main
if: ${{ inputs.clean_packaging_infra }}
with:
aws_region: us-east-2
container_make_target: "test/provision-clean TAG_OR_UNIQUE_NAME=otel-${{ inputs.unique_tag }}"
ecs_cluster_name: caos_otel_releases
task_definition_name: otel-releases
cloud_watch_logs_group_name: /ecs/test-prerelease-otel-releases
cloud_watch_logs_stream_name: ecs/test-otel-releases
aws_vpc_subnet: ${{ secrets.AWS_VPC_SUBNET }}
repo_name: "newrelic/opentelemetry-collector-releases"
ref: "${{ env.GIT_BRANCH }}"
log_filters: |
Destroy\scomplete!
- name: Clean canary infra
uses: newrelic/fargate-runner-action@main
if: ${{ inputs.clean_canary_infra }}
with:
aws_region: us-east-2
container_make_target: "test/provision-clean TAG_OR_UNIQUE_NAME=otel-canary:${{ inputs.unique_tag }}-${{ inputs.platform }}"
ecs_cluster_name: caos_otel_releases
task_definition_name: otel-releases
cloud_watch_logs_group_name: /ecs/test-prerelease-otel-releases
cloud_watch_logs_stream_name: ecs/test-otel-releases
aws_vpc_subnet: ${{ secrets.AWS_VPC_SUBNET }}
repo_name: "newrelic/opentelemetry-collector-releases"
ref: "${{ env.GIT_BRANCH }}"
log_filters: |
Destroy\scomplete!