Skip to content

Commit

Permalink
Update GitHub Actions workflows. (#4833)
Browse files Browse the repository at this point in the history
This PR was automatically generated by the
update-workflows-ecosystem-providers workflow in the pulumi/ci-mgmt
repo, from commit e4f15688017ee624e9014edafffee8e5634edd49.

## Additional fixes for custom CI jobs:

Use `prepare_local_workspace` target instead of `upstream`. This is a
more generalised command for doing pre-build setup tasks.

Fix restoring progress in custom jobs 
- Restore makefile progress
- Use local shared actions for downloading bin and SDK assets.

---------

Co-authored-by: Daniel Bradley <[email protected]>
  • Loading branch information
pulumi-bot and danielrbradley authored Nov 26, 2024
1 parent ea37dae commit fe73c87
Show file tree
Hide file tree
Showing 11 changed files with 370 additions and 300 deletions.
65 changes: 24 additions & 41 deletions .ci-mgmt.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -87,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
Expand Down Expand Up @@ -120,8 +120,8 @@ extraTests:
with:
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
Expand Down Expand Up @@ -153,25 +153,19 @@ 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: ./.github/actions/download-sdk
with:
language: ${{ matrix.language }}
- name: Restore makefile progress
uses: actions/download-artifact@v4
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 }}
name: build_${{ matrix.language }}.make
path: .make
- name: Update path
run: echo "${{ github.workspace }}/bin" >> "$GITHUB_PATH"
- name: Install dependencies
Expand All @@ -181,8 +175,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
Expand Down Expand Up @@ -226,28 +218,19 @@ 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: ./.github/actions/download-sdk
with:
language: ${{ matrix.language }}
- name: Restore makefile progress
uses: actions/download-artifact@v4
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 }}
name: build_${{ matrix.language }}.make
path: .make
- name: Update path
run: echo "${{ github.workspace }}/bin" >> "$GITHUB_PATH"
- name: Install Python deps
Expand Down
10 changes: 7 additions & 3 deletions .github/workflows/build_provider.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ jobs:
uses: ./.github/actions/setup-tools
with:
tools: pulumictl, go
- name: Prepare local workspace before restoring previously built
run: make prepare_local_workspace
- name: Download schema-embed.json
uses: actions/download-artifact@v4
with:
Expand All @@ -53,9 +55,11 @@ jobs:
# Avoid creating directories for each artifact
merge-multiple: true
path: provider/cmd/pulumi-resource-aws/schema-embed.json
- name: Prepare for build
# This installs plugins and prepares upstream
run: make upstream
- name: Restore makefile progress
uses: actions/download-artifact@v4
with:
name: prerequisites.make
path: .make
- name: Build & package provider
run: make provider_dist-${{ matrix.platform.os }}-${{ matrix.platform.arch }}
- name: Upload artifacts
Expand Down
15 changes: 13 additions & 2 deletions .github/workflows/build_sdk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,17 @@ jobs:
uses: ./.github/actions/setup-tools
with:
tools: pulumictl, pulumicli, ${{ matrix.language }}
- name: Prepare local workspace
run: make prepare_local_workspace
- name: Download bin
uses: ./.github/actions/download-bin
- name: Install plugins
run: make install_plugins
- name: Update path
run: echo "${{ github.workspace }}/bin" >> "$GITHUB_PATH"
- name: Restore makefile progress
uses: actions/download-artifact@v4
with:
name: prerequisites.make
path: .make
- name: Build SDK
run: make build_${{ matrix.language }}
- name: Check worktree clean
Expand All @@ -86,3 +91,9 @@ jobs:
uses: ./.github/actions/upload-sdk
with:
language: ${{ matrix.language }}
- name: Save makefile progress
uses: actions/upload-artifact@v4
with:
name: build_${{ matrix.language }}.make
path: .make
include-hidden-files: true
69 changes: 31 additions & 38 deletions .github/workflows/master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -156,15 +156,19 @@ jobs:
uses: ./.github/actions/setup-tools
with:
tools: pulumictl, pulumicli, ${{ matrix.language }}
- name: Prepare local workspace
run: make prepare_local_workspace
- name: Download bin
uses: ./.github/actions/download-bin
- name: Add NuGet source
if: matrix.language == 'dotnet'
run: dotnet nuget add source ${{ github.workspace }}/nuget
- name: Download SDK
uses: ./.github/actions/download-sdk
with:
language: ${{ matrix.language }}
- name: Restore makefile progress
uses: actions/download-artifact@v4
with:
name: build_${{ matrix.language }}.make
path: .make
- name: Update path
run: echo "${{ github.workspace }}/bin" >> "$GITHUB_PATH"
- name: Install Python deps
Expand Down Expand Up @@ -222,8 +226,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
Expand Down Expand Up @@ -260,25 +264,19 @@ 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: ./.github/actions/download-sdk
with:
language: ${{ matrix.language }}
- name: Restore makefile progress
uses: actions/download-artifact@v4
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 }}
name: build_${{ matrix.language }}.make
path: .make
- name: Update path
run: echo "${{ github.workspace }}/bin" >> "$GITHUB_PATH"
- name: Install Python deps
Expand Down Expand Up @@ -339,22 +337,19 @@ 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: ./.github/actions/download-sdk
with:
language: ${{ matrix.language }}
- name: Restore makefile progress
uses: actions/download-artifact@v4
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 }}
name: build_${{ matrix.language }}.make
path: .make
- name: Update path
run: echo "${{ github.workspace }}/bin" >> "$GITHUB_PATH"
- name: Install dependencies
Expand All @@ -364,8 +359,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
Expand Down Expand Up @@ -402,8 +395,8 @@ jobs:
with:
cache: false
go-version: 1.23.x
- name: Make upstream
run: make upstream
- name: Prepare local workspace
run: make prepare_local_workspace
- name: upstream lint
run: |
cd upstream
Expand Down
10 changes: 7 additions & 3 deletions .github/workflows/nightly-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,15 +72,19 @@ jobs:
uses: ./.github/actions/setup-tools
with:
tools: pulumictl, pulumicli, ${{ matrix.language}}
- name: Prepare local workspace
run: make prepare_local_workspace
- name: Download bin
uses: ./.github/actions/download-bin
- name: Add NuGet source
if: matrix.language == 'dotnet'
run: dotnet nuget add source ${{ github.workspace }}/nuget
- name: Download SDK
uses: ./.github/actions/download-sdk
with:
language: ${{ matrix.language }}
- name: Restore makefile progress
uses: actions/download-artifact@v4
with:
name: build_${{ matrix.language }}.make
path: .make
- name: Update path
run: echo "${{ github.workspace }}/bin" >> "$GITHUB_PATH"
- name: Install Python deps
Expand Down
Loading

0 comments on commit fe73c87

Please sign in to comment.