From 89a042278536d8cd5b82fcab944c76edf7f97d9d Mon Sep 17 00:00:00 2001 From: Bryce Lampe Date: Wed, 11 Dec 2024 15:03:35 -0800 Subject: [PATCH] Update aws .ci-mgmt --- provider-ci/test-providers/aws/.ci-mgmt.yaml | 94 +++++++------------ .../.github/actions/setup-tools/action.yml | 2 +- .../aws/.github/workflows/test.yml | 78 +++++---------- provider-ci/test-providers/aws/devbox.json | 2 +- 4 files changed, 63 insertions(+), 113 deletions(-) diff --git a/provider-ci/test-providers/aws/.ci-mgmt.yaml b/provider-ci/test-providers/aws/.ci-mgmt.yaml index a98ffffe3..7f20acfce 100644 --- a/provider-ci/test-providers/aws/.ci-mgmt.yaml +++ b/provider-ci/test-providers/aws/.ci-mgmt.yaml @@ -5,11 +5,19 @@ parallel: 1 timeout: 150 generate-nightly-test-workflow: true providerVersion: github.com/hashicorp/terraform-provider-aws/version.ProviderVersion +toolVersions: + dotnet: "6.0.x" + go: "1.23.x" + java: "11" + gradle: "7.6" + nodejs: "20.x" + pulumi: "dev" + python: "3.11.8" env: PULUMI_MISSING_DOCS_ERROR: true AWS_REGION: "us-west-2" OIDC_ROLE_ARN: ${{ secrets.OIDC_ROLE_ARN }} -template: bridged-provider +makeTemplate: bridged checkoutSubmodules: true freeDiskSpaceBeforeBuild: true freeDiskSpaceBeforeSdkBuild: true @@ -62,6 +70,11 @@ extraTests: runs-on: ubuntu-latest timeout-minutes: 60 steps: + - name: Free Disk Space (Ubuntu) + uses: jlumbroso/free-disk-space@main + with: + swap-storage: false + tool-cache: false - name: Checkout Repo uses: actions/checkout@v4 with: @@ -74,8 +87,8 @@ extraTests: uses: ./.github/actions/setup-tools with: tools: pulumictl, pulumi, go - - name: Make upstream - run: make upstream + - name: Prepare local workspace + run: make prepare_local_workspace - name: go test run: | cd upstream @@ -105,10 +118,10 @@ extraTests: - name: Install Go uses: actions/setup-go@v5 with: - go-version: "1.22.x" + go-version: "1.23.x" cache: false - - name: Make upstream - run: make upstream + - name: Prepare local workspace + run: make prepare_local_workspace - name: upstream lint run: | cd upstream @@ -139,25 +152,16 @@ extraTests: uses: ./.github/actions/setup-tools with: tools: pulumictl, pulumi, go, node - - name: Download provider + tfgen binaries - uses: actions/download-artifact@v4 - with: - name: aws-provider.tar.gz - path: ${{ github.workspace }}/bin - - name: Untar provider binaries - run: >- - tar -zxf ${{ github.workspace }}/bin/provider.tar.gz -C ${{ - github.workspace}}/bin - - find ${{ github.workspace }} -name "pulumi-*-aws" -print -exec chmod +x {} \; + - name: Prepare local workspace + run: make prepare_local_workspace + - name: Download bin + uses: ./.github/actions/download-bin - name: Download SDK - uses: actions/download-artifact@v4 + uses: ./.github/actions/download-sdk with: - name: ${{ matrix.language }}-sdk.tar.gz - path: ${{ github.workspace}}/sdk/ - - name: Uncompress SDK folder - run: tar -zxf ${{ github.workspace }}/sdk/${{ matrix.language }}.tar.gz -C ${{ - github.workspace }}/sdk/${{ matrix.language }} + language: ${{ matrix.language }} + - name: Restore makefile progress + run: make --touch provider schema build_${{ matrix.language }} - name: Update path run: echo "${{ github.workspace }}/bin" >> "$GITHUB_PATH" - name: Install dependencies @@ -167,8 +171,6 @@ extraTests: with: token: ${{ secrets.GITHUB_TOKEN }} version: v2.4.0 - - name: Make upstream - run: make upstream - name: Run selected tests with manual web identity/OIDC auth run: cd examples && go test -v -json -count=1 -run TestAccCloudWatchOidcManual -tags=${{ matrix.language }} -parallel 4 . 2>&1 | tee /tmp/gotest.log | gotestfmt - name: Configure AWS Credentials for OIDC @@ -181,13 +183,6 @@ extraTests: role-to-assume: ${{ secrets.OIDC_ROLE_ARN }} - name: Run selected tests with configure-aws-credentials web identity/OIDC auth run: cd examples && go test -v -json -count=1 -run TestAccCloudWatch -tags=${{ matrix.language }} -parallel 4 . 2>&1 | tee /tmp/gotest.log | gotestfmt - - if: failure() && github.event_name == 'push' - name: Notify Slack - uses: 8398a7/action-slack@v3 - with: - author_name: Failure in running ${{ matrix.language }} tests - fields: repo,commit,author,action - status: ${{ job.status }} strategy: fail-fast: false matrix: @@ -218,28 +213,16 @@ extraTests: uses: ./.github/actions/setup-tools with: tools: pulumictl, pulumi, go, node, dotnet, python, java - - name: Make upstream - run: make upstream - - name: Download provider + tfgen binaries - uses: actions/download-artifact@v4 - with: - name: aws-provider.tar.gz - path: ${{ github.workspace }}/bin - - name: Untar provider binaries - run: >- - tar -zxf ${{ github.workspace }}/bin/provider.tar.gz -C ${{ - github.workspace}}/bin - - find ${{ github.workspace }} -name "pulumi-*-aws" -print -exec chmod +x {} \; - - run: dotnet nuget add source ${{ github.workspace }}/nuget + - name: Prepare local workspace + run: make prepare_local_workspace + - name: Download bin + uses: ./.github/actions/download-bin - name: Download SDK - uses: actions/download-artifact@v4 + uses: ./.github/actions/download-sdk with: - name: ${{ matrix.language }}-sdk.tar.gz - path: ${{ github.workspace}}/sdk/ - - name: Uncompress SDK folder - run: tar -zxf ${{ github.workspace }}/sdk/${{ matrix.language }}.tar.gz -C ${{ - github.workspace }}/sdk/${{ matrix.language }} + language: ${{ matrix.language }} + - name: Restore makefile progress + run: make --touch provider schema build_${{ matrix.language }} - name: Update path run: echo "${{ github.workspace }}/bin" >> "$GITHUB_PATH" - name: Install Python deps @@ -265,13 +248,6 @@ extraTests: - name: Run provider tests run: | cd provider && go test -v -json -count=1 -cover -timeout 2h -tags=${{ matrix.language }} -parallel 4 . 2>&1 | tee /tmp/gotest.log | gotestfmt - - if: failure() && github.event_name == 'push' - name: Notify Slack - uses: 8398a7/action-slack@v3 - with: - author_name: Failure in running ${{ matrix.language }} provider tests - fields: repo,commit,author,action - status: ${{ job.status }} strategy: fail-fast: false matrix: diff --git a/provider-ci/test-providers/aws/.github/actions/setup-tools/action.yml b/provider-ci/test-providers/aws/.github/actions/setup-tools/action.yml index 5b80b7485..0044a5b63 100644 --- a/provider-ci/test-providers/aws/.github/actions/setup-tools/action.yml +++ b/provider-ci/test-providers/aws/.github/actions/setup-tools/action.yml @@ -28,7 +28,7 @@ runs: if: inputs.tools == 'all' || contains(inputs.tools, 'go') uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5 with: - go-version: "1.21.x" + go-version: "1.23.x" cache-dependency-path: | provider/*.sum upstream/*.sum diff --git a/provider-ci/test-providers/aws/.github/workflows/test.yml b/provider-ci/test-providers/aws/.github/workflows/test.yml index 1964cc0e9..69c691652 100644 --- a/provider-ci/test-providers/aws/.github/workflows/test.yml +++ b/provider-ci/test-providers/aws/.github/workflows/test.yml @@ -117,6 +117,11 @@ jobs: name: Run test of provider shim runs-on: ubuntu-latest steps: + - name: Free Disk Space (Ubuntu) + uses: jlumbroso/free-disk-space@main + with: + swap-storage: false + tool-cache: false - name: Checkout Repo uses: actions/checkout@v4 with: @@ -129,8 +134,8 @@ jobs: uses: ./.github/actions/setup-tools with: tools: pulumictl, pulumi, go - - name: Make upstream - run: make upstream + - name: Prepare local workspace + run: make prepare_local_workspace - name: go test run: | cd upstream @@ -166,25 +171,16 @@ jobs: uses: ./.github/actions/setup-tools with: tools: pulumictl, pulumi, go, node, dotnet, python, java - - name: Make upstream - run: make upstream - - name: Download provider + tfgen binaries - uses: actions/download-artifact@v4 - with: - name: aws-provider.tar.gz - path: ${{ github.workspace }}/bin - - name: Untar provider binaries - run: |- - tar -zxf ${{ github.workspace }}/bin/provider.tar.gz -C ${{ github.workspace}}/bin - find ${{ github.workspace }} -name "pulumi-*-aws" -print -exec chmod +x {} \; - - run: dotnet nuget add source ${{ github.workspace }}/nuget + - name: Prepare local workspace + run: make prepare_local_workspace + - name: Download bin + uses: ./.github/actions/download-bin - name: Download SDK - uses: actions/download-artifact@v4 + uses: ./.github/actions/download-sdk with: - name: ${{ matrix.language }}-sdk.tar.gz - path: ${{ github.workspace}}/sdk/ - - name: Uncompress SDK folder - run: tar -zxf ${{ github.workspace }}/sdk/${{ matrix.language }}.tar.gz -C ${{ github.workspace }}/sdk/${{ matrix.language }} + language: ${{ matrix.language }} + - name: Restore makefile progress + run: make --touch provider schema build_${{ matrix.language }} - name: Update path run: echo "${{ github.workspace }}/bin" >> "$GITHUB_PATH" - name: Install Python deps @@ -210,13 +206,6 @@ jobs: - name: Run provider tests run: | cd provider && go test -v -json -count=1 -cover -timeout 2h -tags=${{ matrix.language }} -parallel 4 . 2>&1 | tee /tmp/gotest.log | gotestfmt - - if: failure() && github.event_name == 'push' - name: Notify Slack - uses: 8398a7/action-slack@v3 - with: - author_name: Failure in running ${{ matrix.language }} provider tests - fields: repo,commit,author,action - status: ${{ job.status }} strategy: fail-fast: false matrix: @@ -251,22 +240,16 @@ jobs: uses: ./.github/actions/setup-tools with: tools: pulumictl, pulumi, go, node - - name: Download provider + tfgen binaries - uses: actions/download-artifact@v4 - with: - name: aws-provider.tar.gz - path: ${{ github.workspace }}/bin - - name: Untar provider binaries - run: |- - tar -zxf ${{ github.workspace }}/bin/provider.tar.gz -C ${{ github.workspace}}/bin - find ${{ github.workspace }} -name "pulumi-*-aws" -print -exec chmod +x {} \; + - name: Prepare local workspace + run: make prepare_local_workspace + - name: Download bin + uses: ./.github/actions/download-bin - name: Download SDK - uses: actions/download-artifact@v4 + uses: ./.github/actions/download-sdk with: - name: ${{ matrix.language }}-sdk.tar.gz - path: ${{ github.workspace}}/sdk/ - - name: Uncompress SDK folder - run: tar -zxf ${{ github.workspace }}/sdk/${{ matrix.language }}.tar.gz -C ${{ github.workspace }}/sdk/${{ matrix.language }} + language: ${{ matrix.language }} + - name: Restore makefile progress + run: make --touch provider schema build_${{ matrix.language }} - name: Update path run: echo "${{ github.workspace }}/bin" >> "$GITHUB_PATH" - name: Install dependencies @@ -276,8 +259,6 @@ jobs: with: token: ${{ secrets.GITHUB_TOKEN }} version: v2.4.0 - - name: Make upstream - run: make upstream - name: Run selected tests with manual web identity/OIDC auth run: cd examples && go test -v -json -count=1 -run TestAccCloudWatchOidcManual -tags=${{ matrix.language }} -parallel 4 . 2>&1 | tee /tmp/gotest.log | gotestfmt - name: Configure AWS Credentials for OIDC @@ -290,13 +271,6 @@ jobs: unset-current-credentials: true - name: Run selected tests with configure-aws-credentials web identity/OIDC auth run: cd examples && go test -v -json -count=1 -run TestAccCloudWatch -tags=${{ matrix.language }} -parallel 4 . 2>&1 | tee /tmp/gotest.log | gotestfmt - - if: failure() && github.event_name == 'push' - name: Notify Slack - uses: 8398a7/action-slack@v3 - with: - author_name: Failure in running ${{ matrix.language }} tests - fields: repo,commit,author,action - status: ${{ job.status }} strategy: fail-fast: false matrix: @@ -320,9 +294,9 @@ jobs: uses: actions/setup-go@v5 with: cache: false - go-version: 1.22.x - - name: Make upstream - run: make upstream + go-version: 1.23.x + - name: Prepare local workspace + run: make prepare_local_workspace - name: upstream lint run: | cd upstream diff --git a/provider-ci/test-providers/aws/devbox.json b/provider-ci/test-providers/aws/devbox.json index 1917bf703..f31a0b63e 100644 --- a/provider-ci/test-providers/aws/devbox.json +++ b/provider-ci/test-providers/aws/devbox.json @@ -2,7 +2,7 @@ "packages": [ "yarn@latest", "pulumictl@latest", - "go@1.21.", + "go@1.23.", "nodejs@20.", "python3@3.11.8", "dotnet-sdk@6.0.",