From be1507d66f64be48dbca38e53e4e705228252d9c Mon Sep 17 00:00:00 2001 From: Ian Wahbe Date: Tue, 22 Aug 2023 11:44:37 -0700 Subject: [PATCH 1/8] Begin normalizing workflow files, based off of pulumi/ci-mgmt/#518 This commit is based off of https://github.com/pulumi/ci-mgmt/pull/518/commits/40483b899bf611a81e6c94a9137020dd18af3731, I expect that we will need to add some hooks to ci-mgmt for aws specific setup, but that will come in future PRs. There are outstanding changes in these files: - [ ] Makefile - [ ] .github/workflows/main.yml - [ ] .github/workflows/master.yml - [ ] .github/workflows/nightly-test.yml - [ ] .github/workflows/prerelease.yml - [ ] .github/workflows/release.yml - [ ] .github/workflows/run-acceptance-tests.yml - [ ] .github/workflows/update-bridge.yml - [X] .github/workflows/command-dispatch.yml - [X] .github/workflows/community-moderation.yml - [X] .github/workflows/pull-request.yml - [X] .github/workflows/resync-build.yml - [X] .github/workflows/upgrade-bridge.yml - [X] .github/workflows/upgrade-provider.yml - [X] .goreleaser.prerelease.yml - [X] .goreleaser.yml - [X] .upgrade-config.yml - [X] scripts/upstream.sh --- .github/workflows/command-dispatch.yml | 12 +- .github/workflows/community-moderation.yml | 4 +- .github/workflows/pull-request.yml | 15 +- .github/workflows/resync-build.yml | 117 +++++++++++++ .github/workflows/upgrade-bridge.yml | 41 +++++ .github/workflows/upgrade-provider.yml | 45 +++++ .goreleaser.prerelease.yml | 7 +- .goreleaser.yml | 4 + .upgrade-config.yml | 8 + scripts/upstream.sh | 193 +++++++++++++++++++++ 10 files changed, 438 insertions(+), 8 deletions(-) create mode 100644 .github/workflows/resync-build.yml create mode 100644 .github/workflows/upgrade-bridge.yml create mode 100644 .github/workflows/upgrade-provider.yml create mode 100644 .upgrade-config.yml create mode 100644 scripts/upstream.sh diff --git a/.github/workflows/command-dispatch.yml b/.github/workflows/command-dispatch.yml index e5b93415319..75101ee80de 100644 --- a/.github/workflows/command-dispatch.yml +++ b/.github/workflows/command-dispatch.yml @@ -1,10 +1,18 @@ +# WARNING: This file is autogenerated - changes will be overwritten if not made via https://github.com/pulumi/ci-mgmt + env: + PROVIDER: aws AWS_REGION: us-west-2 + DOTNETVERSION: | + 6.0.x + 3.1.301 GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GOVERSION: 1.20.1 + JAVAVERSION: "11" NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + NODEVERSION: 16.x NPM_TOKEN: ${{ secrets.NPM_TOKEN }} NUGET_PUBLISH_KEY: ${{ secrets.NUGET_PUBLISH_KEY }} - PROVIDER: aws PUBLISH_REPO_PASSWORD: ${{ secrets.OSSRH_PASSWORD }} PUBLISH_REPO_USERNAME: ${{ secrets.OSSRH_USERNAME }} PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_ACCESS_TOKEN }} @@ -13,10 +21,12 @@ env: PULUMI_LOCAL_NUGET: ${{ github.workspace }}/nuget PULUMI_MISSING_DOCS_ERROR: true PYPI_PASSWORD: ${{ secrets.PYPI_PASSWORD }} + PYTHONVERSION: "3.9" SIGNING_KEY: ${{ secrets.JAVA_SIGNING_KEY }} SIGNING_KEY_ID: ${{ secrets.JAVA_SIGNING_KEY_ID }} SIGNING_PASSWORD: ${{ secrets.JAVA_SIGNING_PASSWORD }} SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} + TF_APPEND_USER_AGENT: pulumi TRAVIS_OS_NAME: linux jobs: command-dispatch-for-testing: diff --git a/.github/workflows/community-moderation.yml b/.github/workflows/community-moderation.yml index 3b5dd348a62..647c712d31a 100644 --- a/.github/workflows/community-moderation.yml +++ b/.github/workflows/community-moderation.yml @@ -1,3 +1,5 @@ +# WARNING: This file is autogenerated - changes will be overwritten if not made via https://github.com/pulumi/ci-mgmt + env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} jobs: @@ -21,7 +23,7 @@ jobs: - if: steps.sdk_changed.outputs.changed == 'true' && github.event.pull_request.head.repo.full_name != github.repository name: Send codegen warning as comment on PR - uses: thollander/actions-comment-pull-request@v1 + uses: thollander/actions-comment-pull-request@v2 with: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} message: > diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 93a5dbe7a24..4bb6c81e76f 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -1,13 +1,18 @@ +# WARNING: This file is autogenerated - changes will be overwritten if not made via https://github.com/pulumi/ci-mgmt + env: + PROVIDER: aws AWS_REGION: us-west-2 DOTNETVERSION: | - 6.0.x - 3.1.301 + 6.0.x + 3.1.301 GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GOVERSION: 1.20.1 + JAVAVERSION: "11" NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + NODEVERSION: 16.x NPM_TOKEN: ${{ secrets.NPM_TOKEN }} NUGET_PUBLISH_KEY: ${{ secrets.NUGET_PUBLISH_KEY }} - PROVIDER: aws PUBLISH_REPO_PASSWORD: ${{ secrets.OSSRH_PASSWORD }} PUBLISH_REPO_USERNAME: ${{ secrets.OSSRH_USERNAME }} PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_ACCESS_TOKEN }} @@ -16,10 +21,12 @@ env: PULUMI_LOCAL_NUGET: ${{ github.workspace }}/nuget PULUMI_MISSING_DOCS_ERROR: true PYPI_PASSWORD: ${{ secrets.PYPI_PASSWORD }} + PYTHONVERSION: "3.9" SIGNING_KEY: ${{ secrets.JAVA_SIGNING_KEY }} SIGNING_KEY_ID: ${{ secrets.JAVA_SIGNING_KEY_ID }} SIGNING_PASSWORD: ${{ secrets.JAVA_SIGNING_PASSWORD }} SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} + TF_APPEND_USER_AGENT: pulumi TRAVIS_OS_NAME: linux jobs: comment-on-pr: @@ -30,7 +37,7 @@ jobs: - name: Checkout Repo uses: actions/checkout@v3 - name: Comment PR - uses: thollander/actions-comment-pull-request@v1 + uses: thollander/actions-comment-pull-request@v2 with: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} message: > diff --git a/.github/workflows/resync-build.yml b/.github/workflows/resync-build.yml new file mode 100644 index 00000000000..95088270876 --- /dev/null +++ b/.github/workflows/resync-build.yml @@ -0,0 +1,117 @@ +# WARNING: This file is autogenerated - changes will be overwritten if not made via https://github.com/pulumi/ci-mgmt + +env: + PROVIDER: aws + PULUMI_EXTRA_MAPPING_ERROR: true + PULUMI_MISSING_MAPPING_ERROR: true + AWS_REGION: us-west-2 + DOTNETVERSION: | + 6.0.x + 3.1.301 + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GOVERSION: 1.20.1 + JAVAVERSION: "11" + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + NODEVERSION: 16.x + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} + NUGET_PUBLISH_KEY: ${{ secrets.NUGET_PUBLISH_KEY }} + PUBLISH_REPO_PASSWORD: ${{ secrets.OSSRH_PASSWORD }} + PUBLISH_REPO_USERNAME: ${{ secrets.OSSRH_USERNAME }} + PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_ACCESS_TOKEN }} + PULUMI_API: https://api.pulumi-staging.io + PULUMI_GO_DEP_ROOT: ${{ github.workspace }}/.. + PULUMI_LOCAL_NUGET: ${{ github.workspace }}/nuget + PULUMI_MISSING_DOCS_ERROR: true + PYPI_PASSWORD: ${{ secrets.PYPI_PASSWORD }} + PYTHONVERSION: "3.9" + SIGNING_KEY: ${{ secrets.JAVA_SIGNING_KEY }} + SIGNING_KEY_ID: ${{ secrets.JAVA_SIGNING_KEY_ID }} + SIGNING_PASSWORD: ${{ secrets.JAVA_SIGNING_PASSWORD }} + SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} + TF_APPEND_USER_AGENT: pulumi + TRAVIS_OS_NAME: linux +jobs: + resync_build: + name: resync-build + runs-on: ubuntu-latest + steps: + - name: Checkout Repo + uses: actions/checkout@v3 + - name: Checkout repo + uses: actions/checkout@v3 + with: + path: ci-mgmt + repository: pulumi/ci-mgmt + - id: run-url + name: Create URL to the run output + run: echo "run-url=https://github.com/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID" >> "$GITHUB_OUTPUT" + - name: Unshallow clone for tags + run: git fetch --prune --unshallow --tags + - name: Install Go + uses: actions/setup-go@v3 + with: + go-version: 1.20.1 + - name: Install pulumictl + uses: jaxxstorm/action-install-gh-release@v1.5.0 + with: + repo: pulumi/pulumictl + - name: Install Pulumi CLI + uses: pulumi/action-install-pulumi-cli@v2 + - name: Setup DotNet + uses: actions/setup-dotnet@v1 + with: + dotnet-version: ${{ env.DOTNETVERSION }} + - name: Setup Node + uses: actions/setup-node@v2 + with: + node-version: ${{ env.NODEVERSION }} + registry-url: https://registry.npmjs.org + - name: Setup Python + uses: actions/setup-python@v2 + with: + python-version: ${{ env.PYTHONVERSION }} + - name: Sync with ci-mgmt + run: cp -r "ci-mgmt/provider-ci/providers/$PROVIDER/repo/." . + - name: Remove ci-mgmt directory + run: rm -rf ci-mgmt + - name: Required entries for gitignore + run: |- + cat <<- EOF > "$RUNNER_TEMP/gitignore" + sdk/java/build + sdk/java/.gradle + sdk/java/gradle + sdk/java/gradlew + sdk/java/gradlew.bat + EOF + shell: bash + - name: Adding missing lines to .gitignore + run: | + comm -23 <(sort "$RUNNER_TEMP/gitignore") <(sort .gitignore) >> .gitignore.temp + cat .gitignore.temp >> .gitignore + rm .gitignore.temp + shell: bash + - name: Build + run: make build + - name: Create PR (no linked issue) + uses: peter-evans/create-pull-request@v3.12.0 + with: + author: pulumi-bot + base: master + body: This pull request was generated automatically by the resync-build workflow + in this repository. + branch: pulumi-bot/resync-${{ github.run_id}} + commit-message: Resync build for pulumi-${{ env.PROVIDER }} + committer: pulumi-bot + labels: impact/no-changelog-required + team-reviewers: platform-integrations + title: Fix up build for pulumi-${{ env.PROVIDER }} + token: ${{ secrets.PULUMI_BOT_TOKEN }} +name: Resync build +on: + workflow_dispatch: + inputs: + automerge: + default: false + description: Mark created PR for auto-merging? + required: true + type: boolean diff --git a/.github/workflows/upgrade-bridge.yml b/.github/workflows/upgrade-bridge.yml new file mode 100644 index 00000000000..84bfe8a11ec --- /dev/null +++ b/.github/workflows/upgrade-bridge.yml @@ -0,0 +1,41 @@ +# WARNING: This file is autogenerated - changes will be overwritten if not made via https://github.com/pulumi/ci-mgmt + +env: + GH_TOKEN: ${{ secrets.PULUMI_BOT_TOKEN }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} +jobs: + upgrade_provider: + name: upgrade-provider + runs-on: ubuntu-latest + steps: + - name: Call upgrade provider action + uses: pulumi/pulumi-upgrade-provider-action@v0.0.5 + with: + kind: bridge + - env: + SLACK_CHANNEL: provider-upgrade-publish-status + SLACK_COLOR: "#7CFC00" + SLACK_ICON_EMOJI: ":taco:" + SLACK_MESSAGE: >- + Upgrade succeeded :heart_decoration: + + PR opened at github.com/pulumi/${{ github.event.repository.name }}/pulls + SLACK_TITLE: ${{ github.event.repository.name }} upgrade result + SLACK_USERNAME: provider-bot + SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }} + name: Send Upgrade Success To Slack + uses: rtCamp/action-slack-notify@v2 + - env: + SLACK_CHANNEL: provider-upgrade-publish-status + SLACK_COLOR: "#FF0000" + SLACK_ICON_EMOJI: ":taco:" + SLACK_MESSAGE: " Upgrade failed :x:" + SLACK_TITLE: ${{ github.event.repository.name }} upgrade result + SLACK_USERNAME: provider-bot + SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }} + if: failure() + name: Send Upgrade Failure To Slack + uses: rtCamp/action-slack-notify@v2 +name: Upgrade bridge +on: + workflow_dispatch: {} diff --git a/.github/workflows/upgrade-provider.yml b/.github/workflows/upgrade-provider.yml new file mode 100644 index 00000000000..e2ed3a3c016 --- /dev/null +++ b/.github/workflows/upgrade-provider.yml @@ -0,0 +1,45 @@ +# WARNING: This file is autogenerated - changes will be overwritten if not made via https://github.com/pulumi/ci-mgmt + +env: + GH_TOKEN: ${{ secrets.PULUMI_BOT_TOKEN }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} +jobs: + upgrade_provider: + if: ${{ contains(github.event.issue.title, 'Upgrade terraform-provider-') }} + name: upgrade-provider + runs-on: ubuntu-latest + steps: + - name: Call upgrade provider action + uses: pulumi/pulumi-upgrade-provider-action@v0.0.5 + with: + kind: all + - env: + SLACK_CHANNEL: provider-upgrade-publish-status + SLACK_COLOR: "#7CFC00" + SLACK_ICON_EMOJI: ":taco:" + SLACK_MESSAGE: >- + Upgrade succeeded :heart_decoration: + + PR opened at github.com/pulumi/${{ github.event.repository.name }}/pulls + SLACK_TITLE: ${{ github.event.repository.name }} upgrade result + SLACK_USERNAME: provider-bot + SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }} + name: Send Upgrade Success To Slack + uses: rtCamp/action-slack-notify@v2 + - env: + SLACK_CHANNEL: provider-upgrade-publish-status + SLACK_COLOR: "#FF0000" + SLACK_ICON_EMOJI: ":taco:" + SLACK_MESSAGE: " Upgrade failed :x:" + SLACK_TITLE: ${{ github.event.repository.name }} upgrade result + SLACK_USERNAME: provider-bot + SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }} + if: failure() + name: Send Upgrade Failure To Slack + uses: rtCamp/action-slack-notify@v2 +name: Upgrade provider +on: + issues: + types: + - opened + workflow_dispatch: {} diff --git a/.goreleaser.prerelease.yml b/.goreleaser.prerelease.yml index 4f33248b870..a83d15238ca 100644 --- a/.goreleaser.prerelease.yml +++ b/.goreleaser.prerelease.yml @@ -26,11 +26,14 @@ builds: - darwin - windows - linux + hooks: + post: + - env GOOS={{ .Os }} GOARCH={{ .Arch }} go clean -cache + - env GOOS={{ .Os }} GOARCH={{ .Arch }} go clean -modcache ignore: [] ldflags: - -X github.com/pulumi/pulumi-aws/provider/v6/pkg/version.Version={{.Tag}} - - -X - github.com/hashicorp/terraform-provider-aws/version.ProviderVersion={{.Tag}} + - -X github.com/hashicorp/terraform-provider-aws/version.ProviderVersion={{.Tag}} main: ./cmd/pulumi-resource-aws/ changelog: skip: true diff --git a/.goreleaser.yml b/.goreleaser.yml index c1468d224c2..128f21a23b3 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -26,6 +26,10 @@ builds: - darwin - windows - linux + hooks: + post: + - env GOOS={{ .Os }} GOARCH={{ .Arch }} go clean -cache + - env GOOS={{ .Os }} GOARCH={{ .Arch }} go clean -modcache ignore: [] ldflags: - -X github.com/pulumi/pulumi-aws/provider/v6/pkg/version.Version={{.Tag}} diff --git a/.upgrade-config.yml b/.upgrade-config.yml new file mode 100644 index 00000000000..a1d69a58915 --- /dev/null +++ b/.upgrade-config.yml @@ -0,0 +1,8 @@ +# WARNING: This file is autogenerated - changes will be overwritten if not made via https://github.com/pulumi/ci-mgmt + +--- +upstream-provider-name: terraform-provider-aws +pulumi-infer-version: true +remove-plugins: true +pr-reviewers: pulumi/Providers,lukehoban + diff --git a/scripts/upstream.sh b/scripts/upstream.sh new file mode 100644 index 00000000000..7c1933f6877 --- /dev/null +++ b/scripts/upstream.sh @@ -0,0 +1,193 @@ +# +# WARNING: This file is autogenerated - changes will be overwritten if not made via https://github.com/pulumi/ci-mgmt + +set -e + +# "$1" is the current make command being run. +# It is used to make the error message more actionable. +err_rebase_in_progress() { + cat < Date: Tue, 22 Aug 2023 15:49:57 -0700 Subject: [PATCH 2/8] Accept header and formatting changes --- .github/workflows/main.yml | 17 +++++++--- .github/workflows/master.yml | 13 ++++++-- .github/workflows/nightly-test.yml | 13 ++++++-- .github/workflows/prerelease.yml | 14 ++++++-- .github/workflows/release.yml | 13 ++++++-- .github/workflows/resync-build.yml | 4 ++- .github/workflows/run-acceptance-tests.yml | 38 +++++++++++++--------- .github/workflows/update-bridge.yml | 9 +++-- 8 files changed, 82 insertions(+), 39 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 0e07a449506..72b1694ed99 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,13 +1,18 @@ +# WARNING: This file is autogenerated - changes will be overwritten if not made via https://github.com/pulumi/ci-mgmt + env: + PROVIDER: aws AWS_REGION: us-west-2 DOTNETVERSION: | - 6.0.x - 3.1.301 + 6.0.x + 3.1.301 GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GOVERSION: 1.20.1 + JAVAVERSION: "11" NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + NODEVERSION: 16.x NPM_TOKEN: ${{ secrets.NPM_TOKEN }} NUGET_PUBLISH_KEY: ${{ secrets.NUGET_PUBLISH_KEY }} - PROVIDER: aws PUBLISH_REPO_PASSWORD: ${{ secrets.OSSRH_PASSWORD }} PUBLISH_REPO_USERNAME: ${{ secrets.OSSRH_USERNAME }} PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_ACCESS_TOKEN }} @@ -16,10 +21,12 @@ env: PULUMI_LOCAL_NUGET: ${{ github.workspace }}/nuget PULUMI_MISSING_DOCS_ERROR: true PYPI_PASSWORD: ${{ secrets.PYPI_PASSWORD }} + PYTHONVERSION: "3.9" SIGNING_KEY: ${{ secrets.JAVA_SIGNING_KEY }} SIGNING_KEY_ID: ${{ secrets.JAVA_SIGNING_KEY_ID }} SIGNING_PASSWORD: ${{ secrets.JAVA_SIGNING_PASSWORD }} SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} + TF_APPEND_USER_AGENT: pulumi TRAVIS_OS_NAME: linux jobs: build_sdk: @@ -88,10 +95,10 @@ jobs: - name: Install plugins run: make install_plugins - name: Update path - run: echo "${{ github.workspace }}/bin" >> $GITHUB_PATH + run: echo "${{ github.workspace }}/bin" >> "$GITHUB_PATH" - name: Set PACKAGE_VERSION to Env run: echo "PACKAGE_VERSION=$(pulumictl get version --language generic)" >> - $GITHUB_ENV + "$GITHUB_ENV" - name: Build SDK run: make build_${{ matrix.language }} - name: Check worktree clean diff --git a/.github/workflows/master.yml b/.github/workflows/master.yml index 3a414d211d0..cad6520e70f 100644 --- a/.github/workflows/master.yml +++ b/.github/workflows/master.yml @@ -1,13 +1,18 @@ +# WARNING: This file is autogenerated - changes will be overwritten if not made via https://github.com/pulumi/ci-mgmt + env: + PROVIDER: aws AWS_REGION: us-west-2 DOTNETVERSION: | - 6.0.x - 3.1.301 + 6.0.x + 3.1.301 GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GOVERSION: 1.20.1 + JAVAVERSION: "11" NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + NODEVERSION: 16.x NPM_TOKEN: ${{ secrets.NPM_TOKEN }} NUGET_PUBLISH_KEY: ${{ secrets.NUGET_PUBLISH_KEY }} - PROVIDER: aws PUBLISH_REPO_PASSWORD: ${{ secrets.OSSRH_PASSWORD }} PUBLISH_REPO_USERNAME: ${{ secrets.OSSRH_USERNAME }} PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_ACCESS_TOKEN }} @@ -16,10 +21,12 @@ env: PULUMI_LOCAL_NUGET: ${{ github.workspace }}/nuget PULUMI_MISSING_DOCS_ERROR: true PYPI_PASSWORD: ${{ secrets.PYPI_PASSWORD }} + PYTHONVERSION: "3.9" SIGNING_KEY: ${{ secrets.JAVA_SIGNING_KEY }} SIGNING_KEY_ID: ${{ secrets.JAVA_SIGNING_KEY_ID }} SIGNING_PASSWORD: ${{ secrets.JAVA_SIGNING_PASSWORD }} SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} + TF_APPEND_USER_AGENT: pulumi TRAVIS_OS_NAME: linux jobs: build_sdk: diff --git a/.github/workflows/nightly-test.yml b/.github/workflows/nightly-test.yml index 94cb58f6f4c..b38e139e20a 100644 --- a/.github/workflows/nightly-test.yml +++ b/.github/workflows/nightly-test.yml @@ -1,13 +1,18 @@ +# WARNING: This file is autogenerated - changes will be overwritten if not made via https://github.com/pulumi/ci-mgmt + env: + PROVIDER: aws AWS_REGION: us-west-2 DOTNETVERSION: | - 6.0.x - 3.1.301 + 6.0.x + 3.1.301 GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GOVERSION: 1.20.1 + JAVAVERSION: "11" NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + NODEVERSION: 16.x NPM_TOKEN: ${{ secrets.NPM_TOKEN }} NUGET_PUBLISH_KEY: ${{ secrets.NUGET_PUBLISH_KEY }} - PROVIDER: aws PUBLISH_REPO_PASSWORD: ${{ secrets.OSSRH_PASSWORD }} PUBLISH_REPO_USERNAME: ${{ secrets.OSSRH_USERNAME }} PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_ACCESS_TOKEN }} @@ -16,10 +21,12 @@ env: PULUMI_LOCAL_NUGET: ${{ github.workspace }}/nuget PULUMI_MISSING_DOCS_ERROR: true PYPI_PASSWORD: ${{ secrets.PYPI_PASSWORD }} + PYTHONVERSION: "3.9" SIGNING_KEY: ${{ secrets.JAVA_SIGNING_KEY }} SIGNING_KEY_ID: ${{ secrets.JAVA_SIGNING_KEY_ID }} SIGNING_PASSWORD: ${{ secrets.JAVA_SIGNING_PASSWORD }} SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} + TF_APPEND_USER_AGENT: pulumi TRAVIS_OS_NAME: linux jobs: build_sdk: diff --git a/.github/workflows/prerelease.yml b/.github/workflows/prerelease.yml index 3cf7336955e..fcf957a250e 100644 --- a/.github/workflows/prerelease.yml +++ b/.github/workflows/prerelease.yml @@ -1,13 +1,19 @@ +# WARNING: This file is autogenerated - changes will be overwritten if not made via https://github.com/pulumi/ci-mgmt + env: + PROVIDER: aws + IS_PRERELEASE: true AWS_REGION: us-west-2 DOTNETVERSION: | - 6.0.x - 3.1.301 + 6.0.x + 3.1.301 GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GOVERSION: 1.20.1 + JAVAVERSION: "11" NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + NODEVERSION: 16.x NPM_TOKEN: ${{ secrets.NPM_TOKEN }} NUGET_PUBLISH_KEY: ${{ secrets.NUGET_PUBLISH_KEY }} - PROVIDER: aws PUBLISH_REPO_PASSWORD: ${{ secrets.OSSRH_PASSWORD }} PUBLISH_REPO_USERNAME: ${{ secrets.OSSRH_USERNAME }} PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_ACCESS_TOKEN }} @@ -16,10 +22,12 @@ env: PULUMI_LOCAL_NUGET: ${{ github.workspace }}/nuget PULUMI_MISSING_DOCS_ERROR: true PYPI_PASSWORD: ${{ secrets.PYPI_PASSWORD }} + PYTHONVERSION: "3.9" SIGNING_KEY: ${{ secrets.JAVA_SIGNING_KEY }} SIGNING_KEY_ID: ${{ secrets.JAVA_SIGNING_KEY_ID }} SIGNING_PASSWORD: ${{ secrets.JAVA_SIGNING_PASSWORD }} SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} + TF_APPEND_USER_AGENT: pulumi TRAVIS_OS_NAME: linux jobs: build_sdk: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4972a6f8adf..dbcacbb6805 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,13 +1,18 @@ +# WARNING: This file is autogenerated - changes will be overwritten if not made via https://github.com/pulumi/ci-mgmt + env: + PROVIDER: aws AWS_REGION: us-west-2 DOTNETVERSION: | - 6.0.x - 3.1.301 + 6.0.x + 3.1.301 GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GOVERSION: 1.20.1 + JAVAVERSION: "11" NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + NODEVERSION: 16.x NPM_TOKEN: ${{ secrets.NPM_TOKEN }} NUGET_PUBLISH_KEY: ${{ secrets.NUGET_PUBLISH_KEY }} - PROVIDER: aws PUBLISH_REPO_PASSWORD: ${{ secrets.OSSRH_PASSWORD }} PUBLISH_REPO_USERNAME: ${{ secrets.OSSRH_USERNAME }} PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_ACCESS_TOKEN }} @@ -16,10 +21,12 @@ env: PULUMI_LOCAL_NUGET: ${{ github.workspace }}/nuget PULUMI_MISSING_DOCS_ERROR: true PYPI_PASSWORD: ${{ secrets.PYPI_PASSWORD }} + PYTHONVERSION: "3.9" SIGNING_KEY: ${{ secrets.JAVA_SIGNING_KEY }} SIGNING_KEY_ID: ${{ secrets.JAVA_SIGNING_KEY_ID }} SIGNING_PASSWORD: ${{ secrets.JAVA_SIGNING_PASSWORD }} SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} + TF_APPEND_USER_AGENT: pulumi TRAVIS_OS_NAME: linux jobs: build_sdk: diff --git a/.github/workflows/resync-build.yml b/.github/workflows/resync-build.yml index 95088270876..952c2efbf81 100644 --- a/.github/workflows/resync-build.yml +++ b/.github/workflows/resync-build.yml @@ -48,8 +48,10 @@ jobs: - name: Unshallow clone for tags run: git fetch --prune --unshallow --tags - name: Install Go - uses: actions/setup-go@v3 + uses: actions/setup-go@v4 with: + cache-dependency-path: | + sdk/go.sum go-version: 1.20.1 - name: Install pulumictl uses: jaxxstorm/action-install-gh-release@v1.5.0 diff --git a/.github/workflows/run-acceptance-tests.yml b/.github/workflows/run-acceptance-tests.yml index d031c4c0d08..a8d4ca61b44 100644 --- a/.github/workflows/run-acceptance-tests.yml +++ b/.github/workflows/run-acceptance-tests.yml @@ -1,14 +1,19 @@ +# WARNING: This file is autogenerated - changes will be overwritten if not made via https://github.com/pulumi/ci-mgmt + env: + PROVIDER: aws + PR_COMMIT_SHA: ${{ github.event.client_payload.pull_request.head.sha }} AWS_REGION: us-west-2 DOTNETVERSION: | - 6.0.x - 3.1.301 + 6.0.x + 3.1.301 GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GOVERSION: 1.20.1 + JAVAVERSION: "11" NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + NODEVERSION: 16.x NPM_TOKEN: ${{ secrets.NPM_TOKEN }} NUGET_PUBLISH_KEY: ${{ secrets.NUGET_PUBLISH_KEY }} - PROVIDER: aws - PR_COMMIT_SHA: ${{ github.event.client_payload.pull_request.head.sha }} PUBLISH_REPO_PASSWORD: ${{ secrets.OSSRH_PASSWORD }} PUBLISH_REPO_USERNAME: ${{ secrets.OSSRH_USERNAME }} PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_ACCESS_TOKEN }} @@ -17,10 +22,12 @@ env: PULUMI_LOCAL_NUGET: ${{ github.workspace }}/nuget PULUMI_MISSING_DOCS_ERROR: true PYPI_PASSWORD: ${{ secrets.PYPI_PASSWORD }} + PYTHONVERSION: "3.9" SIGNING_KEY: ${{ secrets.JAVA_SIGNING_KEY }} SIGNING_KEY_ID: ${{ secrets.JAVA_SIGNING_KEY_ID }} SIGNING_PASSWORD: ${{ secrets.JAVA_SIGNING_PASSWORD }} SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} + TF_APPEND_USER_AGENT: pulumi TRAVIS_OS_NAME: linux jobs: build_sdk: @@ -45,21 +52,19 @@ jobs: - name: Install Go uses: actions/setup-go@v4 with: - go-version: ${{matrix.goversion}} cache-dependency-path: | sdk/go.sum + go-version: 1.20.1 - name: Install pulumictl uses: jaxxstorm/action-install-gh-release@v1.5.0 with: repo: pulumi/pulumictl - name: Install Pulumi CLI - uses: pulumi/actions@v4 - with: - pulumi-version: v3.77.1 + uses: pulumi/action-install-pulumi-cli@v2 - name: Setup Node uses: actions/setup-node@v2 with: - node-version: ${{matrix.nodeversion}} + node-version: ${{ env.NODEVERSION }} registry-url: https://registry.npmjs.org - name: Setup DotNet uses: actions/setup-dotnet@v1 @@ -68,17 +73,16 @@ jobs: - name: Setup Python uses: actions/setup-python@v2 with: - python-version: ${{matrix.pythonversion}} + python-version: ${{ env.PYTHONVERSION }} - name: Setup Java uses: actions/setup-java@v3 with: cache: gradle distribution: temurin - java-version: ${{matrix.javaversion}} + java-version: ${{ env.JAVAVERSION }} - name: Setup Gradle uses: gradle/gradle-build-action@v2 with: - # Pin to known good version until #2262 is resolved gradle-version: "7.6" - name: Download provider + tfgen binaries uses: actions/download-artifact@v2 @@ -94,10 +98,10 @@ jobs: - name: Install plugins run: make install_plugins - name: Update path - run: echo "${{ github.workspace }}/bin" >> $GITHUB_PATH + run: echo "${{ github.workspace }}/bin" >> "$GITHUB_PATH" - name: Set PACKAGE_VERSION to Env run: echo "PACKAGE_VERSION=$(pulumictl get version --language generic)" >> - $GITHUB_ENV + "$GITHUB_ENV" - name: Build SDK run: make build_${{ matrix.language }} - name: Check worktree clean @@ -141,8 +145,7 @@ jobs: steps: - id: run-url name: Create URL to the run output - run: echo ::set-output - name=run-url::https://github.com/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID + run: echo "run-url=https://github.com/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID" >> "$GITHUB_OUTPUT" - name: Update with Result uses: peter-evans/create-or-update-comment@v1 with: @@ -221,6 +224,9 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} comment_tag: schemaCheck message: >+ + ### Does the PR have any schema changes? + + ${{ env.SCHEMA_CHANGES }} diff --git a/.github/workflows/update-bridge.yml b/.github/workflows/update-bridge.yml index 538f4df551c..fb9750912e0 100644 --- a/.github/workflows/update-bridge.yml +++ b/.github/workflows/update-bridge.yml @@ -1,7 +1,6 @@ +# WARNING: This file is autogenerated - changes will be overwritten if not made via https://github.com/pulumi/ci-mgmt + env: - DOTNETVERSION: | - 6.0.x - 3.1.301 GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} PULUMI_EXTRA_MAPPING_ERROR: false PULUMI_MISSING_MAPPING_ERROR: false @@ -37,12 +36,12 @@ jobs: - name: Setup Node uses: actions/setup-node@v2 with: - node-version: ${{matrix.nodeversion}} + node-version: ${{ env.NODEVERSION }} registry-url: https://registry.npmjs.org - name: Setup Python uses: actions/setup-python@v2 with: - python-version: ${{matrix.pythonversion}} + python-version: ${{ env.PYTHONVERSION }} - name: Update pulumi-terraform-bridge run: cd provider && go mod edit -require github.com/pulumi/pulumi-terraform-bridge/v3@v${{ From 05208c7a02b2d9fe84d71630a5206483bdf2c8d9 Mon Sep 17 00:00:00 2001 From: Ian Wahbe Date: Thu, 24 Aug 2023 13:38:09 -0700 Subject: [PATCH 3/8] Apply more changes --- .github/workflows/command-dispatch.yml | 2 + .github/workflows/community-moderation.yml | 2 + .github/workflows/main.yml | 326 ++++--------------- .github/workflows/master.yml | 350 ++++----------------- .github/workflows/nightly-test.yml | 17 +- .github/workflows/prerelease.yml | 273 +++------------- .github/workflows/pull-request.yml | 2 + .github/workflows/release.yml | 330 ++++--------------- .github/workflows/resync-build.yml | 2 + .github/workflows/run-acceptance-tests.yml | 83 +---- .github/workflows/update-bridge.yml | 26 +- 11 files changed, 263 insertions(+), 1150 deletions(-) diff --git a/.github/workflows/command-dispatch.yml b/.github/workflows/command-dispatch.yml index 75101ee80de..64b9f0cc40b 100644 --- a/.github/workflows/command-dispatch.yml +++ b/.github/workflows/command-dispatch.yml @@ -35,6 +35,8 @@ jobs: steps: - name: Checkout Repo uses: actions/checkout@v3 + with: + submodules: true - uses: peter-evans/slash-command-dispatch@v2 with: commands: run-acceptance-tests diff --git a/.github/workflows/community-moderation.yml b/.github/workflows/community-moderation.yml index 647c712d31a..e6bc92c8e1e 100644 --- a/.github/workflows/community-moderation.yml +++ b/.github/workflows/community-moderation.yml @@ -9,6 +9,8 @@ jobs: steps: - name: Checkout Repo uses: actions/checkout@v3 + with: + submodules: true - id: schema_changed name: Check for diff in schema uses: dorny/paths-filter@v2 diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 72b1694ed99..c7d5afd3089 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -36,6 +36,8 @@ jobs: steps: - name: Checkout Repo uses: actions/checkout@v3 + with: + submodules: true - name: Checkout Scripts Repo uses: actions/checkout@v3 with: @@ -46,21 +48,19 @@ jobs: - name: Install Go uses: actions/setup-go@v4 with: - go-version: ${{matrix.goversion}} cache-dependency-path: | sdk/go.sum + go-version: 1.20.1 - name: Install pulumictl uses: jaxxstorm/action-install-gh-release@v1.5.0 with: repo: pulumi/pulumictl - name: Install Pulumi CLI - uses: pulumi/actions@v4 - with: - pulumi-version: v3.77.1 + uses: pulumi/action-install-pulumi-cli@v2 - name: Setup Node uses: actions/setup-node@v2 with: - node-version: ${{matrix.nodeversion}} + node-version: ${{ env.NODEVERSION }} registry-url: https://registry.npmjs.org - name: Setup DotNet uses: actions/setup-dotnet@v1 @@ -69,17 +69,16 @@ jobs: - name: Setup Python uses: actions/setup-python@v2 with: - python-version: ${{matrix.pythonversion}} + python-version: ${{ env.PYTHONVERSION }} - name: Setup Java uses: actions/setup-java@v3 with: cache: gradle distribution: temurin - java-version: ${{matrix.javaversion}} + java-version: ${{ env.JAVAVERSION }} - name: Setup Gradle uses: gradle/gradle-build-action@v2 with: - # Pin to known good version until #2262 is resolved gradle-version: "7.6" - name: Download provider + tfgen binaries uses: actions/download-artifact@v2 @@ -121,20 +120,12 @@ jobs: strategy: fail-fast: true matrix: - goversion: - - 1.20.x - javaversion: - - "11" language: - nodejs - python - dotnet - go - java - nodeversion: - - 16.x - pythonversion: - - "3.9" generate_coverage_data: continue-on-error: true env: @@ -145,6 +136,8 @@ jobs: steps: - name: Checkout Repo uses: actions/checkout@v3 + with: + submodules: true - name: Configure AWS Credentials uses: aws-actions/configure-aws-credentials@v1 with: @@ -161,22 +154,20 @@ jobs: - name: Install Go uses: actions/setup-go@v4 with: - go-version: ${{matrix.goversion}} cache-dependency-path: | sdk/go.sum + go-version: 1.20.1 - name: Install pulumictl uses: jaxxstorm/action-install-gh-release@v1.5.0 with: repo: pulumi/pulumictl - name: Install Pulumi CLI - uses: pulumi/actions@v4 - with: - pulumi-version: v3.77.1 + uses: pulumi/action-install-pulumi-cli@v2 - if: github.event_name == 'pull_request' name: Install Schema Tools uses: jaxxstorm/action-install-gh-release@v1.5.0 with: - repo: mikhailshilkov/schema-tools + repo: pulumi/schema-tools - name: Echo Coverage Output Dir run: 'echo "Coverage output directory: ${{ env.COVERAGE_OUTPUT_DIR }}"' - name: Generate Coverage Data @@ -185,22 +176,19 @@ jobs: run: cat ${{ env.COVERAGE_OUTPUT_DIR }}/shortSummary.txt - name: Upload coverage data to S3 run: >- - summaryName="${PROVIDER}_summary_`date +"%Y-%m-%d_%H-%M-%S"`.json" + summaryName="${PROVIDER}_summary_$(date +"%Y-%m-%d_%H-%M-%S").json" s3FullURI="s3://${{ secrets.S3_COVERAGE_BUCKET_NAME }}/summaries/${summaryName}" - aws s3 cp ${{ env.COVERAGE_OUTPUT_DIR }}/summary.json ${s3FullURI} --acl bucket-owner-full-control - strategy: - fail-fast: true - matrix: - goversion: - - 1.20.x + aws s3 cp "${{ env.COVERAGE_OUTPUT_DIR }}/summary.json" "${s3FullURI}" --acl bucket-owner-full-control prerequisites: name: prerequisites runs-on: ubuntu-latest steps: - name: Checkout Repo uses: actions/checkout@v3 + with: + submodules: true - name: Checkout Scripts Repo uses: actions/checkout@v3 with: @@ -211,41 +199,46 @@ jobs: - name: Install Go uses: actions/setup-go@v4 with: - go-version: ${{matrix.goversion}} cache-dependency-path: | sdk/go.sum + go-version: 1.20.1 - name: Install pulumictl uses: jaxxstorm/action-install-gh-release@v1.5.0 with: repo: pulumi/pulumictl - name: Install Pulumi CLI - uses: pulumi/actions@v4 - with: - pulumi-version: v3.77.1 + uses: pulumi/action-install-pulumi-cli@v2 - if: github.event_name == 'pull_request' name: Install Schema Tools uses: jaxxstorm/action-install-gh-release@v1.5.0 with: - repo: mikhailshilkov/schema-tools + repo: pulumi/schema-tools - name: Build tfgen & provider binaries run: make provider - if: github.event_name == 'pull_request' name: Check Schema is Valid - run: >- - echo 'SCHEMA_CHANGES<> $GITHUB_ENV - - schema-tools compare ${{ env.PROVIDER }} master --local-path=provider/cmd/pulumi-resource-${{ env.PROVIDER }}/schema.json >> $GITHUB_ENV - - echo 'EOF' >> $GITHUB_ENV - - if: github.event_name == 'pull_request' + run: | + EOF=$(dd if=/dev/urandom bs=15 count=1 status=none | base64) + { + echo "SCHEMA_CHANGES<<$EOF"; + schema-tools compare -p ${{ env.PROVIDER }} -o ${{ github.event.repository.default_branch }} -n --local-path=provider/cmd/pulumi-resource-${{ env.PROVIDER }}/schema.json; + echo "$EOF"; + } >> "$GITHUB_ENV" + - if: github.event_name == 'pull_request' && github.actor != 'dependabot[bot]' name: Comment on PR with Details of Schema Check - uses: thollander/actions-comment-pull-request@v1 + uses: thollander/actions-comment-pull-request@v2 with: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - message: | + comment_tag: schemaCheck + message: >+ ### Does the PR have any schema changes? + ${{ env.SCHEMA_CHANGES }} + + + Maintainer note: consult the [runbook](https://github.com/pulumi/platform-providers-team/blob/main/playbooks/tf-provider-updating.md) for dealing with any breaking changes. + - name: Tar provider binaries run: tar -zcf ${{ github.workspace }}/bin/provider.tar.gz -C ${{ github.workspace }}/bin/ pulumi-resource-${{ env.PROVIDER }} @@ -263,15 +256,6 @@ jobs: author_name: Failure in building provider prerequisites fields: repo,commit,author,action status: ${{ job.status }} - strategy: - fail-fast: true - matrix: - goversion: - - 1.20.x - nodeversion: - - 16.x - pythonversion: - - "3.9" publish: name: publish needs: test @@ -279,22 +263,22 @@ jobs: steps: - name: Checkout Repo uses: actions/checkout@v3 + with: + submodules: true - name: Unshallow clone for tags run: git fetch --prune --unshallow --tags - name: Install Go uses: actions/setup-go@v4 with: - go-version: ${{matrix.goversion}} cache-dependency-path: | sdk/go.sum + go-version: 1.20.1 - name: Install pulumictl uses: jaxxstorm/action-install-gh-release@v1.5.0 with: repo: pulumi/pulumictl - name: Install Pulumi CLI - uses: pulumi/actions@v4 - with: - pulumi-version: v3.77.1 + uses: pulumi/action-install-pulumi-cli@v2 - name: Configure AWS Credentials uses: aws-actions/configure-aws-credentials@v1 with: @@ -306,8 +290,7 @@ jobs: role-session-name: ${{ env.PROVIDER }}@githubActions role-to-assume: ${{ secrets.AWS_UPLOAD_ROLE_ARN }} - name: Set PreRelease Version - run: echo "GORELEASER_CURRENT_TAG=v$(pulumictl get version --language generic)" - >> $GITHUB_ENV + run: echo "GORELEASER_CURRENT_TAG=v$(pulumictl get version --language generic)" >> "$GITHUB_ENV" - name: Run GoReleaser uses: goreleaser/goreleaser-action@v2 with: @@ -321,188 +304,24 @@ jobs: author_name: Failure in publishing binaries fields: repo,commit,author,action status: ${{ job.status }} - strategy: - fail-fast: true - matrix: - goversion: - - 1.20.x - nodeversion: - - 16.x - pythonversion: - - "3.9" - publish_java_sdk: - continue-on-error: true - name: publish_java_sdk - needs: publish - runs-on: ubuntu-latest - steps: - - name: Checkout Repo - uses: actions/checkout@v3 - - name: Checkout Scripts Repo - uses: actions/checkout@v3 - with: - path: ci-scripts - repository: pulumi/scripts - - name: Unshallow clone for tags - run: git fetch --prune --unshallow --tags - - name: Install Go - uses: actions/setup-go@v4 - with: - go-version: ${{matrix.goversion}} - cache-dependency-path: | - sdk/go.sum - - name: Install pulumictl - uses: jaxxstorm/action-install-gh-release@v1.5.0 - with: - repo: pulumi/pulumictl - - name: Install Pulumi CLI - uses: pulumi/actions@v4 - with: - pulumi-version: v3.77.1 - - name: Setup Java - uses: actions/setup-java@v3 - with: - cache: gradle - distribution: temurin - java-version: ${{matrix.javaversion}} - - name: Setup Gradle - uses: gradle/gradle-build-action@v2 - with: - # Pin to known good version until #2262 is resolved - gradle-version: "7.6" - - name: Download java SDK - uses: actions/download-artifact@v2 - with: - name: java-sdk.tar.gz - path: ${{ github.workspace}}/sdk/ - - name: Uncompress java SDK - run: tar -zxf ${{github.workspace}}/sdk/java.tar.gz -C - ${{github.workspace}}/sdk/java - - name: Set PACKAGE_VERSION to Env - run: echo "PACKAGE_VERSION=$(pulumictl get version --language generic)" >> - $GITHUB_ENV - - name: Publish Java SDK - uses: gradle/gradle-build-action@9b814496b50909128c6a52622b416c5ffa04db49 - with: - arguments: publishToSonatype closeAndReleaseSonatypeStagingRepository - build-root-directory: ./sdk/java - gradle-version: 7.4.1 - strategy: - fail-fast: true - matrix: - goversion: - - 1.20.x - javaversion: - - "11" publish_sdk: name: publish_sdk needs: publish runs-on: ubuntu-latest steps: - - name: Checkout Repo - uses: actions/checkout@v3 - - name: Checkout Scripts Repo - uses: actions/checkout@v3 - with: - path: ci-scripts - repository: pulumi/scripts - - name: Unshallow clone for tags - run: git fetch --prune --unshallow --tags - - name: Install Go - uses: actions/setup-go@v4 - with: - go-version: ${{matrix.goversion}} - cache-dependency-path: | - sdk/go.sum - - name: Install pulumictl - uses: jaxxstorm/action-install-gh-release@v1.5.0 - with: - repo: pulumi/pulumictl - - name: Install Pulumi CLI - uses: pulumi/actions@v4 - with: - pulumi-version: v3.77.1 - - name: Setup Node - uses: actions/setup-node@v2 - with: - node-version: ${{matrix.nodeversion}} - registry-url: https://registry.npmjs.org - - name: Setup DotNet - uses: actions/setup-dotnet@v1 - with: - dotnet-version: ${{ env.DOTNETVERSION }} - - name: Setup Python - uses: actions/setup-python@v2 - with: - python-version: ${{matrix.pythonversion}} - - name: Download python SDK - uses: actions/download-artifact@v2 - with: - name: python-sdk.tar.gz - path: ${{ github.workspace}}/sdk/ - - name: Uncompress python SDK - run: tar -zxf ${{github.workspace}}/sdk/python.tar.gz -C - ${{github.workspace}}/sdk/python - - name: Download dotnet SDK - uses: actions/download-artifact@v2 - with: - name: dotnet-sdk.tar.gz - path: ${{ github.workspace}}/sdk/ - - name: Uncompress dotnet SDK - run: tar -zxf ${{github.workspace}}/sdk/dotnet.tar.gz -C - ${{github.workspace}}/sdk/dotnet - - name: Download nodejs SDK - uses: actions/download-artifact@v2 - with: - name: nodejs-sdk.tar.gz - path: ${{ github.workspace}}/sdk/ - - name: Uncompress nodejs SDK - run: tar -zxf ${{github.workspace}}/sdk/nodejs.tar.gz -C - ${{github.workspace}}/sdk/nodejs - - run: python -m pip install pip twine + - name: Publish SDKs + uses: pulumi/pulumi-package-publisher@v0.0.9 - env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} - name: Publish SDKs - run: ./ci-scripts/ci/publish-tfgen-package ${{ github.workspace }} - - if: failure() && github.event_name == 'push' - name: Notify Slack - uses: 8398a7/action-slack@v3 - with: - author_name: Failure in publishing SDK - fields: repo,commit,author,action - status: ${{ job.status }} - strategy: - fail-fast: true - matrix: - goversion: - - 1.20.x - nodeversion: - - 16.x - pythonversion: - - "3.9" - - - go_test_shim: - if: github.event_name == 'repository_dispatch' || - github.event.pull_request.head.repo.full_name == github.repository - name: Run test of provider shim - runs-on: ubuntu-latest - timeout-minutes: 60 - steps: - - name: Checkout Repo - uses: actions/checkout@v3 - with: - ref: ${{ env.PR_COMMIT_SHA }} - submodules: true - - uses: actions/setup-go@v4 - with: - go-version-file: 'provider/shim/go.mod' - cache-dependency-path: 'provider/shim/go.sum' - - name: go test - run: | - cd provider/shim - go test -v . - + SLACK_CHANNEL: provider-upgrade-publish-status + SLACK_COLOR: "#FF0000" + SLACK_ICON_EMOJI: ":taco:" + SLACK_MESSAGE: "Publish failed :x:" + SLACK_TITLE: ${{ github.event.repository.name }} upgrade result + SLACK_USERNAME: provider-bot + SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }} + if: failure() + name: Send Publish Failure To Slack + uses: rtCamp/action-slack-notify@v2 test: name: test needs: build_sdk @@ -513,6 +332,8 @@ jobs: steps: - name: Checkout Repo uses: actions/checkout@v3 + with: + submodules: true - name: Checkout Scripts Repo uses: actions/checkout@v3 with: @@ -523,21 +344,19 @@ jobs: - name: Install Go uses: actions/setup-go@v4 with: - go-version: ${{matrix.goversion}} cache-dependency-path: | sdk/go.sum + go-version: 1.20.1 - name: Install pulumictl uses: jaxxstorm/action-install-gh-release@v1.5.0 with: repo: pulumi/pulumictl - name: Install Pulumi CLI - uses: pulumi/actions@v4 - with: - pulumi-version: v3.77.1 + uses: pulumi/action-install-pulumi-cli@v2 - name: Setup Node uses: actions/setup-node@v2 with: - node-version: ${{matrix.nodeversion}} + node-version: ${{ env.NODEVERSION }} registry-url: https://registry.npmjs.org - name: Setup DotNet uses: actions/setup-dotnet@v1 @@ -546,17 +365,16 @@ jobs: - name: Setup Python uses: actions/setup-python@v2 with: - python-version: ${{matrix.pythonversion}} + python-version: ${{ env.PYTHONVERSION }} - name: Setup Java uses: actions/setup-java@v3 with: cache: gradle distribution: temurin - java-version: ${{matrix.javaversion}} + java-version: ${{ env.JAVAVERSION }} - name: Setup Gradle uses: gradle/gradle-build-action@v2 with: - # Pin to known good version until #2262 is resolved gradle-version: "7.6" - name: Download provider + tfgen binaries uses: actions/download-artifact@v2 @@ -579,11 +397,18 @@ jobs: run: tar -zxf ${{ github.workspace }}/sdk/${{ matrix.language }}.tar.gz -C ${{ github.workspace }}/sdk/${{ matrix.language }} - name: Update path - run: echo "${{ github.workspace }}/bin" >> $GITHUB_PATH + run: echo "${{ github.workspace }}/bin" >> "$GITHUB_PATH" - name: Install Python deps run: |- pip3 install virtualenv==20.0.23 pip3 install pipenv + - name: Install dependencies + run: make install_${{ matrix.language}}_sdk + - name: Install gotestfmt + uses: GoTestTools/gotestfmt-action@v2 + with: + token: ${{ secrets.GITHUB_TOKEN }} + version: v2.4.0 - name: Configure AWS Credentials uses: aws-actions/configure-aws-credentials@v1 with: @@ -593,13 +418,6 @@ jobs: role-duration-seconds: 3600 role-session-name: ${{ env.PROVIDER }}@githubActions role-to-assume: ${{ secrets.AWS_CI_ROLE_ARN }} - - name: Install dependencies - run: make install_${{ matrix.language}}_sdk - - name: Install gotestfmt - uses: GoTestTools/gotestfmt-action@v2 - with: - token: ${{ secrets.GITHUB_TOKEN }} - version: v2.4.0 - name: Run tests run: cd examples && go test -v -json -count=1 -cover -timeout 2h -tags=${{ matrix.language }} -parallel 4 . 2>&1 | tee /tmp/gotest.log | gotestfmt @@ -611,22 +429,14 @@ jobs: fields: repo,commit,author,action status: ${{ job.status }} strategy: - fail-fast: true + fail-fast: false matrix: - goversion: - - 1.20.x - javaversion: - - "11" language: - nodejs - python - dotnet - go - java - nodeversion: - - 16.x - pythonversion: - - "3.9" name: main on: push: diff --git a/.github/workflows/master.yml b/.github/workflows/master.yml index cad6520e70f..f8273070f90 100644 --- a/.github/workflows/master.yml +++ b/.github/workflows/master.yml @@ -48,21 +48,19 @@ jobs: - name: Install Go uses: actions/setup-go@v4 with: - go-version: ${{matrix.goversion}} cache-dependency-path: | sdk/go.sum + go-version: 1.20.1 - name: Install pulumictl uses: jaxxstorm/action-install-gh-release@v1.5.0 with: repo: pulumi/pulumictl - name: Install Pulumi CLI - uses: pulumi/actions@v4 - with: - pulumi-version: v3.77.1 + uses: pulumi/action-install-pulumi-cli@v2 - name: Setup Node uses: actions/setup-node@v2 with: - node-version: ${{matrix.nodeversion}} + node-version: ${{ env.NODEVERSION }} registry-url: https://registry.npmjs.org - name: Setup DotNet uses: actions/setup-dotnet@v1 @@ -71,17 +69,16 @@ jobs: - name: Setup Python uses: actions/setup-python@v2 with: - python-version: ${{matrix.pythonversion}} + python-version: ${{ env.PYTHONVERSION }} - name: Setup Java uses: actions/setup-java@v3 with: cache: gradle distribution: temurin - java-version: ${{matrix.javaversion}} + java-version: ${{ env.JAVAVERSION }} - name: Setup Gradle uses: gradle/gradle-build-action@v2 with: - # Pin to known good version until #2262 is resolved gradle-version: "7.6" - name: Download provider + tfgen binaries uses: actions/download-artifact@v2 @@ -97,10 +94,10 @@ jobs: - name: Install plugins run: make install_plugins - name: Update path - run: echo "${{ github.workspace }}/bin" >> $GITHUB_PATH + run: echo "${{ github.workspace }}/bin" >> "$GITHUB_PATH" - name: Set PACKAGE_VERSION to Env run: echo "PACKAGE_VERSION=$(pulumictl get version --language generic)" >> - $GITHUB_ENV + "$GITHUB_ENV" - name: Build SDK run: make build_${{ matrix.language }} - name: Check worktree clean @@ -123,20 +120,12 @@ jobs: strategy: fail-fast: true matrix: - goversion: - - 1.20.x - javaversion: - - "11" language: - nodejs - python - dotnet - go - java - nodeversion: - - 16.x - pythonversion: - - "3.9" generate_coverage_data: continue-on-error: true env: @@ -165,33 +154,20 @@ jobs: - name: Install Go uses: actions/setup-go@v4 with: - go-version: ${{matrix.goversion}} cache-dependency-path: | sdk/go.sum + go-version: 1.20.1 - name: Install pulumictl uses: jaxxstorm/action-install-gh-release@v1.5.0 with: repo: pulumi/pulumictl - name: Install Pulumi CLI - uses: pulumi/actions@v4 - with: - pulumi-version: v3.77.1 + uses: pulumi/action-install-pulumi-cli@v2 - if: github.event_name == 'pull_request' name: Install Schema Tools uses: jaxxstorm/action-install-gh-release@v1.5.0 with: - repo: mikhailshilkov/schema-tools - - name: Clear GitHub Actions Ubuntu runner disk space - uses: jlumbroso/free-disk-space@main - with: - tool-cache: false - dotnet: false - android: true - haskell: true - swap-storage: true - # TODO: enable once transient error with azure is resolved - # E: Failed to fetch http://azure.archive.ubuntu.com/ubuntu/pool/universe/d/dotnet7/aspnetcore-targeting-pack-7.0_7.0.105-0ubuntu1%7e22.04.1_amd64.deb 404 Not Found [IP: 40.81.13.82 80] - large-packages: false + repo: pulumi/schema-tools - name: Echo Coverage Output Dir run: 'echo "Coverage output directory: ${{ env.COVERAGE_OUTPUT_DIR }}"' - name: Generate Coverage Data @@ -200,16 +176,11 @@ jobs: run: cat ${{ env.COVERAGE_OUTPUT_DIR }}/shortSummary.txt - name: Upload coverage data to S3 run: >- - summaryName="${PROVIDER}_summary_`date +"%Y-%m-%d_%H-%M-%S"`.json" + summaryName="${PROVIDER}_summary_$(date +"%Y-%m-%d_%H-%M-%S").json" s3FullURI="s3://${{ secrets.S3_COVERAGE_BUCKET_NAME }}/summaries/${summaryName}" - aws s3 cp ${{ env.COVERAGE_OUTPUT_DIR }}/summary.json ${s3FullURI} --acl bucket-owner-full-control - strategy: - fail-fast: true - matrix: - goversion: - - 1.20.x + aws s3 cp "${{ env.COVERAGE_OUTPUT_DIR }}/summary.json" "${s3FullURI}" --acl bucket-owner-full-control prerequisites: name: prerequisites runs-on: ubuntu-latest @@ -228,57 +199,46 @@ jobs: - name: Install Go uses: actions/setup-go@v4 with: - go-version: ${{matrix.goversion}} cache-dependency-path: | sdk/go.sum - - name: Setup Node - uses: actions/setup-node@v2 - with: - node-version: ${{matrix.nodeversion}} - registry-url: https://registry.npmjs.org + go-version: 1.20.1 - name: Install pulumictl uses: jaxxstorm/action-install-gh-release@v1.5.0 with: repo: pulumi/pulumictl - name: Install Pulumi CLI - uses: pulumi/actions@v4 - with: - pulumi-version: v3.77.1 + uses: pulumi/action-install-pulumi-cli@v2 - if: github.event_name == 'pull_request' name: Install Schema Tools uses: jaxxstorm/action-install-gh-release@v1.5.0 with: - repo: mikhailshilkov/schema-tools - - name: Clear GitHub Actions Ubuntu runner disk space - uses: jlumbroso/free-disk-space@main - with: - tool-cache: false - dotnet: false - android: true - haskell: true - swap-storage: true - # TODO: enable once transient error with azure is resolved - # E: Failed to fetch http://azure.archive.ubuntu.com/ubuntu/pool/universe/d/dotnet7/aspnetcore-targeting-pack-7.0_7.0.105-0ubuntu1%7e22.04.1_amd64.deb 404 Not Found [IP: 40.81.13.82 80] - large-packages: false + repo: pulumi/schema-tools - name: Build tfgen & provider binaries run: make provider - if: github.event_name == 'pull_request' name: Check Schema is Valid - run: >- - echo 'SCHEMA_CHANGES<> $GITHUB_ENV - - schema-tools compare ${{ env.PROVIDER }} master --local-path=provider/cmd/pulumi-resource-${{ env.PROVIDER }}/schema.json >> $GITHUB_ENV - - echo 'EOF' >> $GITHUB_ENV - - if: github.event_name == 'pull_request' + run: | + EOF=$(dd if=/dev/urandom bs=15 count=1 status=none | base64) + { + echo "SCHEMA_CHANGES<<$EOF"; + schema-tools compare -p ${{ env.PROVIDER }} -o ${{ github.event.repository.default_branch }} -n --local-path=provider/cmd/pulumi-resource-${{ env.PROVIDER }}/schema.json; + echo "$EOF"; + } >> "$GITHUB_ENV" + - if: github.event_name == 'pull_request' && github.actor != 'dependabot[bot]' name: Comment on PR with Details of Schema Check - uses: thollander/actions-comment-pull-request@v1 + uses: thollander/actions-comment-pull-request@v2 with: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - message: | + comment_tag: schemaCheck + message: >+ ### Does the PR have any schema changes? + ${{ env.SCHEMA_CHANGES }} + + + Maintainer note: consult the [runbook](https://github.com/pulumi/platform-providers-team/blob/main/playbooks/tf-provider-updating.md) for dealing with any breaking changes. + - name: Tar provider binaries run: tar -zcf ${{ github.workspace }}/bin/provider.tar.gz -C ${{ github.workspace }}/bin/ pulumi-resource-${{ env.PROVIDER }} @@ -296,15 +256,6 @@ jobs: author_name: Failure in building provider prerequisites fields: repo,commit,author,action status: ${{ job.status }} - strategy: - fail-fast: true - matrix: - goversion: - - 1.20.x - nodeversion: - - 16.x - pythonversion: - - "3.9" publish: name: publish needs: test @@ -319,17 +270,15 @@ jobs: - name: Install Go uses: actions/setup-go@v4 with: - go-version: ${{matrix.goversion}} cache-dependency-path: | sdk/go.sum + go-version: 1.20.1 - name: Install pulumictl uses: jaxxstorm/action-install-gh-release@v1.5.0 with: repo: pulumi/pulumictl - name: Install Pulumi CLI - uses: pulumi/actions@v4 - with: - pulumi-version: v3.77.1 + uses: pulumi/action-install-pulumi-cli@v2 - name: Configure AWS Credentials uses: aws-actions/configure-aws-credentials@v1 with: @@ -341,7 +290,7 @@ jobs: role-session-name: ${{ env.PROVIDER }}@githubActions role-to-assume: ${{ secrets.AWS_UPLOAD_ROLE_ARN }} - name: Set PreRelease Version - run: echo "GORELEASER_CURRENT_TAG=v$(pulumictl get version --language generic)" >> $GITHUB_ENV + run: echo "GORELEASER_CURRENT_TAG=v$(pulumictl get version --language generic)" >> "$GITHUB_ENV" - name: Run GoReleaser uses: goreleaser/goreleaser-action@v2 with: @@ -355,191 +304,24 @@ jobs: author_name: Failure in publishing binaries fields: repo,commit,author,action status: ${{ job.status }} - strategy: - fail-fast: true - matrix: - goversion: - - 1.20.x - nodeversion: - - 16.x - pythonversion: - - "3.9" - publish_java_sdk: - continue-on-error: true - name: publish_java_sdk - needs: publish - runs-on: ubuntu-latest - steps: - - name: Checkout Repo - uses: actions/checkout@v3 - with: - submodules: true - - name: Checkout Scripts Repo - uses: actions/checkout@v3 - with: - path: ci-scripts - repository: pulumi/scripts - - name: Unshallow clone for tags - run: git fetch --prune --unshallow --tags - - name: Install Go - uses: actions/setup-go@v4 - with: - go-version: ${{matrix.goversion}} - cache-dependency-path: | - sdk/go.sum - - name: Install pulumictl - uses: jaxxstorm/action-install-gh-release@v1.5.0 - with: - repo: pulumi/pulumictl - - name: Install Pulumi CLI - uses: pulumi/actions@v4 - with: - pulumi-version: v3.77.1 - - name: Setup Java - uses: actions/setup-java@v3 - with: - cache: gradle - distribution: temurin - java-version: ${{matrix.javaversion}} - - name: Setup Gradle - uses: gradle/gradle-build-action@v2 - with: - # Pin to known good version until #2262 is resolved - gradle-version: "7.6" - - name: Download java SDK - uses: actions/download-artifact@v2 - with: - name: java-sdk.tar.gz - path: ${{ github.workspace}}/sdk/ - - name: Uncompress java SDK - run: tar -zxf ${{github.workspace}}/sdk/java.tar.gz -C - ${{github.workspace}}/sdk/java - - name: Set PACKAGE_VERSION to Env - run: echo "PACKAGE_VERSION=$(pulumictl get version --language generic)" >> - $GITHUB_ENV - - name: Publish Java SDK - uses: gradle/gradle-build-action@9b814496b50909128c6a52622b416c5ffa04db49 - with: - arguments: publishToSonatype closeAndReleaseSonatypeStagingRepository - build-root-directory: ./sdk/java - gradle-version: 7.4.1 - strategy: - fail-fast: true - matrix: - goversion: - - 1.20.x - javaversion: - - "11" publish_sdk: name: publish_sdk needs: publish runs-on: ubuntu-latest steps: - - name: Checkout Repo - uses: actions/checkout@v3 - with: - submodules: true - - name: Checkout Scripts Repo - uses: actions/checkout@v3 - with: - path: ci-scripts - repository: pulumi/scripts - - name: Unshallow clone for tags - run: git fetch --prune --unshallow --tags - - name: Install Go - uses: actions/setup-go@v4 - with: - go-version: ${{matrix.goversion}} - cache-dependency-path: | - sdk/go.sum - - name: Install pulumictl - uses: jaxxstorm/action-install-gh-release@v1.5.0 - with: - repo: pulumi/pulumictl - - name: Install Pulumi CLI - uses: pulumi/actions@v4 - with: - pulumi-version: v3.77.1 - - name: Setup Node - uses: actions/setup-node@v2 - with: - node-version: ${{matrix.nodeversion}} - registry-url: https://registry.npmjs.org - - name: Setup DotNet - uses: actions/setup-dotnet@v1 - with: - dotnet-version: ${{ env.DOTNETVERSION }} - - name: Setup Python - uses: actions/setup-python@v2 - with: - python-version: ${{matrix.pythonversion}} - - name: Download python SDK - uses: actions/download-artifact@v2 - with: - name: python-sdk.tar.gz - path: ${{ github.workspace}}/sdk/ - - name: Uncompress python SDK - run: tar -zxf ${{github.workspace}}/sdk/python.tar.gz -C - ${{github.workspace}}/sdk/python - - name: Download dotnet SDK - uses: actions/download-artifact@v2 - with: - name: dotnet-sdk.tar.gz - path: ${{ github.workspace}}/sdk/ - - name: Uncompress dotnet SDK - run: tar -zxf ${{github.workspace}}/sdk/dotnet.tar.gz -C - ${{github.workspace}}/sdk/dotnet - - name: Download nodejs SDK - uses: actions/download-artifact@v2 - with: - name: nodejs-sdk.tar.gz - path: ${{ github.workspace}}/sdk/ - - name: Uncompress nodejs SDK - run: tar -zxf ${{github.workspace}}/sdk/nodejs.tar.gz -C - ${{github.workspace}}/sdk/nodejs - - run: python -m pip install pip twine + - name: Publish SDKs + uses: pulumi/pulumi-package-publisher@v0.0.9 - env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} - name: Publish SDKs - run: ./ci-scripts/ci/publish-tfgen-package ${{ github.workspace }} - - if: failure() && github.event_name == 'push' - name: Notify Slack - uses: 8398a7/action-slack@v3 - with: - author_name: Failure in publishing SDK - fields: repo,commit,author,action - status: ${{ job.status }} - strategy: - fail-fast: true - matrix: - goversion: - - 1.20.x - nodeversion: - - 16.x - pythonversion: - - "3.9" - - go_test_shim: - if: github.event_name == 'repository_dispatch' || - github.event.pull_request.head.repo.full_name == github.repository - name: Run test of provider shim - runs-on: ubuntu-latest - timeout-minutes: 60 - steps: - - name: Checkout Repo - uses: actions/checkout@v3 - with: - ref: ${{ env.PR_COMMIT_SHA }} - submodules: true - - uses: actions/setup-go@v4 - with: - go-version-file: 'provider/shim/go.mod' - cache-dependency-path: 'provider/shim/go.sum' - - name: go test - run: | - cd provider/shim - go test -v . - + SLACK_CHANNEL: provider-upgrade-publish-status + SLACK_COLOR: "#FF0000" + SLACK_ICON_EMOJI: ":taco:" + SLACK_MESSAGE: "Publish failed :x:" + SLACK_TITLE: ${{ github.event.repository.name }} upgrade result + SLACK_USERNAME: provider-bot + SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }} + if: failure() + name: Send Publish Failure To Slack + uses: rtCamp/action-slack-notify@v2 test: name: test needs: build_sdk @@ -562,21 +344,19 @@ jobs: - name: Install Go uses: actions/setup-go@v4 with: - go-version: ${{matrix.goversion}} cache-dependency-path: | sdk/go.sum + go-version: 1.20.1 - name: Install pulumictl uses: jaxxstorm/action-install-gh-release@v1.5.0 with: repo: pulumi/pulumictl - name: Install Pulumi CLI - uses: pulumi/actions@v4 - with: - pulumi-version: v3.77.1 + uses: pulumi/action-install-pulumi-cli@v2 - name: Setup Node uses: actions/setup-node@v2 with: - node-version: ${{matrix.nodeversion}} + node-version: ${{ env.NODEVERSION }} registry-url: https://registry.npmjs.org - name: Setup DotNet uses: actions/setup-dotnet@v1 @@ -585,17 +365,16 @@ jobs: - name: Setup Python uses: actions/setup-python@v2 with: - python-version: ${{matrix.pythonversion}} + python-version: ${{ env.PYTHONVERSION }} - name: Setup Java uses: actions/setup-java@v3 with: cache: gradle distribution: temurin - java-version: ${{matrix.javaversion}} + java-version: ${{ env.JAVAVERSION }} - name: Setup Gradle uses: gradle/gradle-build-action@v2 with: - # Pin to known good version until #2262 is resolved gradle-version: "7.6" - name: Download provider + tfgen binaries uses: actions/download-artifact@v2 @@ -618,11 +397,18 @@ jobs: run: tar -zxf ${{ github.workspace }}/sdk/${{ matrix.language }}.tar.gz -C ${{ github.workspace }}/sdk/${{ matrix.language }} - name: Update path - run: echo "${{ github.workspace }}/bin" >> $GITHUB_PATH + run: echo "${{ github.workspace }}/bin" >> "$GITHUB_PATH" - name: Install Python deps run: |- pip3 install virtualenv==20.0.23 pip3 install pipenv + - name: Install dependencies + run: make install_${{ matrix.language}}_sdk + - name: Install gotestfmt + uses: GoTestTools/gotestfmt-action@v2 + with: + token: ${{ secrets.GITHUB_TOKEN }} + version: v2.4.0 - name: Configure AWS Credentials uses: aws-actions/configure-aws-credentials@v1 with: @@ -632,13 +418,6 @@ jobs: role-duration-seconds: 3600 role-session-name: ${{ env.PROVIDER }}@githubActions role-to-assume: ${{ secrets.AWS_CI_ROLE_ARN }} - - name: Install dependencies - run: make install_${{ matrix.language}}_sdk - - name: Install gotestfmt - uses: GoTestTools/gotestfmt-action@v2 - with: - token: ${{ secrets.GITHUB_TOKEN }} - version: v2.4.0 - name: Run tests run: cd examples && go test -v -json -count=1 -cover -timeout 2h -tags=${{ matrix.language }} -parallel 4 . 2>&1 | tee /tmp/gotest.log | gotestfmt @@ -650,22 +429,14 @@ jobs: fields: repo,commit,author,action status: ${{ job.status }} strategy: - fail-fast: true + fail-fast: false matrix: - goversion: - - 1.20.x - javaversion: - - "11" language: - nodejs - python - dotnet - go - java - nodeversion: - - 16.x - pythonversion: - - "3.9" name: master on: push: @@ -677,4 +448,3 @@ on: - v* - sdk/* - "**" - workflow_dispatch: {} diff --git a/.github/workflows/nightly-test.yml b/.github/workflows/nightly-test.yml index b38e139e20a..f6074b075d1 100644 --- a/.github/workflows/nightly-test.yml +++ b/.github/workflows/nightly-test.yml @@ -71,17 +71,16 @@ jobs: - name: Setup Python uses: actions/setup-python@v2 with: - python-version: ${{matrix.pythonversion}} + python-version: ${{ env.PYTHONVERSION }} - name: Setup Java uses: actions/setup-java@v3 with: cache: gradle distribution: temurin - java-version: ${{matrix.javaversion}} + java-version: ${{ env.JAVAVERSION }} - name: Setup Gradle uses: gradle/gradle-build-action@v2 with: - # Pin to known good version until #2262 is resolved gradle-version: "7.6" - name: Download provider + tfgen binaries uses: actions/download-artifact@v2 @@ -97,10 +96,10 @@ jobs: - name: Install plugins run: make install_plugins - name: Update path - run: echo "${{ github.workspace }}/bin" >> $GITHUB_PATH + run: echo "${{ github.workspace }}/bin" >> "$GITHUB_PATH" - name: Set PACKAGE_VERSION to Env run: echo "PACKAGE_VERSION=$(pulumictl get version --language generic)" >> - $GITHUB_ENV + "$GITHUB_ENV" - name: Build SDK run: make build_${{ matrix.language }} - name: Check worktree clean @@ -123,20 +122,12 @@ jobs: strategy: fail-fast: true matrix: - goversion: - - 1.20.x - javaversion: - - "11" language: - nodejs - python - dotnet - go - java - nodeversion: - - 16.x - pythonversion: - - "3.9" prerequisites: name: prerequisites runs-on: ubuntu-latest diff --git a/.github/workflows/prerelease.yml b/.github/workflows/prerelease.yml index fcf957a250e..8cde242334e 100644 --- a/.github/workflows/prerelease.yml +++ b/.github/workflows/prerelease.yml @@ -49,21 +49,19 @@ jobs: - name: Install Go uses: actions/setup-go@v4 with: - go-version: ${{matrix.goversion}} cache-dependency-path: | sdk/go.sum + go-version: 1.20.1 - name: Install pulumictl uses: jaxxstorm/action-install-gh-release@v1.5.0 with: repo: pulumi/pulumictl - name: Install Pulumi CLI - uses: pulumi/actions@v4 - with: - pulumi-version: v3.77.1 + uses: pulumi/action-install-pulumi-cli@v2 - name: Setup Node uses: actions/setup-node@v2 with: - node-version: ${{matrix.nodeversion}} + node-version: ${{ env.NODEVERSION }} registry-url: https://registry.npmjs.org - name: Setup DotNet uses: actions/setup-dotnet@v1 @@ -72,17 +70,16 @@ jobs: - name: Setup Python uses: actions/setup-python@v2 with: - python-version: ${{matrix.pythonversion}} + python-version: ${{ env.PYTHONVERSION }} - name: Setup Java uses: actions/setup-java@v3 with: cache: gradle distribution: temurin - java-version: ${{matrix.javaversion}} + java-version: ${{ env.JAVAVERSION }} - name: Setup Gradle uses: gradle/gradle-build-action@v2 with: - # Pin to known good version until #2262 is resolved gradle-version: "7.6" - name: Download provider + tfgen binaries uses: actions/download-artifact@v2 @@ -98,10 +95,10 @@ jobs: - name: Install plugins run: make install_plugins - name: Update path - run: echo "${{ github.workspace }}/bin" >> $GITHUB_PATH + run: echo "${{ github.workspace }}/bin" >> "$GITHUB_PATH" - name: Set PACKAGE_VERSION to Env run: echo "PACKAGE_VERSION=$(pulumictl get version --language generic)" >> - $GITHUB_ENV + "$GITHUB_ENV" - name: Build SDK run: make build_${{ matrix.language }} - name: Check worktree clean @@ -123,20 +120,12 @@ jobs: strategy: fail-fast: true matrix: - goversion: - - 1.20.x - javaversion: - - "11" language: - nodejs - python - dotnet - go - java - nodeversion: - - 16.x - pythonversion: - - "3.9" prerequisites: name: prerequisites runs-on: ubuntu-latest @@ -222,15 +211,6 @@ jobs: author_name: Failure in building provider prerequisites fields: repo,commit,author,action status: ${{ job.status }} - strategy: - fail-fast: true - matrix: - goversion: - - 1.20.x - nodeversion: - - 16.x - pythonversion: - - "3.9" publish: name: publish needs: test @@ -245,17 +225,15 @@ jobs: - name: Install Go uses: actions/setup-go@v4 with: - go-version: ${{matrix.goversion}} cache-dependency-path: | sdk/go.sum + go-version: 1.20.1 - name: Install pulumictl uses: jaxxstorm/action-install-gh-release@v1.5.0 with: repo: pulumi/pulumictl - name: Install Pulumi CLI - uses: pulumi/actions@v4 - with: - pulumi-version: v3.77.1 + uses: pulumi/action-install-pulumi-cli@v2 - name: Configure AWS Credentials uses: aws-actions/configure-aws-credentials@v1 with: @@ -267,8 +245,7 @@ jobs: role-session-name: ${{ env.PROVIDER }}@githubActions role-to-assume: ${{ secrets.AWS_UPLOAD_ROLE_ARN }} - name: Set PreRelease Version - run: echo "GORELEASER_CURRENT_TAG=v$(pulumictl get version --language generic)" - >> $GITHUB_ENV + run: echo "GORELEASER_CURRENT_TAG=v$(pulumictl get version --language generic)" >> "$GITHUB_ENV" - name: Run GoReleaser uses: goreleaser/goreleaser-action@v2 with: @@ -282,191 +259,24 @@ jobs: author_name: Failure in publishing binaries fields: repo,commit,author,action status: ${{ job.status }} - strategy: - fail-fast: true - matrix: - goversion: - - 1.20.x - nodeversion: - - 16.x - pythonversion: - - "3.9" - publish_java_sdk: - continue-on-error: true - name: publish_java_sdk - needs: publish - runs-on: pulumi-ubuntu-8core - steps: - - name: Checkout Repo - uses: actions/checkout@v3 - with: - submodules: true - - name: Checkout Scripts Repo - uses: actions/checkout@v3 - with: - path: ci-scripts - repository: pulumi/scripts - - name: Unshallow clone for tags - run: git fetch --prune --unshallow --tags - - name: Install Go - uses: actions/setup-go@v4 - with: - go-version: ${{matrix.goversion}} - cache-dependency-path: | - sdk/go.sum - - name: Install pulumictl - uses: jaxxstorm/action-install-gh-release@v1.5.0 - with: - repo: pulumi/pulumictl - - name: Install Pulumi CLI - uses: pulumi/actions@v4 - with: - pulumi-version: v3.77.1 - - name: Setup Java - uses: actions/setup-java@v3 - with: - cache: gradle - distribution: temurin - java-version: ${{matrix.javaversion}} - - name: Setup Gradle - uses: gradle/gradle-build-action@v2 - with: - # Pin to known good version until #2262 is resolved - gradle-version: "7.6" - - name: Download java SDK - uses: actions/download-artifact@v2 - with: - name: java-sdk.tar.gz - path: ${{ github.workspace}}/sdk/ - - name: Uncompress java SDK - run: tar -zxf ${{github.workspace}}/sdk/java.tar.gz -C - ${{github.workspace}}/sdk/java - - name: Set PACKAGE_VERSION to Env - run: echo "PACKAGE_VERSION=$(pulumictl get version --language generic)" >> - $GITHUB_ENV - - name: Publish Java SDK - uses: gradle/gradle-build-action@9b814496b50909128c6a52622b416c5ffa04db49 - with: - arguments: publishToSonatype closeAndReleaseSonatypeStagingRepository - build-root-directory: ./sdk/java - gradle-version: 7.4.1 - strategy: - fail-fast: true - matrix: - goversion: - - 1.20.x - javaversion: - - "11" publish_sdk: name: publish_sdk needs: publish runs-on: ubuntu-latest steps: - - name: Checkout Repo - uses: actions/checkout@v3 - with: - submodules: true - - name: Checkout Scripts Repo - uses: actions/checkout@v3 - with: - path: ci-scripts - repository: pulumi/scripts - - name: Unshallow clone for tags - run: git fetch --prune --unshallow --tags - - name: Install Go - uses: actions/setup-go@v4 - with: - go-version: ${{matrix.goversion}} - cache-dependency-path: | - sdk/go.sum - - name: Install pulumictl - uses: jaxxstorm/action-install-gh-release@v1.5.0 - with: - repo: pulumi/pulumictl - - name: Install Pulumi CLI - uses: pulumi/actions@v4 - with: - pulumi-version: v3.77.1 - - name: Setup Node - uses: actions/setup-node@v2 - with: - node-version: ${{matrix.nodeversion}} - registry-url: https://registry.npmjs.org - - name: Setup DotNet - uses: actions/setup-dotnet@v1 - with: - dotnet-version: ${{ env.DOTNETVERSION }} - - name: Setup Python - uses: actions/setup-python@v2 - with: - python-version: ${{matrix.pythonversion}} - - name: Download python SDK - uses: actions/download-artifact@v2 - with: - name: python-sdk.tar.gz - path: ${{ github.workspace}}/sdk/ - - name: Uncompress python SDK - run: tar -zxf ${{github.workspace}}/sdk/python.tar.gz -C - ${{github.workspace}}/sdk/python - - name: Download dotnet SDK - uses: actions/download-artifact@v2 - with: - name: dotnet-sdk.tar.gz - path: ${{ github.workspace}}/sdk/ - - name: Uncompress dotnet SDK - run: tar -zxf ${{github.workspace}}/sdk/dotnet.tar.gz -C - ${{github.workspace}}/sdk/dotnet - - name: Download nodejs SDK - uses: actions/download-artifact@v2 - with: - name: nodejs-sdk.tar.gz - path: ${{ github.workspace}}/sdk/ - - name: Uncompress nodejs SDK - run: tar -zxf ${{github.workspace}}/sdk/nodejs.tar.gz -C - ${{github.workspace}}/sdk/nodejs - - run: python -m pip install pip twine + - name: Publish SDKs + uses: pulumi/pulumi-package-publisher@v0.0.9 - env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} - name: Publish SDKs - run: ./ci-scripts/ci/publish-tfgen-package ${{ github.workspace }} - - if: failure() && github.event_name == 'push' - name: Notify Slack - uses: 8398a7/action-slack@v3 - with: - author_name: Failure in publishing SDK - fields: repo,commit,author,action - status: ${{ job.status }} - strategy: - fail-fast: true - matrix: - goversion: - - 1.20.x - nodeversion: - - 16.x - pythonversion: - - "3.9" - - go_test_shim: - if: github.event_name == 'repository_dispatch' || - github.event.pull_request.head.repo.full_name == github.repository - name: Run test of provider shim - runs-on: ubuntu-latest - timeout-minutes: 60 - steps: - - name: Checkout Repo - uses: actions/checkout@v3 - with: - ref: ${{ env.PR_COMMIT_SHA }} - submodules: true - - uses: actions/setup-go@v4 - with: - go-version-file: 'provider/shim/go.mod' - cache-dependency-path: 'provider/shim/go.sum' - - name: go test - run: | - cd provider/shim - go test -v . - + SLACK_CHANNEL: provider-upgrade-publish-status + SLACK_COLOR: "#FF0000" + SLACK_ICON_EMOJI: ":taco:" + SLACK_MESSAGE: "Publish failed :x:" + SLACK_TITLE: ${{ github.event.repository.name }} upgrade result + SLACK_USERNAME: provider-bot + SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }} + if: failure() + name: Send Publish Failure To Slack + uses: rtCamp/action-slack-notify@v2 test: name: test needs: build_sdk @@ -489,21 +299,19 @@ jobs: - name: Install Go uses: actions/setup-go@v4 with: - go-version: ${{matrix.goversion}} cache-dependency-path: | sdk/go.sum + go-version: 1.20.1 - name: Install pulumictl uses: jaxxstorm/action-install-gh-release@v1.5.0 with: repo: pulumi/pulumictl - name: Install Pulumi CLI - uses: pulumi/actions@v4 - with: - pulumi-version: v3.77.1 + uses: pulumi/action-install-pulumi-cli@v2 - name: Setup Node uses: actions/setup-node@v2 with: - node-version: ${{matrix.nodeversion}} + node-version: ${{ env.NODEVERSION }} registry-url: https://registry.npmjs.org - name: Setup DotNet uses: actions/setup-dotnet@v1 @@ -512,17 +320,16 @@ jobs: - name: Setup Python uses: actions/setup-python@v2 with: - python-version: ${{matrix.pythonversion}} + python-version: ${{ env.PYTHONVERSION }} - name: Setup Java uses: actions/setup-java@v3 with: cache: gradle distribution: temurin - java-version: ${{matrix.javaversion}} + java-version: ${{ env.JAVAVERSION }} - name: Setup Gradle uses: gradle/gradle-build-action@v2 with: - # Pin to known good version until #2262 is resolved gradle-version: "7.6" - name: Download provider + tfgen binaries uses: actions/download-artifact@v2 @@ -545,11 +352,18 @@ jobs: run: tar -zxf ${{ github.workspace }}/sdk/${{ matrix.language }}.tar.gz -C ${{ github.workspace }}/sdk/${{ matrix.language }} - name: Update path - run: echo "${{ github.workspace }}/bin" >> $GITHUB_PATH + run: echo "${{ github.workspace }}/bin" >> "$GITHUB_PATH" - name: Install Python deps run: |- pip3 install virtualenv==20.0.23 pip3 install pipenv + - name: Install dependencies + run: make install_${{ matrix.language}}_sdk + - name: Install gotestfmt + uses: GoTestTools/gotestfmt-action@v2 + with: + token: ${{ secrets.GITHUB_TOKEN }} + version: v2.4.0 - name: Configure AWS Credentials uses: aws-actions/configure-aws-credentials@v1 with: @@ -559,13 +373,6 @@ jobs: role-duration-seconds: 3600 role-session-name: ${{ env.PROVIDER }}@githubActions role-to-assume: ${{ secrets.AWS_CI_ROLE_ARN }} - - name: Install dependencies - run: make install_${{ matrix.language}}_sdk - - name: Install gotestfmt - uses: GoTestTools/gotestfmt-action@v2 - with: - token: ${{ secrets.GITHUB_TOKEN }} - version: v2.4.0 - name: Run tests run: cd examples && go test -v -json -count=1 -cover -timeout 2h -tags=${{ matrix.language }} -parallel 4 . 2>&1 | tee /tmp/gotest.log | gotestfmt @@ -577,22 +384,14 @@ jobs: fields: repo,commit,author,action status: ${{ job.status }} strategy: - fail-fast: true + fail-fast: false matrix: - goversion: - - 1.20.x - javaversion: - - "11" language: - nodejs - python - dotnet - go - java - nodeversion: - - 16.x - pythonversion: - - "3.9" name: prerelease on: push: diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 4bb6c81e76f..ba074440893 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -36,6 +36,8 @@ jobs: steps: - name: Checkout Repo uses: actions/checkout@v3 + with: + submodules: true - name: Comment PR uses: thollander/actions-comment-pull-request@v2 with: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index dbcacbb6805..0c3af7ad8e4 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -48,21 +48,19 @@ jobs: - name: Install Go uses: actions/setup-go@v4 with: - go-version: ${{matrix.goversion}} cache-dependency-path: | sdk/go.sum + go-version: 1.20.1 - name: Install pulumictl uses: jaxxstorm/action-install-gh-release@v1.5.0 with: repo: pulumi/pulumictl - name: Install Pulumi CLI - uses: pulumi/actions@v4 - with: - pulumi-version: v3.77.1 + uses: pulumi/action-install-pulumi-cli@v2 - name: Setup Node uses: actions/setup-node@v2 with: - node-version: ${{matrix.nodeversion}} + node-version: ${{ env.NODEVERSION }} registry-url: https://registry.npmjs.org - name: Setup DotNet uses: actions/setup-dotnet@v1 @@ -71,17 +69,16 @@ jobs: - name: Setup Python uses: actions/setup-python@v2 with: - python-version: ${{matrix.pythonversion}} + python-version: ${{ env.PYTHONVERSION }} - name: Setup Java uses: actions/setup-java@v3 with: cache: gradle distribution: temurin - java-version: ${{matrix.javaversion}} + java-version: ${{ env.JAVAVERSION }} - name: Setup Gradle uses: gradle/gradle-build-action@v2 with: - # Pin to known good version until #2262 is resolved gradle-version: "7.6" - name: Download provider + tfgen binaries uses: actions/download-artifact@v2 @@ -97,10 +94,10 @@ jobs: - name: Install plugins run: make install_plugins - name: Update path - run: echo "${{ github.workspace }}/bin" >> $GITHUB_PATH + run: echo "${{ github.workspace }}/bin" >> "$GITHUB_PATH" - name: Set PACKAGE_VERSION to Env run: echo "PACKAGE_VERSION=$(pulumictl get version --language generic)" >> - $GITHUB_ENV + "$GITHUB_ENV" - name: Build SDK run: make build_${{ matrix.language }} - name: Check worktree clean @@ -122,20 +119,12 @@ jobs: strategy: fail-fast: true matrix: - goversion: - - 1.20.x - javaversion: - - "11" language: - nodejs - python - dotnet - go - java - nodeversion: - - 16.x - pythonversion: - - "3.9" create_docs_build: name: create_docs_build needs: tag_sdk @@ -149,7 +138,7 @@ jobs: GITHUB_TOKEN: ${{ secrets.PULUMI_BOT_TOKEN }} name: Dispatch Event run: pulumictl create docs-build pulumi-${{ env.PROVIDER }} - ${GITHUB_REF#refs/tags/} + "${GITHUB_REF#refs/tags/}" prerequisites: name: prerequisites runs-on: ubuntu-latest @@ -168,57 +157,46 @@ jobs: - name: Install Go uses: actions/setup-go@v4 with: - go-version: ${{matrix.goversion}} cache-dependency-path: | sdk/go.sum + go-version: 1.20.1 - name: Install pulumictl uses: jaxxstorm/action-install-gh-release@v1.5.0 with: repo: pulumi/pulumictl - - name: Setup Node - uses: actions/setup-node@v2 - with: - node-version: ${{matrix.nodeversion}} - registry-url: https://registry.npmjs.org - name: Install Pulumi CLI - uses: pulumi/actions@v4 - with: - pulumi-version: v3.77.1 + uses: pulumi/action-install-pulumi-cli@v2 - if: github.event_name == 'pull_request' name: Install Schema Tools uses: jaxxstorm/action-install-gh-release@v1.5.0 with: - repo: mikhailshilkov/schema-tools - - name: Clear GitHub Actions Ubuntu runner disk space - uses: jlumbroso/free-disk-space@main - with: - tool-cache: false - dotnet: false - android: true - haskell: true - swap-storage: true - # TODO: enable once transient error with azure is resolved - # E: Failed to fetch http://azure.archive.ubuntu.com/ubuntu/pool/universe/d/dotnet7/aspnetcore-targeting-pack-7.0_7.0.105-0ubuntu1%7e22.04.1_amd64.deb 404 Not Found [IP: 40.81.13.82 80] - large-packages: false + repo: pulumi/schema-tools - name: Build tfgen & provider binaries run: make provider - if: github.event_name == 'pull_request' name: Check Schema is Valid - run: >- - echo 'SCHEMA_CHANGES<> $GITHUB_ENV - - schema-tools compare ${{ env.PROVIDER }} master --local-path=provider/cmd/pulumi-resource-${{ env.PROVIDER }}/schema.json >> $GITHUB_ENV - - echo 'EOF' >> $GITHUB_ENV - - if: github.event_name == 'pull_request' + run: | + EOF=$(dd if=/dev/urandom bs=15 count=1 status=none | base64) + { + echo "SCHEMA_CHANGES<<$EOF"; + schema-tools compare -p ${{ env.PROVIDER }} -o ${{ github.event.repository.default_branch }} -n --local-path=provider/cmd/pulumi-resource-${{ env.PROVIDER }}/schema.json; + echo "$EOF"; + } >> "$GITHUB_ENV" + - if: github.event_name == 'pull_request' && github.actor != 'dependabot[bot]' name: Comment on PR with Details of Schema Check - uses: thollander/actions-comment-pull-request@v1 + uses: thollander/actions-comment-pull-request@v2 with: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - message: | + comment_tag: schemaCheck + message: >+ ### Does the PR have any schema changes? + ${{ env.SCHEMA_CHANGES }} + + + Maintainer note: consult the [runbook](https://github.com/pulumi/platform-providers-team/blob/main/playbooks/tf-provider-updating.md) for dealing with any breaking changes. + - name: Tar provider binaries run: tar -zcf ${{ github.workspace }}/bin/provider.tar.gz -C ${{ github.workspace }}/bin/ pulumi-resource-${{ env.PROVIDER }} @@ -235,15 +213,6 @@ jobs: author_name: Failure in building provider prerequisites fields: repo,commit,author,action status: ${{ job.status }} - strategy: - fail-fast: true - matrix: - goversion: - - 1.20.x - nodeversion: - - 16.x - pythonversion: - - "3.9" publish: name: publish needs: test @@ -258,17 +227,15 @@ jobs: - name: Install Go uses: actions/setup-go@v4 with: - go-version: ${{matrix.goversion}} cache-dependency-path: | sdk/go.sum + go-version: 1.20.1 - name: Install pulumictl uses: jaxxstorm/action-install-gh-release@v1.5.0 with: repo: pulumi/pulumictl - name: Install Pulumi CLI - uses: pulumi/actions@v4 - with: - pulumi-version: v3.77.1 + uses: pulumi/action-install-pulumi-cli@v2 - name: Configure AWS Credentials uses: aws-actions/configure-aws-credentials@v1 with: @@ -280,8 +247,7 @@ jobs: role-session-name: ${{ env.PROVIDER }}@githubActions role-to-assume: ${{ secrets.AWS_UPLOAD_ROLE_ARN }} - name: Set PreRelease Version - run: echo "GORELEASER_CURRENT_TAG=v$(pulumictl get version --language generic)" - >> $GITHUB_ENV + run: echo "GORELEASER_CURRENT_TAG=v$(pulumictl get version --language generic)" >> "$GITHUB_ENV" - name: Run GoReleaser uses: goreleaser/goreleaser-action@v2 with: @@ -294,169 +260,24 @@ jobs: author_name: Failure in publishing binaries fields: repo,commit,author,action status: ${{ job.status }} - strategy: - fail-fast: true - matrix: - goversion: - - 1.20.x - nodeversion: - - 16.x - pythonversion: - - "3.9" - publish_java_sdk: - continue-on-error: true - name: publish_java_sdk - needs: publish - runs-on: pulumi-ubuntu-8core - steps: - - name: Checkout Repo - uses: actions/checkout@v3 - with: - submodules: true - - name: Checkout Scripts Repo - uses: actions/checkout@v3 - with: - path: ci-scripts - repository: pulumi/scripts - - name: Unshallow clone for tags - run: git fetch --prune --unshallow --tags - - name: Install Go - uses: actions/setup-go@v4 - with: - go-version: ${{matrix.goversion}} - cache-dependency-path: | - sdk/go.sum - - name: Install pulumictl - uses: jaxxstorm/action-install-gh-release@v1.5.0 - with: - repo: pulumi/pulumictl - - name: Install Pulumi CLI - uses: pulumi/actions@v4 - with: - pulumi-version: v3.77.1 - - name: Setup Java - uses: actions/setup-java@v3 - with: - cache: gradle - distribution: temurin - java-version: ${{matrix.javaversion}} - - name: Setup Gradle - uses: gradle/gradle-build-action@v2 - with: - # Pin to known good version until #2262 is resolved - gradle-version: "7.6" - - name: Download java SDK - uses: actions/download-artifact@v2 - with: - name: java-sdk.tar.gz - path: ${{ github.workspace}}/sdk/ - - name: Uncompress java SDK - run: tar -zxf ${{github.workspace}}/sdk/java.tar.gz -C - ${{github.workspace}}/sdk/java - - name: Set PACKAGE_VERSION to Env - run: echo "PACKAGE_VERSION=$(pulumictl get version --language generic)" >> - $GITHUB_ENV - - name: Publish Java SDK - uses: gradle/gradle-build-action@9b814496b50909128c6a52622b416c5ffa04db49 - with: - arguments: publishToSonatype closeAndReleaseSonatypeStagingRepository - build-root-directory: ./sdk/java - gradle-version: 7.4.1 - strategy: - fail-fast: true - matrix: - goversion: - - 1.20.x - javaversion: - - "11" publish_sdk: name: publish_sdk needs: publish runs-on: ubuntu-latest steps: - - name: Checkout Repo - uses: actions/checkout@v3 - with: - submodules: true - - name: Checkout Scripts Repo - uses: actions/checkout@v3 - with: - path: ci-scripts - repository: pulumi/scripts - - name: Unshallow clone for tags - run: git fetch --prune --unshallow --tags - - name: Install Go - uses: actions/setup-go@v4 - with: - go-version: ${{matrix.goversion}} - cache-dependency-path: | - sdk/go.sum - - name: Install pulumictl - uses: jaxxstorm/action-install-gh-release@v1.5.0 - with: - repo: pulumi/pulumictl - - name: Install Pulumi CLI - uses: pulumi/actions@v4 - with: - pulumi-version: v3.77.1 - - name: Setup Node - uses: actions/setup-node@v2 - with: - node-version: ${{matrix.nodeversion}} - registry-url: https://registry.npmjs.org - - name: Setup DotNet - uses: actions/setup-dotnet@v1 - with: - dotnet-version: ${{ env.DOTNETVERSION }} - - name: Setup Python - uses: actions/setup-python@v2 - with: - python-version: ${{matrix.pythonversion}} - - name: Download python SDK - uses: actions/download-artifact@v2 - with: - name: python-sdk.tar.gz - path: ${{ github.workspace}}/sdk/ - - name: Uncompress python SDK - run: tar -zxf ${{github.workspace}}/sdk/python.tar.gz -C - ${{github.workspace}}/sdk/python - - name: Download dotnet SDK - uses: actions/download-artifact@v2 - with: - name: dotnet-sdk.tar.gz - path: ${{ github.workspace}}/sdk/ - - name: Uncompress dotnet SDK - run: tar -zxf ${{github.workspace}}/sdk/dotnet.tar.gz -C - ${{github.workspace}}/sdk/dotnet - - name: Download nodejs SDK - uses: actions/download-artifact@v2 - with: - name: nodejs-sdk.tar.gz - path: ${{ github.workspace}}/sdk/ - - name: Uncompress nodejs SDK - run: tar -zxf ${{github.workspace}}/sdk/nodejs.tar.gz -C - ${{github.workspace}}/sdk/nodejs - - run: python -m pip install pip twine + - name: Publish SDKs + uses: pulumi/pulumi-package-publisher@v0.0.9 - env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} - name: Publish SDKs - run: ./ci-scripts/ci/publish-tfgen-package ${{ github.workspace }} - - if: failure() && github.event_name == 'push' - name: Notify Slack - uses: 8398a7/action-slack@v3 - with: - author_name: Failure in publishing SDK - fields: repo,commit,author,action - status: ${{ job.status }} - strategy: - fail-fast: true - matrix: - goversion: - - 1.20.x - nodeversion: - - 16.x - pythonversion: - - "3.9" + SLACK_CHANNEL: provider-upgrade-publish-status + SLACK_COLOR: "#FF0000" + SLACK_ICON_EMOJI: ":taco:" + SLACK_MESSAGE: "Publish failed :x:" + SLACK_TITLE: ${{ github.event.repository.name }} upgrade result + SLACK_USERNAME: provider-bot + SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }} + if: failure() + name: Send Publish Failure To Slack + uses: rtCamp/action-slack-notify@v2 tag_sdk: name: tag_sdk needs: publish_sdk @@ -464,35 +285,15 @@ jobs: steps: - name: Checkout Repo uses: actions/checkout@v3 + with: + submodules: true - name: Install pulumictl uses: jaxxstorm/action-install-gh-release@v1.5.0 with: repo: pulumi/pulumictl - name: Add SDK version tag - run: git tag sdk/v$(pulumictl get version --language generic) && git push origin - sdk/v$(pulumictl get version --language generic) - - go_test_shim: - if: github.event_name == 'repository_dispatch' || - github.event.pull_request.head.repo.full_name == github.repository - name: Run test of provider shim - runs-on: ubuntu-latest - timeout-minutes: 60 - steps: - - name: Checkout Repo - uses: actions/checkout@v3 - with: - ref: ${{ env.PR_COMMIT_SHA }} - submodules: true - - uses: actions/setup-go@v4 - with: - go-version-file: 'provider/shim/go.mod' - cache-dependency-path: 'provider/shim/go.sum' - - name: go test - run: | - cd provider/shim - go test -v . - + run: git tag "sdk/v$(pulumictl get version --language generic)" && git push origin + "sdk/v$(pulumictl get version --language generic)" test: name: test needs: build_sdk @@ -515,21 +316,19 @@ jobs: - name: Install Go uses: actions/setup-go@v4 with: - go-version: ${{matrix.goversion}} cache-dependency-path: | sdk/go.sum + go-version: 1.20.1 - name: Install pulumictl uses: jaxxstorm/action-install-gh-release@v1.5.0 with: repo: pulumi/pulumictl - name: Install Pulumi CLI - uses: pulumi/actions@v4 - with: - pulumi-version: v3.77.1 + uses: pulumi/action-install-pulumi-cli@v2 - name: Setup Node uses: actions/setup-node@v2 with: - node-version: ${{matrix.nodeversion}} + node-version: ${{ env.NODEVERSION }} registry-url: https://registry.npmjs.org - name: Setup DotNet uses: actions/setup-dotnet@v1 @@ -538,17 +337,16 @@ jobs: - name: Setup Python uses: actions/setup-python@v2 with: - python-version: ${{matrix.pythonversion}} + python-version: ${{ env.PYTHONVERSION }} - name: Setup Java uses: actions/setup-java@v3 with: cache: gradle distribution: temurin - java-version: ${{matrix.javaversion}} + java-version: ${{ env.JAVAVERSION }} - name: Setup Gradle uses: gradle/gradle-build-action@v2 with: - # Pin to known good version until #2262 is resolved gradle-version: "7.6" - name: Download provider + tfgen binaries uses: actions/download-artifact@v2 @@ -571,11 +369,18 @@ jobs: run: tar -zxf ${{ github.workspace }}/sdk/${{ matrix.language }}.tar.gz -C ${{ github.workspace }}/sdk/${{ matrix.language }} - name: Update path - run: echo "${{ github.workspace }}/bin" >> $GITHUB_PATH + run: echo "${{ github.workspace }}/bin" >> "$GITHUB_PATH" - name: Install Python deps run: |- pip3 install virtualenv==20.0.23 pip3 install pipenv + - name: Install dependencies + run: make install_${{ matrix.language}}_sdk + - name: Install gotestfmt + uses: GoTestTools/gotestfmt-action@v2 + with: + token: ${{ secrets.GITHUB_TOKEN }} + version: v2.4.0 - name: Configure AWS Credentials uses: aws-actions/configure-aws-credentials@v1 with: @@ -585,13 +390,6 @@ jobs: role-duration-seconds: 3600 role-session-name: ${{ env.PROVIDER }}@githubActions role-to-assume: ${{ secrets.AWS_CI_ROLE_ARN }} - - name: Install dependencies - run: make install_${{ matrix.language}}_sdk - - name: Install gotestfmt - uses: GoTestTools/gotestfmt-action@v2 - with: - token: ${{ secrets.GITHUB_TOKEN }} - version: v2.4.0 - name: Run tests run: cd examples && go test -v -json -count=1 -cover -timeout 2h -tags=${{ matrix.language }} -parallel 4 . 2>&1 | tee /tmp/gotest.log | gotestfmt @@ -603,22 +401,14 @@ jobs: fields: repo,commit,author,action status: ${{ job.status }} strategy: - fail-fast: true + fail-fast: false matrix: - goversion: - - 1.20.x - javaversion: - - "11" language: - nodejs - python - dotnet - go - java - nodeversion: - - 16.x - pythonversion: - - "3.9" name: release on: push: diff --git a/.github/workflows/resync-build.yml b/.github/workflows/resync-build.yml index 952c2efbf81..708713ffbc4 100644 --- a/.github/workflows/resync-build.yml +++ b/.github/workflows/resync-build.yml @@ -37,6 +37,8 @@ jobs: steps: - name: Checkout Repo uses: actions/checkout@v3 + with: + submodules: true - name: Checkout repo uses: actions/checkout@v3 with: diff --git a/.github/workflows/run-acceptance-tests.yml b/.github/workflows/run-acceptance-tests.yml index a8d4ca61b44..87e49b4f3f2 100644 --- a/.github/workflows/run-acceptance-tests.yml +++ b/.github/workflows/run-acceptance-tests.yml @@ -124,20 +124,12 @@ jobs: strategy: fail-fast: true matrix: - goversion: - - 1.20.x - javaversion: - - "11" language: - nodejs - python - dotnet - go - java - nodeversion: - - 16.x - pythonversion: - - "3.9" comment-notification: if: github.event_name == 'repository_dispatch' name: comment-notification @@ -162,8 +154,8 @@ jobs: - name: Checkout Repo uses: actions/checkout@v3 with: - ref: ${{ env.PR_COMMIT_SHA }} submodules: true + ref: ${{ env.PR_COMMIT_SHA }} - name: Checkout Scripts Repo uses: actions/checkout@v3 with: @@ -249,15 +241,6 @@ jobs: author_name: Failure in building provider prerequisites fields: repo,commit,author,action status: ${{ job.status }} - strategy: - fail-fast: true - matrix: - goversion: - - 1.20.x - nodeversion: - - 16.x - pythonversion: - - "3.9" sentinel: if: github.event_name == 'repository_dispatch' || github.event.pull_request.head.repo.full_name == github.repository @@ -268,28 +251,6 @@ jobs: steps: - name: Is workflow a success run: echo yes - - go_test_shim: - if: github.event_name == 'repository_dispatch' || - github.event.pull_request.head.repo.full_name == github.repository - name: Run test of provider shim - runs-on: ubuntu-latest - timeout-minutes: 60 - steps: - - name: Checkout Repo - uses: actions/checkout@v3 - with: - ref: ${{ env.PR_COMMIT_SHA }} - submodules: true - - uses: actions/setup-go@v4 - with: - go-version-file: 'provider/shim/go.mod' - cache-dependency-path: 'provider/shim/go.sum' - - name: go test - run: | - cd provider/shim - go test -v . - test: if: github.event_name == 'repository_dispatch' || github.event.pull_request.head.repo.full_name == github.repository @@ -303,8 +264,8 @@ jobs: - name: Checkout Repo uses: actions/checkout@v3 with: - ref: ${{ env.PR_COMMIT_SHA }} submodules: true + ref: ${{ env.PR_COMMIT_SHA }} - name: Checkout Scripts Repo uses: actions/checkout@v3 with: @@ -315,21 +276,19 @@ jobs: - name: Install Go uses: actions/setup-go@v4 with: - go-version: ${{matrix.goversion}} cache-dependency-path: | sdk/go.sum + go-version: 1.20.1 - name: Install pulumictl uses: jaxxstorm/action-install-gh-release@v1.5.0 with: repo: pulumi/pulumictl - name: Install Pulumi CLI - uses: pulumi/actions@v4 - with: - pulumi-version: v3.77.1 + uses: pulumi/action-install-pulumi-cli@v2 - name: Setup Node uses: actions/setup-node@v2 with: - node-version: ${{matrix.nodeversion}} + node-version: ${{ env.NODEVERSION }} registry-url: https://registry.npmjs.org - name: Setup DotNet uses: actions/setup-dotnet@v1 @@ -338,17 +297,16 @@ jobs: - name: Setup Python uses: actions/setup-python@v2 with: - python-version: ${{matrix.pythonversion}} + python-version: ${{ env.PYTHONVERSION }} - name: Setup Java uses: actions/setup-java@v3 with: cache: gradle distribution: temurin - java-version: ${{matrix.javaversion}} + java-version: ${{ env.JAVAVERSION }} - name: Setup Gradle uses: gradle/gradle-build-action@v2 with: - # Pin to known good version until #2262 is resolved gradle-version: "7.6" - name: Download provider + tfgen binaries uses: actions/download-artifact@v2 @@ -371,11 +329,18 @@ jobs: run: tar -zxf ${{ github.workspace }}/sdk/${{ matrix.language }}.tar.gz -C ${{ github.workspace }}/sdk/${{ matrix.language }} - name: Update path - run: echo "${{ github.workspace }}/bin" >> $GITHUB_PATH + run: echo "${{ github.workspace }}/bin" >> "$GITHUB_PATH" - name: Install Python deps run: |- pip3 install virtualenv==20.0.23 pip3 install pipenv + - name: Install dependencies + run: make install_${{ matrix.language}}_sdk + - name: Install gotestfmt + uses: GoTestTools/gotestfmt-action@v2 + with: + token: ${{ secrets.GITHUB_TOKEN }} + version: v2.4.0 - name: Configure AWS Credentials uses: aws-actions/configure-aws-credentials@v1 with: @@ -385,13 +350,6 @@ jobs: role-duration-seconds: 3600 role-session-name: ${{ env.PROVIDER }}@githubActions role-to-assume: ${{ secrets.AWS_CI_ROLE_ARN }} - - name: Install dependencies - run: make install_${{ matrix.language}}_sdk - - name: Install gotestfmt - uses: GoTestTools/gotestfmt-action@v2 - with: - token: ${{ secrets.GITHUB_TOKEN }} - version: v2.4.0 - name: Run tests run: cd examples && go test -v -json -count=1 -cover -timeout 2h -tags=${{ matrix.language }} -parallel 4 . 2>&1 | tee /tmp/gotest.log | gotestfmt @@ -403,29 +361,20 @@ jobs: fields: repo,commit,author,action status: ${{ job.status }} strategy: - fail-fast: true + fail-fast: false matrix: - goversion: - - 1.20.x - javaversion: - - "11" language: - nodejs - python - dotnet - go - java - nodeversion: - - 16.x - pythonversion: - - "3.9" name: run-acceptance-tests on: pull_request: branches: - master - main - - v6 paths-ignore: - CHANGELOG.md repository_dispatch: diff --git a/.github/workflows/update-bridge.yml b/.github/workflows/update-bridge.yml index fb9750912e0..44b2c50a691 100644 --- a/.github/workflows/update-bridge.yml +++ b/.github/workflows/update-bridge.yml @@ -18,17 +18,15 @@ jobs: - name: Install Go uses: actions/setup-go@v4 with: - go-version: ${{matrix.goversion}} cache-dependency-path: | sdk/go.sum + go-version: 1.20.1 - name: Install pulumictl uses: jaxxstorm/action-install-gh-release@v1.5.0 with: repo: pulumi/pulumictl - name: Install Pulumi CLI - uses: pulumi/actions@v4 - with: - pulumi-version: v3.77.1 + uses: pulumi/action-install-pulumi-cli@v2 - name: Setup DotNet uses: actions/setup-dotnet@v1 with: @@ -80,22 +78,20 @@ jobs: committer: pulumi-bot labels: impact/no-changelog-required team-reviewers: platform-integrations - title: Update pulumi-terraform-bridge to v${{ github.event.inputs.bridge_version - }} + title: Update pulumi-terraform-bridge to v${{ github.event.inputs.bridge_version }} token: ${{ secrets.PULUMI_BOT_TOKEN }} - strategy: - fail-fast: true - matrix: - goversion: - - 1.20.x - nodeversion: - - 16.x - pythonversion: - - "3.9" + - if: steps.create-pr.outputs.pull-request-operation == 'created' && + github.event.inputs.automerge == 'true' + run: gh pr merge --auto --squash ${{ steps.create-pr.outputs.pull-request-number }} name: Update pulumi-terraform-bridge on: workflow_dispatch: inputs: + automerge: + default: false + description: Mark created PR for auto-merging? + required: true + type: boolean bridge_version: description: The version of pulumi/pulumi-terraform-bridge to update to. Do not include the 'v' prefix. Must be major version 3. From 3bb3a735684514eaff5115aee999956021258f22 Mon Sep 17 00:00:00 2001 From: Ian Wahbe Date: Thu, 24 Aug 2023 13:49:52 -0700 Subject: [PATCH 4/8] Apply fixes to nightly-test.yml --- .github/workflows/nightly-test.yml | 123 +++++++++-------------------- 1 file changed, 36 insertions(+), 87 deletions(-) diff --git a/.github/workflows/nightly-test.yml b/.github/workflows/nightly-test.yml index f6074b075d1..55fa6dd4ac5 100644 --- a/.github/workflows/nightly-test.yml +++ b/.github/workflows/nightly-test.yml @@ -48,21 +48,19 @@ jobs: - name: Install Go uses: actions/setup-go@v4 with: - go-version: ${{matrix.goversion}} cache-dependency-path: | sdk/go.sum + go-version: 1.20.1 - name: Install pulumictl uses: jaxxstorm/action-install-gh-release@v1.5.0 with: repo: pulumi/pulumictl - name: Install Pulumi CLI - uses: pulumi/actions@v4 - with: - pulumi-version: v3.77.1 + uses: pulumi/action-install-pulumi-cli@v2 - name: Setup Node uses: actions/setup-node@v2 with: - node-version: ${{matrix.nodeversion}} + node-version: ${{ env.NODEVERSION }} registry-url: https://registry.npmjs.org - name: Setup DotNet uses: actions/setup-dotnet@v1 @@ -146,52 +144,46 @@ jobs: - name: Install Go uses: actions/setup-go@v4 with: - go-version: ${{matrix.goversion}} cache-dependency-path: | sdk/go.sum + go-version: 1.20.1 - name: Install pulumictl uses: jaxxstorm/action-install-gh-release@v1.5.0 with: repo: pulumi/pulumictl - name: Install Pulumi CLI - uses: pulumi/actions@v4 - with: - pulumi-version: v3.77.1 + uses: pulumi/action-install-pulumi-cli@v2 - if: github.event_name == 'pull_request' name: Install Schema Tools uses: jaxxstorm/action-install-gh-release@v1.5.0 with: - repo: mikhailshilkov/schema-tools - - name: Clear GitHub Actions Ubuntu runner disk space - uses: jlumbroso/free-disk-space@main - with: - tool-cache: false - dotnet: false - android: true - haskell: true - swap-storage: true - # TODO: enable once transient error with azure is resolved - # E: Failed to fetch http://azure.archive.ubuntu.com/ubuntu/pool/universe/d/dotnet7/aspnetcore-targeting-pack-7.0_7.0.105-0ubuntu1%7e22.04.1_amd64.deb 404 Not Found [IP: 40.81.13.82 80] - large-packages: false + repo: pulumi/schema-tools - name: Build tfgen & provider binaries run: make provider - if: github.event_name == 'pull_request' name: Check Schema is Valid - run: >- - echo 'SCHEMA_CHANGES<> $GITHUB_ENV - - schema-tools compare ${{ env.PROVIDER }} master --local-path=provider/cmd/pulumi-resource-${{ env.PROVIDER }}/schema.json >> $GITHUB_ENV - - echo 'EOF' >> $GITHUB_ENV - - if: github.event_name == 'pull_request' + run: | + EOF=$(dd if=/dev/urandom bs=15 count=1 status=none | base64) + { + echo "SCHEMA_CHANGES<<$EOF"; + schema-tools compare -p ${{ env.PROVIDER }} -o ${{ github.event.repository.default_branch }} -n --local-path=provider/cmd/pulumi-resource-${{ env.PROVIDER }}/schema.json; + echo "$EOF"; + } >> "$GITHUB_ENV" + - if: github.event_name == 'pull_request' && github.actor != 'dependabot[bot]' name: Comment on PR with Details of Schema Check - uses: thollander/actions-comment-pull-request@v1 + uses: thollander/actions-comment-pull-request@v2 with: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - message: | + comment_tag: schemaCheck + message: >+ ### Does the PR have any schema changes? + ${{ env.SCHEMA_CHANGES }} + + + Maintainer note: consult the [runbook](https://github.com/pulumi/platform-providers-team/blob/main/playbooks/tf-provider-updating.md) for dealing with any breaking changes. + - name: Tar provider binaries run: tar -zcf ${{ github.workspace }}/bin/provider.tar.gz -C ${{ github.workspace }}/bin/ pulumi-resource-${{ env.PROVIDER }} @@ -209,38 +201,6 @@ jobs: author_name: Failure in building provider prerequisites fields: repo,commit,author,action status: ${{ job.status }} - strategy: - fail-fast: true - matrix: - goversion: - - 1.20.x - nodeversion: - - 16.x - pythonversion: - - "3.9" - - - go_test_shim: - if: github.event_name == 'repository_dispatch' || - github.event.pull_request.head.repo.full_name == github.repository - name: Run test of provider shim - runs-on: ubuntu-latest - timeout-minutes: 60 - steps: - - name: Checkout Repo - uses: actions/checkout@v3 - with: - ref: ${{ env.PR_COMMIT_SHA }} - submodules: true - - uses: actions/setup-go@v4 - with: - go-version-file: 'provider/shim/go.mod' - cache-dependency-path: 'provider/shim/go.sum' - - name: go test - run: | - cd provider/shim - go test -v . - test: name: test needs: build_sdk @@ -263,21 +223,19 @@ jobs: - name: Install Go uses: actions/setup-go@v4 with: - go-version: ${{matrix.goversion}} cache-dependency-path: | sdk/go.sum + go-version: 1.20.1 - name: Install pulumictl uses: jaxxstorm/action-install-gh-release@v1.5.0 with: repo: pulumi/pulumictl - name: Install Pulumi CLI - uses: pulumi/actions@v4 - with: - pulumi-version: v3.77.1 + uses: pulumi/action-install-pulumi-cli@v2 - name: Setup Node uses: actions/setup-node@v2 with: - node-version: ${{matrix.nodeversion}} + node-version: ${{ env.NODEVERSION }} registry-url: https://registry.npmjs.org - name: Setup DotNet uses: actions/setup-dotnet@v1 @@ -286,17 +244,16 @@ jobs: - name: Setup Python uses: actions/setup-python@v2 with: - python-version: ${{matrix.pythonversion}} + python-version: ${{ env.PYTHONVERSION }} - name: Setup Java uses: actions/setup-java@v3 with: cache: gradle distribution: temurin - java-version: ${{matrix.javaversion}} + java-version: ${{ env.JAVAVERSION }} - name: Setup Gradle uses: gradle/gradle-build-action@v2 with: - # Pin to known good version until #2262 is resolved gradle-version: "7.6" - name: Download provider + tfgen binaries uses: actions/download-artifact@v2 @@ -319,11 +276,18 @@ jobs: run: tar -zxf ${{ github.workspace }}/sdk/${{ matrix.language }}.tar.gz -C ${{ github.workspace }}/sdk/${{ matrix.language }} - name: Update path - run: echo "${{ github.workspace }}/bin" >> $GITHUB_PATH + run: echo "${{ github.workspace }}/bin" >> "$GITHUB_PATH" - name: Install Python deps run: |- pip3 install virtualenv==20.0.23 pip3 install pipenv + - name: Install dependencies + run: make install_${{ matrix.language}}_sdk + - name: Install gotestfmt + uses: GoTestTools/gotestfmt-action@v2 + with: + token: ${{ secrets.GITHUB_TOKEN }} + version: v2.4.0 - name: Configure AWS Credentials uses: aws-actions/configure-aws-credentials@v1 with: @@ -333,13 +297,6 @@ jobs: role-duration-seconds: 3600 role-session-name: ${{ env.PROVIDER }}@githubActions role-to-assume: ${{ secrets.AWS_CI_ROLE_ARN }} - - name: Install dependencies - run: make install_${{ matrix.language}}_sdk - - name: Install gotestfmt - uses: GoTestTools/gotestfmt-action@v2 - with: - token: ${{ secrets.GITHUB_TOKEN }} - version: v2.4.0 - name: Run tests run: cd examples && go test -v -json -count=1 -cover -timeout 2h -tags=${{ matrix.language }} -parallel 4 . 2>&1 | tee /tmp/gotest.log | gotestfmt @@ -351,22 +308,14 @@ jobs: fields: repo,commit,author,action status: ${{ job.status }} strategy: - fail-fast: true + fail-fast: false matrix: - goversion: - - 1.20.x - javaversion: - - "11" language: - nodejs - python - dotnet - go - java - nodeversion: - - 16.x - pythonversion: - - "3.9" name: cron on: schedule: From 5ff14b828e259e06faa0a433bf8abdc2c7df61f0 Mon Sep 17 00:00:00 2001 From: Ian Wahbe Date: Thu, 24 Aug 2023 15:19:17 -0700 Subject: [PATCH 5/8] Update all workflow files via ci-mgmt --- .github/workflows/prerelease.yml | 46 +++++++++++----------- .github/workflows/run-acceptance-tests.yml | 19 +++------ .github/workflows/update-bridge.yml | 8 ++-- 3 files changed, 30 insertions(+), 43 deletions(-) diff --git a/.github/workflows/prerelease.yml b/.github/workflows/prerelease.yml index 8cde242334e..dc5aa73b909 100644 --- a/.github/workflows/prerelease.yml +++ b/.github/workflows/prerelease.yml @@ -144,57 +144,55 @@ jobs: - name: Install Go uses: actions/setup-go@v4 with: - go-version: ${{matrix.goversion}} cache-dependency-path: | sdk/go.sum - - name: Setup Node - uses: actions/setup-node@v2 - with: - node-version: ${{matrix.nodeversion}} - registry-url: https://registry.npmjs.org + go-version: 1.20.1 - name: Install pulumictl uses: jaxxstorm/action-install-gh-release@v1.5.0 with: repo: pulumi/pulumictl - name: Install Pulumi CLI - uses: pulumi/actions@v4 - with: - pulumi-version: v3.77.1 + uses: pulumi/action-install-pulumi-cli@v2 - if: github.event_name == 'pull_request' name: Install Schema Tools uses: jaxxstorm/action-install-gh-release@v1.5.0 with: - repo: mikhailshilkov/schema-tools + repo: pulumi/schema-tools - name: Clear GitHub Actions Ubuntu runner disk space uses: jlumbroso/free-disk-space@main with: - tool-cache: false - dotnet: false android: true + dotnet: false haskell: true - swap-storage: true - # TODO: enable once transient error with azure is resolved - # E: Failed to fetch http://azure.archive.ubuntu.com/ubuntu/pool/universe/d/dotnet7/aspnetcore-targeting-pack-7.0_7.0.105-0ubuntu1%7e22.04.1_amd64.deb 404 Not Found [IP: 40.81.13.82 80] large-packages: false + swap-storage: true + tool-cache: false - name: Build tfgen & provider binaries run: make provider - if: github.event_name == 'pull_request' name: Check Schema is Valid - run: >- - echo 'SCHEMA_CHANGES<> $GITHUB_ENV - - schema-tools compare ${{ env.PROVIDER }} master --local-path=provider/cmd/pulumi-resource-${{ env.PROVIDER }}/schema.json >> $GITHUB_ENV - - echo 'EOF' >> $GITHUB_ENV - - if: github.event_name == 'pull_request' + run: | + EOF=$(dd if=/dev/urandom bs=15 count=1 status=none | base64) + { + echo "SCHEMA_CHANGES<<$EOF"; + schema-tools compare -p ${{ env.PROVIDER }} -o ${{ github.event.repository.default_branch }} -n --local-path=provider/cmd/pulumi-resource-${{ env.PROVIDER }}/schema.json; + echo "$EOF"; + } >> "$GITHUB_ENV" + - if: github.event_name == 'pull_request' && github.actor != 'dependabot[bot]' name: Comment on PR with Details of Schema Check - uses: thollander/actions-comment-pull-request@v1 + uses: thollander/actions-comment-pull-request@v2 with: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - message: | + comment_tag: schemaCheck + message: >+ ### Does the PR have any schema changes? + ${{ env.SCHEMA_CHANGES }} + + + Maintainer note: consult the [runbook](https://github.com/pulumi/platform-providers-team/blob/main/playbooks/tf-provider-updating.md) for dealing with any breaking changes. + - name: Tar provider binaries run: tar -zcf ${{ github.workspace }}/bin/provider.tar.gz -C ${{ github.workspace }}/bin/ pulumi-resource-${{ env.PROVIDER }} diff --git a/.github/workflows/run-acceptance-tests.yml b/.github/workflows/run-acceptance-tests.yml index 87e49b4f3f2..5c89f208373 100644 --- a/.github/workflows/run-acceptance-tests.yml +++ b/.github/workflows/run-acceptance-tests.yml @@ -166,22 +166,15 @@ jobs: - name: Install Go uses: actions/setup-go@v4 with: - go-version: ${{matrix.goversion}} cache-dependency-path: | sdk/go.sum - - name: Setup Node - uses: actions/setup-node@v2 - with: - node-version: ${{matrix.nodeversion}} - registry-url: https://registry.npmjs.org + go-version: 1.20.1 - name: Install pulumictl uses: jaxxstorm/action-install-gh-release@v1.5.0 with: repo: pulumi/pulumictl - name: Install Pulumi CLI - uses: pulumi/actions@v4 - with: - pulumi-version: v3.77.1 + uses: pulumi/action-install-pulumi-cli@v2 - if: github.event_name == 'pull_request' name: Install Schema Tools uses: jaxxstorm/action-install-gh-release@v1.5.0 @@ -190,14 +183,12 @@ jobs: - name: Clear GitHub Actions Ubuntu runner disk space uses: jlumbroso/free-disk-space@main with: - tool-cache: false - dotnet: false android: true + dotnet: false haskell: true - swap-storage: true - # TODO: enable once transient error with azure is resolved - # E: Failed to fetch http://azure.archive.ubuntu.com/ubuntu/pool/universe/d/dotnet7/aspnetcore-targeting-pack-7.0_7.0.105-0ubuntu1%7e22.04.1_amd64.deb 404 Not Found [IP: 40.81.13.82 80] large-packages: false + swap-storage: true + tool-cache: false - name: Build tfgen & provider binaries run: make provider - if: github.event_name == 'pull_request' diff --git a/.github/workflows/update-bridge.yml b/.github/workflows/update-bridge.yml index 44b2c50a691..7c80710300d 100644 --- a/.github/workflows/update-bridge.yml +++ b/.github/workflows/update-bridge.yml @@ -53,14 +53,12 @@ jobs: - name: Clear GitHub Actions Ubuntu runner disk space uses: jlumbroso/free-disk-space@main with: - tool-cache: false - dotnet: false android: true + dotnet: false haskell: true - swap-storage: true - # TODO: enable once transient error with azure is resolved - # E: Failed to fetch http://azure.archive.ubuntu.com/ubuntu/pool/universe/d/dotnet7/aspnetcore-targeting-pack-7.0_7.0.105-0ubuntu1%7e22.04.1_amd64.deb 404 Not Found [IP: 40.81.13.82 80] large-packages: false + swap-storage: true + tool-cache: false - run: make tfgen - run: make build_sdks - id: create-pr From 76d843c734eaa7fcfc793cc64e230b5d62f42c21 Mon Sep 17 00:00:00 2001 From: Ian Wahbe Date: Thu, 24 Aug 2023 18:47:17 -0700 Subject: [PATCH 6/8] Use a pinned pulumi version --- .github/workflows/main.yml | 20 +++++++++++++++----- .github/workflows/master.yml | 20 +++++++++++++++----- .github/workflows/nightly-test.yml | 12 +++++++++--- .github/workflows/prerelease.yml | 16 ++++++++++++---- .github/workflows/release.yml | 16 ++++++++++++---- .github/workflows/resync-build.yml | 4 +++- .github/workflows/run-acceptance-tests.yml | 12 +++++++++--- .github/workflows/update-bridge.yml | 4 +++- 8 files changed, 78 insertions(+), 26 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index c7d5afd3089..7a69113c92c 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -56,7 +56,9 @@ jobs: with: repo: pulumi/pulumictl - name: Install Pulumi CLI - uses: pulumi/action-install-pulumi-cli@v2 + uses: pulumi/actions@v4 + with: + pulumi-version: v3.77.1 - name: Setup Node uses: actions/setup-node@v2 with: @@ -162,7 +164,9 @@ jobs: with: repo: pulumi/pulumictl - name: Install Pulumi CLI - uses: pulumi/action-install-pulumi-cli@v2 + uses: pulumi/actions@v4 + with: + pulumi-version: v3.77.1 - if: github.event_name == 'pull_request' name: Install Schema Tools uses: jaxxstorm/action-install-gh-release@v1.5.0 @@ -207,7 +211,9 @@ jobs: with: repo: pulumi/pulumictl - name: Install Pulumi CLI - uses: pulumi/action-install-pulumi-cli@v2 + uses: pulumi/actions@v4 + with: + pulumi-version: v3.77.1 - if: github.event_name == 'pull_request' name: Install Schema Tools uses: jaxxstorm/action-install-gh-release@v1.5.0 @@ -278,7 +284,9 @@ jobs: with: repo: pulumi/pulumictl - name: Install Pulumi CLI - uses: pulumi/action-install-pulumi-cli@v2 + uses: pulumi/actions@v4 + with: + pulumi-version: v3.77.1 - name: Configure AWS Credentials uses: aws-actions/configure-aws-credentials@v1 with: @@ -352,7 +360,9 @@ jobs: with: repo: pulumi/pulumictl - name: Install Pulumi CLI - uses: pulumi/action-install-pulumi-cli@v2 + uses: pulumi/actions@v4 + with: + pulumi-version: v3.77.1 - name: Setup Node uses: actions/setup-node@v2 with: diff --git a/.github/workflows/master.yml b/.github/workflows/master.yml index f8273070f90..86f364f78c3 100644 --- a/.github/workflows/master.yml +++ b/.github/workflows/master.yml @@ -56,7 +56,9 @@ jobs: with: repo: pulumi/pulumictl - name: Install Pulumi CLI - uses: pulumi/action-install-pulumi-cli@v2 + uses: pulumi/actions@v4 + with: + pulumi-version: v3.77.1 - name: Setup Node uses: actions/setup-node@v2 with: @@ -162,7 +164,9 @@ jobs: with: repo: pulumi/pulumictl - name: Install Pulumi CLI - uses: pulumi/action-install-pulumi-cli@v2 + uses: pulumi/actions@v4 + with: + pulumi-version: v3.77.1 - if: github.event_name == 'pull_request' name: Install Schema Tools uses: jaxxstorm/action-install-gh-release@v1.5.0 @@ -207,7 +211,9 @@ jobs: with: repo: pulumi/pulumictl - name: Install Pulumi CLI - uses: pulumi/action-install-pulumi-cli@v2 + uses: pulumi/actions@v4 + with: + pulumi-version: v3.77.1 - if: github.event_name == 'pull_request' name: Install Schema Tools uses: jaxxstorm/action-install-gh-release@v1.5.0 @@ -278,7 +284,9 @@ jobs: with: repo: pulumi/pulumictl - name: Install Pulumi CLI - uses: pulumi/action-install-pulumi-cli@v2 + uses: pulumi/actions@v4 + with: + pulumi-version: v3.77.1 - name: Configure AWS Credentials uses: aws-actions/configure-aws-credentials@v1 with: @@ -352,7 +360,9 @@ jobs: with: repo: pulumi/pulumictl - name: Install Pulumi CLI - uses: pulumi/action-install-pulumi-cli@v2 + uses: pulumi/actions@v4 + with: + pulumi-version: v3.77.1 - name: Setup Node uses: actions/setup-node@v2 with: diff --git a/.github/workflows/nightly-test.yml b/.github/workflows/nightly-test.yml index 55fa6dd4ac5..4156cf46542 100644 --- a/.github/workflows/nightly-test.yml +++ b/.github/workflows/nightly-test.yml @@ -56,7 +56,9 @@ jobs: with: repo: pulumi/pulumictl - name: Install Pulumi CLI - uses: pulumi/action-install-pulumi-cli@v2 + uses: pulumi/actions@v4 + with: + pulumi-version: v3.77.1 - name: Setup Node uses: actions/setup-node@v2 with: @@ -152,7 +154,9 @@ jobs: with: repo: pulumi/pulumictl - name: Install Pulumi CLI - uses: pulumi/action-install-pulumi-cli@v2 + uses: pulumi/actions@v4 + with: + pulumi-version: v3.77.1 - if: github.event_name == 'pull_request' name: Install Schema Tools uses: jaxxstorm/action-install-gh-release@v1.5.0 @@ -231,7 +235,9 @@ jobs: with: repo: pulumi/pulumictl - name: Install Pulumi CLI - uses: pulumi/action-install-pulumi-cli@v2 + uses: pulumi/actions@v4 + with: + pulumi-version: v3.77.1 - name: Setup Node uses: actions/setup-node@v2 with: diff --git a/.github/workflows/prerelease.yml b/.github/workflows/prerelease.yml index dc5aa73b909..95bcb4df997 100644 --- a/.github/workflows/prerelease.yml +++ b/.github/workflows/prerelease.yml @@ -57,7 +57,9 @@ jobs: with: repo: pulumi/pulumictl - name: Install Pulumi CLI - uses: pulumi/action-install-pulumi-cli@v2 + uses: pulumi/actions@v4 + with: + pulumi-version: v3.77.1 - name: Setup Node uses: actions/setup-node@v2 with: @@ -152,7 +154,9 @@ jobs: with: repo: pulumi/pulumictl - name: Install Pulumi CLI - uses: pulumi/action-install-pulumi-cli@v2 + uses: pulumi/actions@v4 + with: + pulumi-version: v3.77.1 - if: github.event_name == 'pull_request' name: Install Schema Tools uses: jaxxstorm/action-install-gh-release@v1.5.0 @@ -231,7 +235,9 @@ jobs: with: repo: pulumi/pulumictl - name: Install Pulumi CLI - uses: pulumi/action-install-pulumi-cli@v2 + uses: pulumi/actions@v4 + with: + pulumi-version: v3.77.1 - name: Configure AWS Credentials uses: aws-actions/configure-aws-credentials@v1 with: @@ -305,7 +311,9 @@ jobs: with: repo: pulumi/pulumictl - name: Install Pulumi CLI - uses: pulumi/action-install-pulumi-cli@v2 + uses: pulumi/actions@v4 + with: + pulumi-version: v3.77.1 - name: Setup Node uses: actions/setup-node@v2 with: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0c3af7ad8e4..9bdcccc2837 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -56,7 +56,9 @@ jobs: with: repo: pulumi/pulumictl - name: Install Pulumi CLI - uses: pulumi/action-install-pulumi-cli@v2 + uses: pulumi/actions@v4 + with: + pulumi-version: v3.77.1 - name: Setup Node uses: actions/setup-node@v2 with: @@ -165,7 +167,9 @@ jobs: with: repo: pulumi/pulumictl - name: Install Pulumi CLI - uses: pulumi/action-install-pulumi-cli@v2 + uses: pulumi/actions@v4 + with: + pulumi-version: v3.77.1 - if: github.event_name == 'pull_request' name: Install Schema Tools uses: jaxxstorm/action-install-gh-release@v1.5.0 @@ -235,7 +239,9 @@ jobs: with: repo: pulumi/pulumictl - name: Install Pulumi CLI - uses: pulumi/action-install-pulumi-cli@v2 + uses: pulumi/actions@v4 + with: + pulumi-version: v3.77.1 - name: Configure AWS Credentials uses: aws-actions/configure-aws-credentials@v1 with: @@ -324,7 +330,9 @@ jobs: with: repo: pulumi/pulumictl - name: Install Pulumi CLI - uses: pulumi/action-install-pulumi-cli@v2 + uses: pulumi/actions@v4 + with: + pulumi-version: v3.77.1 - name: Setup Node uses: actions/setup-node@v2 with: diff --git a/.github/workflows/resync-build.yml b/.github/workflows/resync-build.yml index 708713ffbc4..0aa65a5f753 100644 --- a/.github/workflows/resync-build.yml +++ b/.github/workflows/resync-build.yml @@ -60,7 +60,9 @@ jobs: with: repo: pulumi/pulumictl - name: Install Pulumi CLI - uses: pulumi/action-install-pulumi-cli@v2 + uses: pulumi/actions@v4 + with: + pulumi-version: v3.77.1 - name: Setup DotNet uses: actions/setup-dotnet@v1 with: diff --git a/.github/workflows/run-acceptance-tests.yml b/.github/workflows/run-acceptance-tests.yml index 5c89f208373..3917cc508c7 100644 --- a/.github/workflows/run-acceptance-tests.yml +++ b/.github/workflows/run-acceptance-tests.yml @@ -60,7 +60,9 @@ jobs: with: repo: pulumi/pulumictl - name: Install Pulumi CLI - uses: pulumi/action-install-pulumi-cli@v2 + uses: pulumi/actions@v4 + with: + pulumi-version: v3.77.1 - name: Setup Node uses: actions/setup-node@v2 with: @@ -174,7 +176,9 @@ jobs: with: repo: pulumi/pulumictl - name: Install Pulumi CLI - uses: pulumi/action-install-pulumi-cli@v2 + uses: pulumi/actions@v4 + with: + pulumi-version: v3.77.1 - if: github.event_name == 'pull_request' name: Install Schema Tools uses: jaxxstorm/action-install-gh-release@v1.5.0 @@ -275,7 +279,9 @@ jobs: with: repo: pulumi/pulumictl - name: Install Pulumi CLI - uses: pulumi/action-install-pulumi-cli@v2 + uses: pulumi/actions@v4 + with: + pulumi-version: v3.77.1 - name: Setup Node uses: actions/setup-node@v2 with: diff --git a/.github/workflows/update-bridge.yml b/.github/workflows/update-bridge.yml index 7c80710300d..0be09654118 100644 --- a/.github/workflows/update-bridge.yml +++ b/.github/workflows/update-bridge.yml @@ -26,7 +26,9 @@ jobs: with: repo: pulumi/pulumictl - name: Install Pulumi CLI - uses: pulumi/action-install-pulumi-cli@v2 + uses: pulumi/actions@v4 + with: + pulumi-version: v3.77.1 - name: Setup DotNet uses: actions/setup-dotnet@v1 with: From e2179edd6f61a6bb4aee71a3be5403e5fc7162f6 Mon Sep 17 00:00:00 2001 From: Ian Wahbe Date: Fri, 25 Aug 2023 13:14:54 -0700 Subject: [PATCH 7/8] Ordering change from https://github.com/pulumi/ci-mgmt/pull/518/commits/0e7a98ddb312f3d4b1c4eceb1d0a9bb556dcf9fc --- .github/workflows/run-acceptance-tests.yml | 4 ++-- scripts/upstream.sh | 6 +++++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/run-acceptance-tests.yml b/.github/workflows/run-acceptance-tests.yml index 3917cc508c7..07b58d1251c 100644 --- a/.github/workflows/run-acceptance-tests.yml +++ b/.github/workflows/run-acceptance-tests.yml @@ -156,8 +156,8 @@ jobs: - name: Checkout Repo uses: actions/checkout@v3 with: - submodules: true ref: ${{ env.PR_COMMIT_SHA }} + submodules: true - name: Checkout Scripts Repo uses: actions/checkout@v3 with: @@ -259,8 +259,8 @@ jobs: - name: Checkout Repo uses: actions/checkout@v3 with: - submodules: true ref: ${{ env.PR_COMMIT_SHA }} + submodules: true - name: Checkout Scripts Repo uses: actions/checkout@v3 with: diff --git a/scripts/upstream.sh b/scripts/upstream.sh index 7c1933f6877..eddab76e9f1 100644 --- a/scripts/upstream.sh +++ b/scripts/upstream.sh @@ -86,7 +86,11 @@ start_rebase() { fi git branch -f local - git checkout -B pulumi-patch "${FROM}" + if [ -n "$FROM" ]; then + git checkout -B pulumi-patch "$FROM" + else + git checkout -B pulumi-patch + fi git branch --set-upstream-to=local pulumi-patch for patch in ../patches/*.patch; do From 0bfff32913ad1ebbe9304843b7b8ff1d5fddd5bd Mon Sep 17 00:00:00 2001 From: Ian Wahbe Date: Fri, 25 Aug 2023 14:07:01 -0700 Subject: [PATCH 8/8] Add back go_test_shim This relies on https://github.com/pulumi/ci-mgmt/pull/518/commits/fa795bc38772e9cfdb8094218c81a88f7349836b and https://github.com/pulumi/ci-mgmt/pull/518/commits/727247e4935aa9f358e710b32319a0a6c919018b from https://github.com/pulumi/ci-mgmt/pull/518. --- .github/workflows/main.yml | 24 +++++++++++++++++++++- .github/workflows/master.yml | 24 +++++++++++++++++++++- .github/workflows/prerelease.yml | 24 +++++++++++++++++++++- .github/workflows/release.yml | 24 +++++++++++++++++++++- .github/workflows/run-acceptance-tests.yml | 21 +++++++++++++++++++ 5 files changed, 113 insertions(+), 4 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 7a69113c92c..74105492c09 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -264,7 +264,9 @@ jobs: status: ${{ job.status }} publish: name: publish - needs: test + needs: + - test + - go_test_shim runs-on: pulumi-ubuntu-8core steps: - name: Checkout Repo @@ -447,6 +449,26 @@ jobs: - dotnet - go - java + go_test_shim: + if: github.event_name == 'repository_dispatch' || github.event.pull_request.head.repo.full_name == github.repository + name: Run test of provider shim + runs-on: ubuntu-latest + steps: + - name: Checkout Repo + uses: actions/checkout@v3 + with: + ref: ${{ env.PR_COMMIT_SHA }} + submodules: true + - uses: actions/setup-go@v4 + with: + cache-dependency-path: provider/shim/go.sum + go-version-file: provider/shim/go.mod + - name: go test + run: | + cd provider/shim + go test -v . + timeout-minutes: 60 + name: main on: push: diff --git a/.github/workflows/master.yml b/.github/workflows/master.yml index 86f364f78c3..7d0838fcc8b 100644 --- a/.github/workflows/master.yml +++ b/.github/workflows/master.yml @@ -264,7 +264,9 @@ jobs: status: ${{ job.status }} publish: name: publish - needs: test + needs: + - test + - go_test_shim runs-on: pulumi-ubuntu-8core steps: - name: Checkout Repo @@ -447,6 +449,26 @@ jobs: - dotnet - go - java + go_test_shim: + if: github.event_name == 'repository_dispatch' || github.event.pull_request.head.repo.full_name == github.repository + name: Run test of provider shim + runs-on: ubuntu-latest + steps: + - name: Checkout Repo + uses: actions/checkout@v3 + with: + ref: ${{ env.PR_COMMIT_SHA }} + submodules: true + - uses: actions/setup-go@v4 + with: + cache-dependency-path: provider/shim/go.sum + go-version-file: provider/shim/go.mod + - name: go test + run: | + cd provider/shim + go test -v . + timeout-minutes: 60 + name: master on: push: diff --git a/.github/workflows/prerelease.yml b/.github/workflows/prerelease.yml index 95bcb4df997..2dc5141dd20 100644 --- a/.github/workflows/prerelease.yml +++ b/.github/workflows/prerelease.yml @@ -215,7 +215,9 @@ jobs: status: ${{ job.status }} publish: name: publish - needs: test + needs: + - test + - go_test_shim runs-on: pulumi-ubuntu-8core steps: - name: Checkout Repo @@ -398,6 +400,26 @@ jobs: - dotnet - go - java + go_test_shim: + if: github.event_name == 'repository_dispatch' || github.event.pull_request.head.repo.full_name == github.repository + name: Run test of provider shim + runs-on: ubuntu-latest + steps: + - name: Checkout Repo + uses: actions/checkout@v3 + with: + ref: ${{ env.PR_COMMIT_SHA }} + submodules: true + - uses: actions/setup-go@v4 + with: + cache-dependency-path: provider/shim/go.sum + go-version-file: provider/shim/go.mod + - name: go test + run: | + cd provider/shim + go test -v . + timeout-minutes: 60 + name: prerelease on: push: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9bdcccc2837..10b134eea9a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -219,7 +219,9 @@ jobs: status: ${{ job.status }} publish: name: publish - needs: test + needs: + - test + - go_test_shim runs-on: pulumi-ubuntu-8core steps: - name: Checkout Repo @@ -417,6 +419,26 @@ jobs: - dotnet - go - java + go_test_shim: + if: github.event_name == 'repository_dispatch' || github.event.pull_request.head.repo.full_name == github.repository + name: Run test of provider shim + runs-on: ubuntu-latest + steps: + - name: Checkout Repo + uses: actions/checkout@v3 + with: + ref: ${{ env.PR_COMMIT_SHA }} + submodules: true + - uses: actions/setup-go@v4 + with: + cache-dependency-path: provider/shim/go.sum + go-version-file: provider/shim/go.mod + - name: go test + run: | + cd provider/shim + go test -v . + timeout-minutes: 60 + name: release on: push: diff --git a/.github/workflows/run-acceptance-tests.yml b/.github/workflows/run-acceptance-tests.yml index 07b58d1251c..5c15ffdf186 100644 --- a/.github/workflows/run-acceptance-tests.yml +++ b/.github/workflows/run-acceptance-tests.yml @@ -242,6 +242,7 @@ jobs: name: sentinel needs: - test + - go_test_shim runs-on: ubuntu-latest steps: - name: Is workflow a success @@ -366,6 +367,26 @@ jobs: - dotnet - go - java + go_test_shim: + if: github.event_name == 'repository_dispatch' || github.event.pull_request.head.repo.full_name == github.repository + name: Run test of provider shim + runs-on: ubuntu-latest + steps: + - name: Checkout Repo + uses: actions/checkout@v3 + with: + ref: ${{ env.PR_COMMIT_SHA }} + submodules: true + - uses: actions/setup-go@v4 + with: + cache-dependency-path: provider/shim/go.sum + go-version-file: provider/shim/go.mod + - name: go test + run: | + cd provider/shim + go test -v . + timeout-minutes: 60 + name: run-acceptance-tests on: pull_request: