From 4dbaebb5ac74a2a98e4b2e800c1a9ab8cd05a037 Mon Sep 17 00:00:00 2001 From: Pulumi Bot <30351955+pulumi-bot@users.noreply.github.com> Date: Wed, 27 Mar 2024 22:42:55 -0700 Subject: [PATCH] Update GitHub Actions workflows. (#618) This PR was automatically generated by the update-workflows-ecosystem-providers workflow in the pulumi/ci-mgmt repo, from commit 92b8348f8fe272a987baccae89fd6c6efe434ce2. --- .github/workflows/master.yml | 20 +++++++++++++++----- .github/workflows/prerelease.yml | 21 ++++++++++++++++----- .github/workflows/release.yml | 21 ++++++++++++++++----- .github/workflows/run-acceptance-tests.yml | 20 +++++++++++++++----- Makefile | 13 ++++++++----- 5 files changed, 70 insertions(+), 25 deletions(-) diff --git a/.github/workflows/master.yml b/.github/workflows/master.yml index 8be213d9..00cfd16b 100644 --- a/.github/workflows/master.yml +++ b/.github/workflows/master.yml @@ -130,6 +130,7 @@ jobs: - dotnet - go - java + generate_coverage_data: continue-on-error: true env: @@ -214,12 +215,15 @@ jobs: ref: deca2c5c6015ad7aaea6f572a1c2b198ca323592 - name: Unshallow clone for tags run: git fetch --prune --unshallow --tags + - name: Prepare upstream code + run: make upstream - name: Install Go uses: actions/setup-go@v5 with: - cache-dependency-path: | - sdk/go.sum go-version: 1.21.x + cache-dependency-path: | + provider/*.sum + upstream/*.sum - name: Install pulumictl uses: jaxxstorm/action-install-gh-release@v1.11.0 with: @@ -234,8 +238,14 @@ jobs: uses: jaxxstorm/action-install-gh-release@v1.11.0 with: repo: pulumi/schema-tools - - name: Build tfgen & provider binaries - run: make provider + - name: Build schema generator binary + run: make tfgen_build_only + - name: Install plugins + run: make install_plugins + - name: Generate schema + run: make tfgen_no_deps + - name: Build provider binary + run: make provider_no_deps - name: Unit-test provider code run: make test_provider - if: github.event_name == 'pull_request' @@ -266,7 +276,7 @@ jobs: name: Check Configuration section run: | sed -n '/## Configuration/,$p' README.md | sed -n '/## Reference/q;p' >> config_section.txt - jq -r '.config[] | keys[]' < provider/cmd/pulumi-resource-${{ env.PROVIDER }}/schema.json >> keys.txt + jq -r '.config | select(.variables) | .variables | keys[]' < provider/cmd/pulumi-resource-${{ env.PROVIDER }}/schema.json >> keys.txt EOF=$(dd if=/dev/urandom bs=15 count=1 status=none | base64) { echo "MISSING_CONFIG<<$EOF"; diff --git a/.github/workflows/prerelease.yml b/.github/workflows/prerelease.yml index cad2fa22..820fde07 100644 --- a/.github/workflows/prerelease.yml +++ b/.github/workflows/prerelease.yml @@ -114,6 +114,7 @@ jobs: with: name: ${{ matrix.language }}-sdk.tar.gz path: ${{ github.workspace}}/sdk/${{ matrix.language }}.tar.gz + retention-days: 30 - if: failure() && github.event_name == 'push' name: Notify Slack uses: 8398a7/action-slack@v3 @@ -130,6 +131,7 @@ jobs: - dotnet - go - java + lint: name: lint uses: ./.github/workflows/lint.yml @@ -152,12 +154,15 @@ jobs: ref: deca2c5c6015ad7aaea6f572a1c2b198ca323592 - name: Unshallow clone for tags run: git fetch --prune --unshallow --tags + - name: Prepare upstream code + run: make upstream - name: Install Go uses: actions/setup-go@v5 with: - cache-dependency-path: | - sdk/go.sum go-version: 1.21.x + cache-dependency-path: | + provider/*.sum + upstream/*.sum - name: Install pulumictl uses: jaxxstorm/action-install-gh-release@v1.11.0 with: @@ -172,8 +177,14 @@ jobs: uses: jaxxstorm/action-install-gh-release@v1.11.0 with: repo: pulumi/schema-tools - - name: Build tfgen & provider binaries - run: make provider + - name: Build schema generator binary + run: make tfgen_build_only + - name: Install plugins + run: make install_plugins + - name: Generate schema + run: make tfgen_no_deps + - name: Build provider binary + run: make provider_no_deps - name: Unit-test provider code run: make test_provider - if: github.event_name == 'pull_request' @@ -204,7 +215,7 @@ jobs: name: Check Configuration section run: | sed -n '/## Configuration/,$p' README.md | sed -n '/## Reference/q;p' >> config_section.txt - jq -r '.config[] | keys[]' < provider/cmd/pulumi-resource-${{ env.PROVIDER }}/schema.json >> keys.txt + jq -r '.config | select(.variables) | .variables | keys[]' < provider/cmd/pulumi-resource-${{ env.PROVIDER }}/schema.json >> keys.txt EOF=$(dd if=/dev/urandom bs=15 count=1 status=none | base64) { echo "MISSING_CONFIG<<$EOF"; diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5e0d81d2..7d622a87 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -113,6 +113,7 @@ jobs: with: name: ${{ matrix.language }}-sdk.tar.gz path: ${{ github.workspace}}/sdk/${{ matrix.language }}.tar.gz + retention-days: 30 - if: failure() && github.event_name == 'push' name: Notify Slack uses: 8398a7/action-slack@v3 @@ -129,6 +130,7 @@ jobs: - dotnet - go - java + create_docs_build: name: create_docs_build needs: tag_sdk @@ -166,12 +168,15 @@ jobs: ref: deca2c5c6015ad7aaea6f572a1c2b198ca323592 - name: Unshallow clone for tags run: git fetch --prune --unshallow --tags + - name: Prepare upstream code + run: make upstream - name: Install Go uses: actions/setup-go@v5 with: - cache-dependency-path: | - sdk/go.sum go-version: 1.21.x + cache-dependency-path: | + provider/*.sum + upstream/*.sum - name: Install pulumictl uses: jaxxstorm/action-install-gh-release@v1.11.0 with: @@ -186,8 +191,14 @@ jobs: uses: jaxxstorm/action-install-gh-release@v1.11.0 with: repo: pulumi/schema-tools - - name: Build tfgen & provider binaries - run: make provider + - name: Build schema generator binary + run: make tfgen_build_only + - name: Install plugins + run: make install_plugins + - name: Generate schema + run: make tfgen_no_deps + - name: Build provider binary + run: make provider_no_deps - name: Unit-test provider code run: make test_provider - if: github.event_name == 'pull_request' @@ -218,7 +229,7 @@ jobs: name: Check Configuration section run: | sed -n '/## Configuration/,$p' README.md | sed -n '/## Reference/q;p' >> config_section.txt - jq -r '.config[] | keys[]' < provider/cmd/pulumi-resource-${{ env.PROVIDER }}/schema.json >> keys.txt + jq -r '.config | select(.variables) | .variables | keys[]' < provider/cmd/pulumi-resource-${{ env.PROVIDER }}/schema.json >> keys.txt EOF=$(dd if=/dev/urandom bs=15 count=1 status=none | base64) { echo "MISSING_CONFIG<<$EOF"; diff --git a/.github/workflows/run-acceptance-tests.yml b/.github/workflows/run-acceptance-tests.yml index 0632934a..2dec0d73 100644 --- a/.github/workflows/run-acceptance-tests.yml +++ b/.github/workflows/run-acceptance-tests.yml @@ -140,6 +140,7 @@ jobs: - dotnet - go - java + comment-notification: if: github.event_name == 'repository_dispatch' name: comment-notification @@ -177,12 +178,15 @@ jobs: ref: deca2c5c6015ad7aaea6f572a1c2b198ca323592 - name: Unshallow clone for tags run: git fetch --prune --unshallow --tags + - name: Prepare upstream code + run: make upstream - name: Install Go uses: actions/setup-go@v5 with: - cache-dependency-path: | - sdk/go.sum go-version: 1.21.x + cache-dependency-path: | + provider/*.sum + upstream/*.sum - name: Install pulumictl uses: jaxxstorm/action-install-gh-release@v1.11.0 with: @@ -197,8 +201,14 @@ jobs: uses: jaxxstorm/action-install-gh-release@v1.11.0 with: repo: pulumi/schema-tools - - name: Build tfgen & provider binaries - run: make provider + - name: Build schema generator binary + run: make tfgen_build_only + - name: Install plugins + run: make install_plugins + - name: Generate schema + run: make tfgen_no_deps + - name: Build provider binary + run: make provider_no_deps - name: Unit-test provider code run: make test_provider - if: github.event_name == 'pull_request' @@ -229,7 +239,7 @@ jobs: name: Check Configuration section run: | sed -n '/## Configuration/,$p' README.md | sed -n '/## Reference/q;p' >> config_section.txt - jq -r '.config[] | keys[]' < provider/cmd/pulumi-resource-${{ env.PROVIDER }}/schema.json >> keys.txt + jq -r '.config | select(.variables) | .variables | keys[]' < provider/cmd/pulumi-resource-${{ env.PROVIDER }}/schema.json >> keys.txt EOF=$(dd if=/dev/urandom bs=15 count=1 status=none | base64) { echo "MISSING_CONFIG<<$EOF"; diff --git a/Makefile b/Makefile index 31b180a0..3b8910da 100644 --- a/Makefile +++ b/Makefile @@ -134,11 +134,14 @@ test_provider: @echo "" cd provider && go test -v -short ./... -parallel $(TESTPARALLELISM) -tfgen: export PULUMI_HOME := $(WORKING_DIR)/.pulumi -tfgen: export PATH := $(WORKING_DIR)/.pulumi/bin:$(PATH) -tfgen: install_plugins upstream - (cd provider && go build $(PULUMI_PROVIDER_BUILD_PARALLELISM) -o $(WORKING_DIR)/bin/$(TFGEN) -ldflags "-X $(PROJECT)/$(VERSION_PATH)=$(VERSION)" $(PROJECT)/$(PROVIDER_PATH)/cmd/$(TFGEN)) - PULUMI_CONVERT=$(PULUMI_CONVERT) PULUMI_DISABLE_AUTOMATIC_PLUGIN_ACQUISITION=$(PULUMI_CONVERT) $(WORKING_DIR)/bin/$(TFGEN) schema --out provider/cmd/$(PROVIDER) +tfgen: install_plugins upstream tfgen_no_deps + +tfgen_no_deps: export PULUMI_HOME := $(WORKING_DIR)/.pulumi +tfgen_no_deps: export PATH := $(WORKING_DIR)/.pulumi/bin:$(PATH) +tfgen_no_deps: export PULUMI_CONVERT := $(PULUMI_CONVERT) +tfgen_no_deps: export PULUMI_DISABLE_AUTOMATIC_PLUGIN_ACQUISITION := $(PULUMI_CONVERT) +tfgen_no_deps: tfgen_build_only + $(WORKING_DIR)/bin/$(TFGEN) schema --out provider/cmd/$(PROVIDER) (cd provider && VERSION=$(VERSION) go generate cmd/$(PROVIDER)/main.go) tfgen_build_only: