From d1dcc97cbfd0212d801a0fdb94f5f1d1e99c8380 Mon Sep 17 00:00:00 2001 From: Guinevere Saenger Date: Fri, 21 Jun 2024 13:09:17 -0700 Subject: [PATCH] Revert "Update GitHub Actions workflows." (#391) Reverts pulumi/pulumi-splunk#386. This is a confidence screen to gather more information for https://github.com/pulumi/pulumi-splunk/issues/387. These tests are unlikely to pass, so I will force merge this revert. --- .github/actions/setup-tools/action.yml | 80 ---------------------- .github/workflows/build_sdk.yml | 52 +++++++------- .github/workflows/master.yml | 8 +-- .github/workflows/prerelease.yml | 6 +- .github/workflows/prerequisites.yml | 45 ++++++------ .github/workflows/release.yml | 6 +- .github/workflows/resync-build.yml | 2 +- .github/workflows/run-acceptance-tests.yml | 40 ++++++++++- 8 files changed, 95 insertions(+), 144 deletions(-) delete mode 100644 .github/actions/setup-tools/action.yml diff --git a/.github/actions/setup-tools/action.yml b/.github/actions/setup-tools/action.yml deleted file mode 100644 index a3f170c8..00000000 --- a/.github/actions/setup-tools/action.yml +++ /dev/null @@ -1,80 +0,0 @@ -name: Setup tools -description: Installs Go, Pulumi, pulumictl, schema-tools, Node.JS, Python, dotnet and Java. - -inputs: - tools: - description: | - Comma separated list of tools to install. The default of "all" installs all tools. Available tools are: - go - pulumicli - pulumictl - schema-tools - node - python - dotnet - java - default: all - -runs: - using: "composite" - steps: - - name: Install Go - if: inputs.tools == 'all' || contains(inputs.tools, 'go') - uses: actions/setup-go@v5 - with: - go-version: "1.21.x" - cache-dependency-path: | - provider/*.sum - upstream/*.sum - - - name: Install pulumictl - if: inputs.tools == 'all' || contains(inputs.tools, 'pulumictl') - uses: jaxxstorm/action-install-gh-release@v1.11.0 - with: - tag: v0.0.46 - repo: pulumi/pulumictl - - - name: Install Pulumi CLI - if: inputs.tools == 'all' || contains(inputs.tools, 'pulumicli') - uses: pulumi/actions@v5 - with: - pulumi-version: "dev" - - - name: Install Schema Tools - if: inputs.tools == 'all' || contains(inputs.tools, 'schema-tools') - uses: jaxxstorm/action-install-gh-release@v1.11.0 - with: - repo: pulumi/schema-tools - - - name: Setup Node - if: inputs.tools == 'all' || contains(inputs.tools, 'node') - uses: actions/setup-node@v4 - with: - node-version: 20.x - registry-url: https://registry.npmjs.org - - - name: Setup DotNet - if: inputs.tools == 'all' || contains(inputs.tools, 'dotnet') - uses: actions/setup-dotnet@v4 - with: - dotnet-version: 6.0.x - - - name: Setup Python - if: inputs.tools == 'all' || contains(inputs.tools, 'python') - uses: actions/setup-python@v5 - with: - python-version: 3.11.8 - - - name: Setup Java - if: inputs.tools == 'all' || contains(inputs.tools, 'java') - uses: actions/setup-java@v4 - with: - cache: gradle - distribution: temurin - java-version: 11 - - - name: Setup Gradle - if: inputs.tools == 'all' || contains(inputs.tools, 'java') - uses: gradle/gradle-build-action@v3 - with: - gradle-version: 7.6 diff --git a/.github/workflows/build_sdk.yml b/.github/workflows/build_sdk.yml index 5434f6fa..85d36ef3 100644 --- a/.github/workflows/build_sdk.yml +++ b/.github/workflows/build_sdk.yml @@ -3,28 +3,6 @@ name: "Build SDK" on: workflow_call: {} -env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} - 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 - PYPI_PASSWORD: ${{ secrets.PYPI_API_TOKEN }} - PYPI_USERNAME: __token__ - 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 }} - SPLUNK_PASSWORD: password - SPLUNK_URL: localhost:8089 - SPLUNK_USERNAME: admin - TF_APPEND_USER_AGENT: pulumi - jobs: build_sdk: name: build_sdk @@ -50,10 +28,34 @@ jobs: path: | .pulumi/examples-cache key: ${{ runner.os }}-${{ hashFiles('provider/go.sum') }} - - name: Setup tools - uses: ./.github/actions/setup-tools + - name: Install pulumictl + uses: jaxxstorm/action-install-gh-release@v1.11.0 + with: + tag: v0.0.46 + repo: pulumi/pulumictl + - name: Setup Node + uses: actions/setup-node@v4 + with: + node-version: 20.x + registry-url: https://registry.npmjs.org + - name: Setup DotNet + uses: actions/setup-dotnet@v4 + with: + dotnet-version: 6.0.x + - name: Setup Python + uses: actions/setup-python@v5 + with: + python-version: 3.11.8 + - name: Setup Java + uses: actions/setup-java@v4 + with: + cache: gradle + distribution: temurin + java-version: 11 + - name: Setup Gradle + uses: gradle/gradle-build-action@v3 with: - tools: pulumictl, pulumicli, go, node, dotnet, python, java + gradle-version: 7.6 - name: Download provider + tfgen binaries uses: actions/download-artifact@v4 with: diff --git a/.github/workflows/master.yml b/.github/workflows/master.yml index 9fd22da5..b8b86966 100644 --- a/.github/workflows/master.yml +++ b/.github/workflows/master.yml @@ -63,7 +63,7 @@ jobs: - name: Install Pulumi CLI uses: pulumi/actions@v5 with: - pulumi-version: "dev" + pulumi-version: "^3" - if: github.event_name == 'pull_request' name: Install Schema Tools uses: jaxxstorm/action-install-gh-release@v1.11.0 @@ -128,7 +128,7 @@ jobs: - name: Install Pulumi CLI uses: pulumi/actions@v5 with: - pulumi-version: "dev" + pulumi-version: "^3" - name: Configure AWS Credentials uses: aws-actions/configure-aws-credentials@v4 with: @@ -165,7 +165,7 @@ jobs: - id: version uses: pulumi/provider-version-action@v1 - name: Publish SDKs - uses: pulumi/pulumi-package-publisher@v0.0.18 + uses: pulumi/pulumi-package-publisher@v0.0.17 with: sdk: all version: ${{ steps.version.outputs.version }} @@ -229,7 +229,7 @@ jobs: - name: Install Pulumi CLI uses: pulumi/actions@v5 with: - pulumi-version: "dev" + pulumi-version: "^3" - name: Setup Node uses: actions/setup-node@v4 with: diff --git a/.github/workflows/prerelease.yml b/.github/workflows/prerelease.yml index 9d166544..78745a8d 100644 --- a/.github/workflows/prerelease.yml +++ b/.github/workflows/prerelease.yml @@ -75,7 +75,7 @@ jobs: - name: Install Pulumi CLI uses: pulumi/actions@v5 with: - pulumi-version: "dev" + pulumi-version: "^3" - name: Configure AWS Credentials uses: aws-actions/configure-aws-credentials@v4 with: @@ -112,7 +112,7 @@ jobs: - id: version uses: pulumi/provider-version-action@v1 - name: Publish SDKs - uses: pulumi/pulumi-package-publisher@v0.0.18 + uses: pulumi/pulumi-package-publisher@v0.0.17 with: sdk: all version: ${{ steps.version.outputs.version }} @@ -194,7 +194,7 @@ jobs: - name: Install Pulumi CLI uses: pulumi/actions@v5 with: - pulumi-version: "dev" + pulumi-version: "^3" - name: Setup Node uses: actions/setup-node@v4 with: diff --git a/.github/workflows/prerequisites.yml b/.github/workflows/prerequisites.yml index c629348b..656ae429 100644 --- a/.github/workflows/prerequisites.yml +++ b/.github/workflows/prerequisites.yml @@ -13,28 +13,6 @@ on: type: string required: true -env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} - 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 - PYPI_PASSWORD: ${{ secrets.PYPI_API_TOKEN }} - PYPI_USERNAME: __token__ - 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 }} - SPLUNK_PASSWORD: password - SPLUNK_URL: localhost:8089 - SPLUNK_USERNAME: admin - TF_APPEND_USER_AGENT: pulumi - jobs: prerequisites: name: prerequisites @@ -53,10 +31,27 @@ jobs: key: ${{ runner.os }}-${{ hashFiles('provider/go.sum') }} - name: Prepare upstream code run: make upstream - - name: Setup tools - uses: ./.github/actions/setup-tools + - name: Install Go + uses: actions/setup-go@v5 + with: + go-version: "1.21.x" + cache-dependency-path: | + provider/*.sum + upstream/*.sum + - name: Install pulumictl + uses: jaxxstorm/action-install-gh-release@v1.11.0 + with: + tag: v0.0.46 + repo: pulumi/pulumictl + - name: Install Pulumi CLI + uses: pulumi/actions@v5 + with: + pulumi-version: "^3" + - if: inputs.is_pr + name: Install Schema Tools + uses: jaxxstorm/action-install-gh-release@v1.11.0 with: - tools: go, pulumictl, pulumicli, schema-tools + repo: pulumi/schema-tools - name: Build schema generator binary run: make tfgen_build_only - name: Install plugins diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 195689f5..a890b0c8 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -91,7 +91,7 @@ jobs: - name: Install Pulumi CLI uses: pulumi/actions@v5 with: - pulumi-version: "dev" + pulumi-version: "^3" - name: Configure AWS Credentials uses: aws-actions/configure-aws-credentials@v4 with: @@ -127,7 +127,7 @@ jobs: - id: version uses: pulumi/provider-version-action@v1 - name: Publish SDKs - uses: pulumi/pulumi-package-publisher@v0.0.18 + uses: pulumi/pulumi-package-publisher@v0.0.17 with: sdk: all version: ${{ steps.version.outputs.version }} @@ -227,7 +227,7 @@ jobs: - name: Install Pulumi CLI uses: pulumi/actions@v5 with: - pulumi-version: "dev" + pulumi-version: "^3" - name: Setup Node uses: actions/setup-node@v4 with: diff --git a/.github/workflows/resync-build.yml b/.github/workflows/resync-build.yml index 2f9b9647..231fe5bf 100644 --- a/.github/workflows/resync-build.yml +++ b/.github/workflows/resync-build.yml @@ -52,7 +52,7 @@ jobs: - name: Install Pulumi CLI uses: pulumi/actions@v5 with: - pulumi-version: "dev" + pulumi-version: "^3" - name: Setup DotNet uses: actions/setup-dotnet@v4 with: diff --git a/.github/workflows/run-acceptance-tests.yml b/.github/workflows/run-acceptance-tests.yml index 35219aab..b4ae1017 100644 --- a/.github/workflows/run-acceptance-tests.yml +++ b/.github/workflows/run-acceptance-tests.yml @@ -112,10 +112,44 @@ jobs: with: repository: pulumi/examples path: p-examples - - name: Setup tools - uses: ./.github/actions/setup-tools + - name: Install Go + uses: actions/setup-go@v5 with: - tools: pulumictl, pulumicli, go, node, dotnet, python, java + go-version: "1.21.x" + cache-dependency-path: | + sdk/go.sum + - name: Install pulumictl + uses: jaxxstorm/action-install-gh-release@v1.11.0 + with: + tag: v0.0.46 + repo: pulumi/pulumictl + - name: Install Pulumi CLI + uses: pulumi/actions@v5 + with: + pulumi-version: "^3" + - name: Setup Node + uses: actions/setup-node@v4 + with: + node-version: "20.x" + registry-url: https://registry.npmjs.org + - name: Setup DotNet + uses: actions/setup-dotnet@v4 + with: + dotnet-version: "6.0.x" + - name: Setup Python + uses: actions/setup-python@v5 + with: + python-version: "3.11.8" + - name: Setup Java + uses: actions/setup-java@v4 + with: + cache: gradle + distribution: temurin + java-version: "11" + - name: Setup Gradle + uses: gradle/gradle-build-action@v3 + with: + gradle-version: "7.6" - name: Download provider + tfgen binaries uses: actions/download-artifact@v4 with: