Skip to content

Commit

Permalink
Revert "Building CWA with preview build of SDK (#421)"
Browse files Browse the repository at this point in the history
This reverts commit d5861dd
  • Loading branch information
movence committed Nov 28, 2023
1 parent a6307e5 commit 6bf8218
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 66 deletions.
46 changes: 2 additions & 44 deletions .github/workflows/PR-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand All @@ -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:
Expand All @@ -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
Expand All @@ -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
Expand Down
22 changes: 0 additions & 22 deletions .github/workflows/test-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 6bf8218

Please sign in to comment.