Skip to content

Commit

Permalink
Implement Bypass Test Mechanism for Emergent Release (#273)
Browse files Browse the repository at this point in the history
* Implement Bypass Test Mechanism for Emergent Release

* Add spacing.

* Use link and 2PR username instead of bool.

* Add test production environment job.

* Remove test job.

* Fix wording.

* Add bypass summary.

* Fix descriptions and make summary bold.

* Fix typo.

* Add test production environment job.

* Remove test job.

* Remove required reviewer.

* Nit: replace PR with Approver.
  • Loading branch information
musa-asad authored Dec 5, 2024
1 parent a8ef913 commit 23146e7
Showing 1 changed file with 30 additions and 1 deletion.
31 changes: 30 additions & 1 deletion .github/workflows/build-and-upload-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,14 @@ on:
required: false
default: false
type: boolean
e2e-test-bypass-link:
description: 'Failed E2E Test Run Link (for bypass)'
required: false
type: string
e2e-test-bypass-approver:
description: 'Approver GitHub Username (for bypass)'
required: false
type: string
tag:
description: 'Staging Artifact Tag'
required: false
Expand All @@ -30,6 +38,14 @@ on:
required: false
default: false
type: boolean
e2e-test-bypass-link:
description: 'Failed E2E Test Run Link (for bypass)'
required: false
type: string
e2e-test-bypass-approver:
description: 'Approver GitHub Username (for bypass)'
required: false
type: string
tag:
description: 'Staging Artifact Tag'
required: false
Expand Down Expand Up @@ -124,6 +140,7 @@ jobs:
go mod download
export GOARCH=arm64 && make targetallocator
export GOARCH=amd64 && make targetallocator
- name: Build Cloudwatch Agent Target Allocator Image and push to ECR
uses: docker/build-push-action@v4
if: steps.cached_binaries.outputs.cache-hit == false
Expand All @@ -134,7 +151,18 @@ jobs:
tags: ${{ env.ECR_TARGET_ALLOCATOR_STAGING_REPO }}:${{ inputs.tag }}
platforms: linux/amd64, linux/arm64

bypass-info:
if: ${{ inputs.e2e-test-bypass-link != '' || inputs.e2e-test-bypass-approver != '' }}
runs-on: ubuntu-latest
steps:
- name: Echo bypass information
run: |
echo "**E2E test bypass requested**" >> $GITHUB_STEP_SUMMARY
echo "**Failing Test**: ${{ inputs.e2e-test-bypass-link }}" >> $GITHUB_STEP_SUMMARY
echo "**Approver**: ${{ inputs.e2e-test-bypass-approver }}" >> $GITHUB_STEP_SUMMARY
e2e-test:
if: ${{ inputs.e2e-test-bypass-link == '' && inputs.e2e-test-bypass-approver == '' }}
name: "Application Signals E2E Test"
needs: [MakeBinary]
uses: ./.github/workflows/application-signals-e2e-test.yml
Expand All @@ -147,14 +175,15 @@ jobs:

push-release-ecr:
if: ${{ inputs.release }}
needs: e2e-test
needs: [MakeTABinary, e2e-test]
permissions:
id-token: write
contents: read
runs-on: ubuntu-latest
steps:
- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

Expand Down

0 comments on commit 23146e7

Please sign in to comment.