From 6bf821811146139058202bad6adb63a828663677 Mon Sep 17 00:00:00 2001 From: Hyunsoo Kim Date: Tue, 28 Nov 2023 14:44:48 -0500 Subject: [PATCH] Revert "Building CWA with preview build of SDK (#421)" This reverts commit d5861dd0 --- .github/workflows/PR-build.yml | 46 ++------------------------------ .github/workflows/test-build.yml | 22 --------------- 2 files changed, 2 insertions(+), 66 deletions(-) diff --git a/.github/workflows/PR-build.yml b/.github/workflows/PR-build.yml index d3a9d312bf..d0126bfe91 100644 --- a/.github/workflows/PR-build.yml +++ b/.github/workflows/PR-build.yml @@ -2,10 +2,6 @@ # SPDX-License-Identifier: MIT name: PR Build -env: - TERRAFORM_AWS_ASSUME_ROLE: ${{ secrets.TERRAFORM_AWS_ASSUME_ROLE }} - TERRAFORM_AWS_ASSUME_ROLE_DURATION: 14400 # 4 hours - on: workflow_dispatch: pull_request: @@ -51,7 +47,7 @@ jobs: if: needs.changes.outputs.lint == 'true' uses: actions/setup-go@v4 with: - go-version: ~1.21.1 + go-version: ~1.19.6 cache: false - name: Check out code @@ -76,9 +72,6 @@ jobs: needs: [lint, changes] name: Build ${{ matrix.os }} runs-on: ${{ matrix.os }} - permissions: - id-token: write - contents: read strategy: fail-fast: false matrix: @@ -105,17 +98,11 @@ jobs: ~\AppData\Local\go-build ~\go\pkg\mod steps: - - name: Configure AWS Credentials - uses: aws-actions/configure-aws-credentials@v2 - with: - role-to-assume: ${{ env.TERRAFORM_AWS_ASSUME_ROLE }} - aws-region: us-east-1 - - name: Set up Go 1.x if: needs.changes.outputs.build == 'true' uses: actions/setup-go@v4 with: - go-version: ~1.21.1 + go-version: ~1.19.6 cache: false - name: Check out code @@ -141,35 +128,6 @@ jobs: if: matrix.family == 'windows' && steps.cached_binaries.outputs.cache-hit != 'true' && needs.changes.outputs.build == 'true' run: choco install make - - name: Set up Go 1.x - uses: actions/setup-go@v4 - with: - go-version: ~1.20.3 - -# TODO: remove "Replace AWS SDK" once changes are available publicly - - name: Replace AWS SDK (Windows) - if: matrix.family == 'windows' - run: | - mkdir C:/Users/runneradmin/gosdk - aws s3 cp s3://gazpacho-beta-pre-release/staging.zip $env:SYSTEMROOT - tar -xf $env:SYSTEMROOT/staging.zip -C C:/Users/runneradmin/gosdk - $env:sdkPath=(Get-ChildItem "C:/Users/runneradmin/gosdk/apollo/env/AWSGoSDK-Release/var/tmp/release-automation/staging-*/sdk/src/github.com/aws/aws-sdk-go") - echo $env:sdkPath - cd D:\a\private-amazon-cloudwatch-agent-staging\private-amazon-cloudwatch-agent-staging - ls - go mod edit -replace github.com/aws/aws-sdk-go=$env:sdkPath - - - name: Replace AWS SDK (Linux) - if: matrix.family != 'windows' - run: | - mkdir ~/gosdk - aws s3 cp s3://gazpacho-beta-pre-release/staging.zip ~ - unzip -q -d ~/gosdk ~/staging.zip || true - sdkPath=$(echo ~/gosdk/apollo/env/AWSGoSDK-Release/var/tmp/release-automation/staging-*/sdk/src/github.com/aws/aws-sdk-go) - echo $sdkPath - ls - go mod edit -replace github.com/aws/aws-sdk-go=$sdkPath - - name: Unit Test if: steps.cached_binaries.outputs.cache-hit != 'true' && needs.changes.outputs.build == 'true' run: make test diff --git a/.github/workflows/test-build.yml b/.github/workflows/test-build.yml index f6c0f11811..d3a93390e4 100644 --- a/.github/workflows/test-build.yml +++ b/.github/workflows/test-build.yml @@ -92,28 +92,6 @@ jobs: ~/.cache/go-build key: v1-go-pkg-mod-${{ runner.os }}-${{ hashFiles('**/go.sum') }} - #TODO: remove "Replace AWS SDK" once changes are available publicly - - name: Replace AWS SDK (Windows) - if: matrix.family == 'windows' - run: | - mkdir C:/Users/runneradmin/gosdk - aws s3 cp s3://gazpacho-beta-pre-release/staging.zip $env:SYSTEMROOT - tar -xf $env:SYSTEMROOT/staging.zip -C C:/Users/runneradmin/gosdk - $env:sdkPath=(Get-ChildItem "C:/Users/runneradmin/gosdk/apollo/env/AWSGoSDK-Release/var/tmp/release-automation/staging-*/sdk/src/github.com/aws/aws-sdk-go") - echo $env:sdkPath - cd D:\a\private-amazon-cloudwatch-agent-staging\private-amazon-cloudwatch-agent-staging - go mod edit -replace github.com/aws/aws-sdk-go=$env:sdkPath - - - name: Replace AWS SDK (Linux) - if: matrix.family != 'windows' - run: | - mkdir ~/gosdk - aws s3 cp s3://gazpacho-beta-pre-release/staging.zip ~ - unzip -q -d ~/gosdk ~/staging.zip || true - sdkPath=$(echo ~/gosdk/apollo/env/AWSGoSDK-Release/var/tmp/release-automation/staging-*/sdk/src/github.com/aws/aws-sdk-go) - echo $sdkPath - go mod edit -replace github.com/aws/aws-sdk-go=$sdkPath - - name: Import GPG Key if: contains(inputs.BucketKey, 'test') == false || steps.cached_binaries.outputs.cache-hit == false uses: crazy-max/ghaction-import-gpg@v5