diff --git a/provider-ci/internal/pkg/templates/bridged-provider/.github/workflows/build_sdk.yml b/provider-ci/internal/pkg/templates/bridged-provider/.github/workflows/build_sdk.yml new file mode 100644 index 000000000..a98665e50 --- /dev/null +++ b/provider-ci/internal/pkg/templates/bridged-provider/.github/workflows/build_sdk.yml @@ -0,0 +1,101 @@ +name: "Build SDK" + +on: + workflow_call: {} + +jobs: + build_sdk: + name: build_sdk + runs-on: #{{ if .Config.runner.buildSdk }}##{{- .Config.runner.buildSdk }}##{{ else }}##{{- .Config.runner.default }}##{{ end }}# + strategy: + fail-fast: true + matrix: + language: + - nodejs + - python + - dotnet + - go + - java + steps: + - name: Checkout Repo + uses: #{{ .Config.actionVersions.checkout }}# +#{{- if .Config.checkoutSubmodules }}# + with: + submodules: #{{ .Config.checkoutSubmodules }}# +#{{- end }}# + - uses: pulumi/provider-version-action@v1 + with: + set-env: 'PROVIDER_VERSION' + - name: Cache examples generation + uses: actions/cache@v4 + with: + path: | + .pulumi/examples-cache + key: ${{ runner.os }}-${{ hashFiles('provider/go.sum') }} + - name: Install pulumictl + uses: #{{ .Config.actionVersions.installGhRelease }}# + with: + tag: #{{ .Config.actionVersions.pulumictlTag }}# + repo: pulumi/pulumictl + - name: Setup Node + uses: #{{ .Config.actionVersions.setupNode }}# + with: + node-version: #{{ .Config.env.NODEVERSION }}# + registry-url: https://registry.npmjs.org + - name: Setup DotNet + uses: #{{ .Config.actionVersions.setupDotNet }}# + with: + dotnet-version: #{{ .Config.env.DOTNETVERSION | toYaml | indent 8 }}# + - name: Setup Python + uses: #{{ .Config.actionVersions.setupPython }}# + with: + python-version: #{{ .Config.env.PYTHONVERSION }}# + - name: Setup Java + uses: #{{ .Config.actionVersions.setupJava }}# + with: + cache: gradle + distribution: temurin + java-version: #{{ .Config.env.JAVAVERSION }}# + - name: Setup Gradle + uses: #{{ .Config.actionVersions.setupGradle }}# + with: + gradle-version: #{{ .Config.env.GRADLEVERSION }}# + - name: Download provider + tfgen binaries + uses: #{{ .Config.actionVersions.downloadArtifact }}# + with: + name: #{{ .Config.provider }}#-provider.tar.gz + path: ${{ github.workspace }}/bin + - name: Untar provider binaries + run: >- + tar -zxf ${{ github.workspace }}/bin/provider.tar.gz -C ${{ + github.workspace}}/bin + + find ${{ github.workspace }} -name "pulumi-*-#{{ .Config.provider }}#" -print -exec chmod +x {} \; + - name: Install plugins + run: make install_plugins + - name: Update path + run: echo "${{ github.workspace }}/bin" >> "$GITHUB_PATH" + - name: Build SDK + run: make build_${{ matrix.language }} + - name: Check worktree clean + uses: pulumi/git-status-check-action@v1 +#{{- if .Config.worktreeAllowedChanges }}# + with: + allowed-changes: | +#{{ .Config.worktreeAllowedChanges | indent 12 }}# +#{{- end }}# + - name: Compress SDK folder + run: tar -zcf sdk/${{ matrix.language }}.tar.gz -C sdk/${{ matrix.language }} . + - name: Upload artifacts + uses: #{{ .Config.actionVersions.uploadArtifact }}# + with: + name: ${{ matrix.language }}-sdk.tar.gz + path: ${{ github.workspace}}/sdk/${{ matrix.language }}.tar.gz + retention-days: 30 + - if: failure() && github.event_name == 'push' + name: Notify Slack + uses: #{{ .Config.actionVersions.notifySlack }}# + with: + author_name: Failure in building ${{ matrix.language }} sdk + fields: repo,commit,author,action + status: ${{ job.status }} diff --git a/provider-ci/internal/pkg/templates/bridged-provider/.github/workflows/main.yml b/provider-ci/internal/pkg/templates/bridged-provider/.github/workflows/main.yml index ef1760713..3d48dd7bd 100644 --- a/provider-ci/internal/pkg/templates/bridged-provider/.github/workflows/main.yml +++ b/provider-ci/internal/pkg/templates/bridged-provider/.github/workflows/main.yml @@ -6,15 +6,9 @@ jobs: build_sdk: name: build_sdk needs: prerequisites - runs-on: #{{ if .Config.runner.buildSdk }}##{{- .Config.runner.buildSdk }}##{{ else }}##{{- .Config.runner.default }}##{{ end }}# - steps: - - name: Checkout Repo - uses: #{{ .Config.actionVersions.checkout }}# -#{{- if .Config.checkoutSubmodules }}# - with: - submodules: #{{ .Config.checkoutSubmodules }}# -#{{- end }}# -#{{ .Splices.build_sdk }}# + uses: ./.github/workflows/build_sdk.yml + secrets: inherit + generate_coverage_data: continue-on-error: true env: diff --git a/provider-ci/internal/pkg/templates/bridged-provider/.github/workflows/nightly-test.yml b/provider-ci/internal/pkg/templates/bridged-provider/.github/workflows/nightly-test.yml index 8fdc697f1..fdfd6fbb9 100644 --- a/provider-ci/internal/pkg/templates/bridged-provider/.github/workflows/nightly-test.yml +++ b/provider-ci/internal/pkg/templates/bridged-provider/.github/workflows/nightly-test.yml @@ -7,15 +7,9 @@ jobs: build_sdk: name: build_sdk needs: prerequisites - runs-on: #{{ if .Config.runner.buildSdk }}##{{- .Config.runner.buildSdk }}##{{ else }}##{{- .Config.runner.default }}##{{ end }}# - steps: - - name: Checkout Repo - uses: #{{ .Config.actionVersions.checkout }}# -#{{- if .Config.checkoutSubmodules }}# - with: - submodules: #{{ .Config.checkoutSubmodules }}# -#{{- end }}# -#{{ .Splices.build_sdk }}# + uses: ./.github/workflows/build_sdk.yml + secrets: inherit + prerequisites: uses: ./.github/workflows/prerequisites.yml secrets: inherit diff --git a/provider-ci/internal/pkg/templates/bridged-provider/.github/workflows/prerelease.yml b/provider-ci/internal/pkg/templates/bridged-provider/.github/workflows/prerelease.yml index 41f259a59..b2ce1faa5 100644 --- a/provider-ci/internal/pkg/templates/bridged-provider/.github/workflows/prerelease.yml +++ b/provider-ci/internal/pkg/templates/bridged-provider/.github/workflows/prerelease.yml @@ -7,15 +7,9 @@ jobs: build_sdk: name: build_sdk needs: prerequisites - runs-on: #{{ if .Config.runner.buildSdk }}##{{- .Config.runner.buildSdk }}##{{ else }}##{{- .Config.runner.default }}##{{ end }}# - steps: - - name: Checkout Repo - uses: #{{ .Config.actionVersions.checkout }}# -#{{- if .Config.checkoutSubmodules }}# - with: - submodules: #{{ .Config.checkoutSubmodules }}# -#{{- end }}# -#{{ .Splices.build_sdk }}# + uses: ./.github/workflows/build_sdk.yml + secrets: inherit + #{{ if .Config.lint -}}# lint: name: lint diff --git a/provider-ci/internal/pkg/templates/bridged-provider/.github/workflows/release.yml b/provider-ci/internal/pkg/templates/bridged-provider/.github/workflows/release.yml index 4ff4aebb2..97246e81d 100644 --- a/provider-ci/internal/pkg/templates/bridged-provider/.github/workflows/release.yml +++ b/provider-ci/internal/pkg/templates/bridged-provider/.github/workflows/release.yml @@ -6,15 +6,9 @@ jobs: build_sdk: name: build_sdk needs: prerequisites - runs-on: #{{ if .Config.runner.buildSdk }}##{{- .Config.runner.buildSdk }}##{{ else }}##{{- .Config.runner.default }}##{{ end }}# - steps: - - name: Checkout Repo - uses: #{{ .Config.actionVersions.checkout }}# -#{{- if .Config.checkoutSubmodules }}# - with: - submodules: #{{ .Config.checkoutSubmodules }}# -#{{- end }}# -#{{ .Splices.build_sdk }}# + uses: ./.github/workflows/build_sdk.yml + secrets: inherit + #{{ if .Config.publishRegistry -}}# create_docs_build: name: create_docs_build diff --git a/provider-ci/internal/pkg/templates/bridged-provider/.github/workflows/run-acceptance-tests.yml b/provider-ci/internal/pkg/templates/bridged-provider/.github/workflows/run-acceptance-tests.yml index 48d6083d5..c1a693c04 100644 --- a/provider-ci/internal/pkg/templates/bridged-provider/.github/workflows/run-acceptance-tests.yml +++ b/provider-ci/internal/pkg/templates/bridged-provider/.github/workflows/run-acceptance-tests.yml @@ -14,16 +14,9 @@ jobs: github.event.pull_request.head.repo.full_name == github.repository name: build_sdk needs: prerequisites - runs-on: #{{ if .Config.runner.buildSdk }}##{{- .Config.runner.buildSdk }}##{{ else }}##{{- .Config.runner.default }}##{{ end }}# - steps: - - name: Checkout Repo - uses: #{{ .Config.actionVersions.checkout }}# - with: - ref: ${{ env.PR_COMMIT_SHA }} - #{{- if .Config.checkoutSubmodules }}# - submodules: #{{ .Config.checkoutSubmodules }}# - #{{- end }}# -#{{ .Splices.build_sdk }}# + uses: ./.github/workflows/build_sdk.yml + secrets: inherit + comment-notification: if: github.event_name == 'repository_dispatch' name: comment-notification diff --git a/provider-ci/test-workflows/aws/.github/workflows/build_sdk.yml b/provider-ci/test-workflows/aws/.github/workflows/build_sdk.yml new file mode 100644 index 000000000..76e7e4b54 --- /dev/null +++ b/provider-ci/test-workflows/aws/.github/workflows/build_sdk.yml @@ -0,0 +1,101 @@ +name: "Build SDK" + +on: + workflow_call: {} + +jobs: + build_sdk: + name: build_sdk + runs-on: pulumi-ubuntu-8core + strategy: + fail-fast: true + matrix: + language: + - nodejs + - python + - dotnet + - go + - java + steps: + - name: Checkout Repo + uses: actions/checkout@v4 + with: + submodules: true + - uses: pulumi/provider-version-action@v1 + with: + set-env: 'PROVIDER_VERSION' + - name: Cache examples generation + uses: actions/cache@v4 + with: + path: | + .pulumi/examples-cache + key: ${{ runner.os }}-${{ hashFiles('provider/go.sum') }} + - 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: + registry-url: https://registry.npmjs.org + - name: Setup DotNet + uses: actions/setup-dotnet@v4 + with: + dotnet-version: null + - name: Setup Python + uses: actions/setup-python@v5 + with: + python-version: + - name: Setup Java + uses: actions/setup-java@v4 + with: + cache: gradle + distribution: temurin + java-version: + - name: Setup Gradle + uses: gradle/gradle-build-action@v3 + with: + gradle-version: + - name: Download provider + tfgen binaries + uses: actions/download-artifact@v4 + with: + name: aws-provider.tar.gz + path: ${{ github.workspace }}/bin + - name: Untar provider binaries + run: >- + tar -zxf ${{ github.workspace }}/bin/provider.tar.gz -C ${{ + github.workspace}}/bin + + find ${{ github.workspace }} -name "pulumi-*-aws" -print -exec chmod +x {} \; + - name: Install plugins + run: make install_plugins + - name: Update path + run: echo "${{ github.workspace }}/bin" >> "$GITHUB_PATH" + - name: Build SDK + run: make build_${{ matrix.language }} + - name: Check worktree clean + uses: pulumi/git-status-check-action@v1 + with: + allowed-changes: | + sdk/**/pulumi-plugin.json + sdk/dotnet/Pulumi.*.csproj + sdk/go/**/pulumiUtilities.go + sdk/nodejs/package.json + sdk/python/pyproject.toml + - name: Compress SDK folder + run: tar -zcf sdk/${{ matrix.language }}.tar.gz -C sdk/${{ matrix.language }} . + - name: Upload artifacts + uses: actions/upload-artifact@v4 + with: + name: ${{ matrix.language }}-sdk.tar.gz + path: ${{ github.workspace}}/sdk/${{ matrix.language }}.tar.gz + retention-days: 30 + - if: failure() && github.event_name == 'push' + name: Notify Slack + uses: 8398a7/action-slack@v3 + with: + author_name: Failure in building ${{ matrix.language }} sdk + fields: repo,commit,author,action + status: ${{ job.status }} diff --git a/provider-ci/test-workflows/aws/.github/workflows/master.yml b/provider-ci/test-workflows/aws/.github/workflows/master.yml index 106709cfd..9bbe8c6bc 100644 --- a/provider-ci/test-workflows/aws/.github/workflows/master.yml +++ b/provider-ci/test-workflows/aws/.github/workflows/master.yml @@ -24,109 +24,8 @@ jobs: build_sdk: name: build_sdk needs: prerequisites - runs-on: pulumi-ubuntu-8core - steps: - - name: Checkout Repo - uses: actions/checkout@v4 - with: - submodules: true - - uses: pulumi/provider-version-action@v1 - with: - set-env: 'PROVIDER_VERSION' - - name: Install Go - uses: actions/setup-go@v5 - with: - go-version: "1.21.x" - cache-dependency-path: | - sdk/go.sum - - name: Cache examples generation - uses: actions/cache@v4 - with: - path: | - .pulumi/examples-cache - key: ${{ runner.os }}-${{ hashFiles('provider/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: - name: aws-provider.tar.gz - path: ${{ github.workspace }}/bin - - name: Untar provider binaries - run: >- - tar -zxf ${{ github.workspace }}/bin/provider.tar.gz -C ${{ - github.workspace}}/bin - - find ${{ github.workspace }} -name "pulumi-*-aws" -print -exec chmod +x {} \; - - name: Install plugins - run: make install_plugins - - name: Update path - run: echo "${{ github.workspace }}/bin" >> "$GITHUB_PATH" - - name: Build SDK - run: make build_${{ matrix.language }} - - name: Check worktree clean - uses: pulumi/git-status-check-action@v1 - with: - allowed-changes: | - sdk/**/pulumi-plugin.json - sdk/dotnet/Pulumi.*.csproj - sdk/go/**/pulumiUtilities.go - sdk/nodejs/package.json - sdk/python/pyproject.toml - - name: Compress SDK folder - run: tar -zcf sdk/${{ matrix.language }}.tar.gz -C sdk/${{ matrix.language }} . - - name: Upload artifacts - uses: actions/upload-artifact@v4 - with: - name: ${{ matrix.language }}-sdk.tar.gz - path: ${{ github.workspace}}/sdk/${{ matrix.language }}.tar.gz - retention-days: 30 - - if: failure() && github.event_name == 'push' - name: Notify Slack - uses: 8398a7/action-slack@v3 - with: - author_name: Failure in building ${{ matrix.language }} sdk - fields: repo,commit,author,action - status: ${{ job.status }} - strategy: - fail-fast: true - matrix: - language: - - nodejs - - python - - dotnet - - go - - java + uses: ./.github/workflows/build_sdk.yml + secrets: inherit generate_coverage_data: continue-on-error: true diff --git a/provider-ci/test-workflows/aws/.github/workflows/nightly-test.yml b/provider-ci/test-workflows/aws/.github/workflows/nightly-test.yml index 4e4af1d3d..3694d8bdd 100644 --- a/provider-ci/test-workflows/aws/.github/workflows/nightly-test.yml +++ b/provider-ci/test-workflows/aws/.github/workflows/nightly-test.yml @@ -24,109 +24,8 @@ jobs: build_sdk: name: build_sdk needs: prerequisites - runs-on: pulumi-ubuntu-8core - steps: - - name: Checkout Repo - uses: actions/checkout@v4 - with: - submodules: true - - uses: pulumi/provider-version-action@v1 - with: - set-env: 'PROVIDER_VERSION' - - name: Install Go - uses: actions/setup-go@v5 - with: - go-version: "1.21.x" - cache-dependency-path: | - sdk/go.sum - - name: Cache examples generation - uses: actions/cache@v4 - with: - path: | - .pulumi/examples-cache - key: ${{ runner.os }}-${{ hashFiles('provider/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: - name: aws-provider.tar.gz - path: ${{ github.workspace }}/bin - - name: Untar provider binaries - run: >- - tar -zxf ${{ github.workspace }}/bin/provider.tar.gz -C ${{ - github.workspace}}/bin - - find ${{ github.workspace }} -name "pulumi-*-aws" -print -exec chmod +x {} \; - - name: Install plugins - run: make install_plugins - - name: Update path - run: echo "${{ github.workspace }}/bin" >> "$GITHUB_PATH" - - name: Build SDK - run: make build_${{ matrix.language }} - - name: Check worktree clean - uses: pulumi/git-status-check-action@v1 - with: - allowed-changes: | - sdk/**/pulumi-plugin.json - sdk/dotnet/Pulumi.*.csproj - sdk/go/**/pulumiUtilities.go - sdk/nodejs/package.json - sdk/python/pyproject.toml - - name: Compress SDK folder - run: tar -zcf sdk/${{ matrix.language }}.tar.gz -C sdk/${{ matrix.language }} . - - name: Upload artifacts - uses: actions/upload-artifact@v4 - with: - name: ${{ matrix.language }}-sdk.tar.gz - path: ${{ github.workspace}}/sdk/${{ matrix.language }}.tar.gz - retention-days: 30 - - if: failure() && github.event_name == 'push' - name: Notify Slack - uses: 8398a7/action-slack@v3 - with: - author_name: Failure in building ${{ matrix.language }} sdk - fields: repo,commit,author,action - status: ${{ job.status }} - strategy: - fail-fast: true - matrix: - language: - - nodejs - - python - - dotnet - - go - - java + uses: ./.github/workflows/build_sdk.yml + secrets: inherit prerequisites: uses: ./.github/workflows/prerequisites.yml diff --git a/provider-ci/test-workflows/aws/.github/workflows/prerelease.yml b/provider-ci/test-workflows/aws/.github/workflows/prerelease.yml index 7e69441ba..e4f66945a 100644 --- a/provider-ci/test-workflows/aws/.github/workflows/prerelease.yml +++ b/provider-ci/test-workflows/aws/.github/workflows/prerelease.yml @@ -25,109 +25,8 @@ jobs: build_sdk: name: build_sdk needs: prerequisites - runs-on: pulumi-ubuntu-8core - steps: - - name: Checkout Repo - uses: actions/checkout@v4 - with: - submodules: true - - uses: pulumi/provider-version-action@v1 - with: - set-env: 'PROVIDER_VERSION' - - name: Install Go - uses: actions/setup-go@v5 - with: - go-version: "1.21.x" - cache-dependency-path: | - sdk/go.sum - - name: Cache examples generation - uses: actions/cache@v4 - with: - path: | - .pulumi/examples-cache - key: ${{ runner.os }}-${{ hashFiles('provider/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: - name: aws-provider.tar.gz - path: ${{ github.workspace }}/bin - - name: Untar provider binaries - run: >- - tar -zxf ${{ github.workspace }}/bin/provider.tar.gz -C ${{ - github.workspace}}/bin - - find ${{ github.workspace }} -name "pulumi-*-aws" -print -exec chmod +x {} \; - - name: Install plugins - run: make install_plugins - - name: Update path - run: echo "${{ github.workspace }}/bin" >> "$GITHUB_PATH" - - name: Build SDK - run: make build_${{ matrix.language }} - - name: Check worktree clean - uses: pulumi/git-status-check-action@v1 - with: - allowed-changes: | - sdk/**/pulumi-plugin.json - sdk/dotnet/Pulumi.*.csproj - sdk/go/**/pulumiUtilities.go - sdk/nodejs/package.json - sdk/python/pyproject.toml - - name: Compress SDK folder - run: tar -zcf sdk/${{ matrix.language }}.tar.gz -C sdk/${{ matrix.language }} . - - name: Upload artifacts - uses: actions/upload-artifact@v4 - with: - name: ${{ matrix.language }}-sdk.tar.gz - path: ${{ github.workspace}}/sdk/${{ matrix.language }}.tar.gz - retention-days: 30 - - if: failure() && github.event_name == 'push' - name: Notify Slack - uses: 8398a7/action-slack@v3 - with: - author_name: Failure in building ${{ matrix.language }} sdk - fields: repo,commit,author,action - status: ${{ job.status }} - strategy: - fail-fast: true - matrix: - language: - - nodejs - - python - - dotnet - - go - - java + uses: ./.github/workflows/build_sdk.yml + secrets: inherit license_check: name: License Check diff --git a/provider-ci/test-workflows/aws/.github/workflows/release.yml b/provider-ci/test-workflows/aws/.github/workflows/release.yml index 681b52726..bf228bf9a 100644 --- a/provider-ci/test-workflows/aws/.github/workflows/release.yml +++ b/provider-ci/test-workflows/aws/.github/workflows/release.yml @@ -24,109 +24,8 @@ jobs: build_sdk: name: build_sdk needs: prerequisites - runs-on: pulumi-ubuntu-8core - steps: - - name: Checkout Repo - uses: actions/checkout@v4 - with: - submodules: true - - uses: pulumi/provider-version-action@v1 - with: - set-env: 'PROVIDER_VERSION' - - name: Install Go - uses: actions/setup-go@v5 - with: - go-version: "1.21.x" - cache-dependency-path: | - sdk/go.sum - - name: Cache examples generation - uses: actions/cache@v4 - with: - path: | - .pulumi/examples-cache - key: ${{ runner.os }}-${{ hashFiles('provider/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: - name: aws-provider.tar.gz - path: ${{ github.workspace }}/bin - - name: Untar provider binaries - run: >- - tar -zxf ${{ github.workspace }}/bin/provider.tar.gz -C ${{ - github.workspace}}/bin - - find ${{ github.workspace }} -name "pulumi-*-aws" -print -exec chmod +x {} \; - - name: Install plugins - run: make install_plugins - - name: Update path - run: echo "${{ github.workspace }}/bin" >> "$GITHUB_PATH" - - name: Build SDK - run: make build_${{ matrix.language }} - - name: Check worktree clean - uses: pulumi/git-status-check-action@v1 - with: - allowed-changes: | - sdk/**/pulumi-plugin.json - sdk/dotnet/Pulumi.*.csproj - sdk/go/**/pulumiUtilities.go - sdk/nodejs/package.json - sdk/python/pyproject.toml - - name: Compress SDK folder - run: tar -zcf sdk/${{ matrix.language }}.tar.gz -C sdk/${{ matrix.language }} . - - name: Upload artifacts - uses: actions/upload-artifact@v4 - with: - name: ${{ matrix.language }}-sdk.tar.gz - path: ${{ github.workspace}}/sdk/${{ matrix.language }}.tar.gz - retention-days: 30 - - if: failure() && github.event_name == 'push' - name: Notify Slack - uses: 8398a7/action-slack@v3 - with: - author_name: Failure in building ${{ matrix.language }} sdk - fields: repo,commit,author,action - status: ${{ job.status }} - strategy: - fail-fast: true - matrix: - language: - - nodejs - - python - - dotnet - - go - - java + uses: ./.github/workflows/build_sdk.yml + secrets: inherit create_docs_build: name: create_docs_build diff --git a/provider-ci/test-workflows/aws/.github/workflows/run-acceptance-tests.yml b/provider-ci/test-workflows/aws/.github/workflows/run-acceptance-tests.yml index 0bf7079a9..f9bf6d9ba 100644 --- a/provider-ci/test-workflows/aws/.github/workflows/run-acceptance-tests.yml +++ b/provider-ci/test-workflows/aws/.github/workflows/run-acceptance-tests.yml @@ -32,110 +32,8 @@ jobs: github.event.pull_request.head.repo.full_name == github.repository name: build_sdk needs: prerequisites - runs-on: pulumi-ubuntu-8core - steps: - - name: Checkout Repo - uses: actions/checkout@v4 - with: - ref: ${{ env.PR_COMMIT_SHA }} - submodules: true - - uses: pulumi/provider-version-action@v1 - with: - set-env: 'PROVIDER_VERSION' - - name: Install Go - uses: actions/setup-go@v5 - with: - go-version: "1.21.x" - cache-dependency-path: | - sdk/go.sum - - name: Cache examples generation - uses: actions/cache@v4 - with: - path: | - .pulumi/examples-cache - key: ${{ runner.os }}-${{ hashFiles('provider/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: - name: aws-provider.tar.gz - path: ${{ github.workspace }}/bin - - name: Untar provider binaries - run: >- - tar -zxf ${{ github.workspace }}/bin/provider.tar.gz -C ${{ - github.workspace}}/bin - - find ${{ github.workspace }} -name "pulumi-*-aws" -print -exec chmod +x {} \; - - name: Install plugins - run: make install_plugins - - name: Update path - run: echo "${{ github.workspace }}/bin" >> "$GITHUB_PATH" - - name: Build SDK - run: make build_${{ matrix.language }} - - name: Check worktree clean - uses: pulumi/git-status-check-action@v1 - with: - allowed-changes: | - sdk/**/pulumi-plugin.json - sdk/dotnet/Pulumi.*.csproj - sdk/go/**/pulumiUtilities.go - sdk/nodejs/package.json - sdk/python/pyproject.toml - - name: Compress SDK folder - run: tar -zcf sdk/${{ matrix.language }}.tar.gz -C sdk/${{ matrix.language }} . - - name: Upload artifacts - uses: actions/upload-artifact@v4 - with: - name: ${{ matrix.language }}-sdk.tar.gz - path: ${{ github.workspace}}/sdk/${{ matrix.language }}.tar.gz - retention-days: 30 - - if: failure() && github.event_name == 'push' - name: Notify Slack - uses: 8398a7/action-slack@v3 - with: - author_name: Failure in building ${{ matrix.language }} sdk - fields: repo,commit,author,action - status: ${{ job.status }} - strategy: - fail-fast: true - matrix: - language: - - nodejs - - python - - dotnet - - go - - java + uses: ./.github/workflows/build_sdk.yml + secrets: inherit comment-notification: if: github.event_name == 'repository_dispatch' diff --git a/provider-ci/test-workflows/cloudflare/.github/workflows/build_sdk.yml b/provider-ci/test-workflows/cloudflare/.github/workflows/build_sdk.yml new file mode 100644 index 000000000..776d3b444 --- /dev/null +++ b/provider-ci/test-workflows/cloudflare/.github/workflows/build_sdk.yml @@ -0,0 +1,99 @@ +name: "Build SDK" + +on: + workflow_call: {} + +jobs: + build_sdk: + name: build_sdk + runs-on: ubuntu-latest + strategy: + fail-fast: true + matrix: + language: + - nodejs + - python + - dotnet + - go + - java + steps: + - name: Checkout Repo + uses: actions/checkout@v4 + - uses: pulumi/provider-version-action@v1 + with: + set-env: 'PROVIDER_VERSION' + - name: Cache examples generation + uses: actions/cache@v4 + with: + path: | + .pulumi/examples-cache + key: ${{ runner.os }}-${{ hashFiles('provider/go.sum') }} + - 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: + registry-url: https://registry.npmjs.org + - name: Setup DotNet + uses: actions/setup-dotnet@v4 + with: + dotnet-version: null + - name: Setup Python + uses: actions/setup-python@v5 + with: + python-version: + - name: Setup Java + uses: actions/setup-java@v4 + with: + cache: gradle + distribution: temurin + java-version: + - name: Setup Gradle + uses: gradle/gradle-build-action@v3 + with: + gradle-version: + - name: Download provider + tfgen binaries + uses: actions/download-artifact@v4 + with: + name: cloudflare-provider.tar.gz + path: ${{ github.workspace }}/bin + - name: Untar provider binaries + run: >- + tar -zxf ${{ github.workspace }}/bin/provider.tar.gz -C ${{ + github.workspace}}/bin + + find ${{ github.workspace }} -name "pulumi-*-cloudflare" -print -exec chmod +x {} \; + - name: Install plugins + run: make install_plugins + - name: Update path + run: echo "${{ github.workspace }}/bin" >> "$GITHUB_PATH" + - name: Build SDK + run: make build_${{ matrix.language }} + - name: Check worktree clean + uses: pulumi/git-status-check-action@v1 + with: + allowed-changes: | + sdk/**/pulumi-plugin.json + sdk/dotnet/Pulumi.*.csproj + sdk/go/**/pulumiUtilities.go + sdk/nodejs/package.json + sdk/python/pyproject.toml + - name: Compress SDK folder + run: tar -zcf sdk/${{ matrix.language }}.tar.gz -C sdk/${{ matrix.language }} . + - name: Upload artifacts + uses: actions/upload-artifact@v4 + with: + name: ${{ matrix.language }}-sdk.tar.gz + path: ${{ github.workspace}}/sdk/${{ matrix.language }}.tar.gz + retention-days: 30 + - if: failure() && github.event_name == 'push' + name: Notify Slack + uses: 8398a7/action-slack@v3 + with: + author_name: Failure in building ${{ matrix.language }} sdk + fields: repo,commit,author,action + status: ${{ job.status }} diff --git a/provider-ci/test-workflows/cloudflare/.github/workflows/master.yml b/provider-ci/test-workflows/cloudflare/.github/workflows/master.yml index 3de24d175..34acba643 100644 --- a/provider-ci/test-workflows/cloudflare/.github/workflows/master.yml +++ b/provider-ci/test-workflows/cloudflare/.github/workflows/master.yml @@ -24,107 +24,8 @@ jobs: build_sdk: name: build_sdk needs: prerequisites - runs-on: ubuntu-latest - steps: - - name: Checkout Repo - uses: actions/checkout@v4 - - uses: pulumi/provider-version-action@v1 - with: - set-env: 'PROVIDER_VERSION' - - name: Install Go - uses: actions/setup-go@v5 - with: - go-version: "1.21.x" - cache-dependency-path: | - sdk/go.sum - - name: Cache examples generation - uses: actions/cache@v4 - with: - path: | - .pulumi/examples-cache - key: ${{ runner.os }}-${{ hashFiles('provider/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: - name: cloudflare-provider.tar.gz - path: ${{ github.workspace }}/bin - - name: Untar provider binaries - run: >- - tar -zxf ${{ github.workspace }}/bin/provider.tar.gz -C ${{ - github.workspace}}/bin - - find ${{ github.workspace }} -name "pulumi-*-cloudflare" -print -exec chmod +x {} \; - - name: Install plugins - run: make install_plugins - - name: Update path - run: echo "${{ github.workspace }}/bin" >> "$GITHUB_PATH" - - name: Build SDK - run: make build_${{ matrix.language }} - - name: Check worktree clean - uses: pulumi/git-status-check-action@v1 - with: - allowed-changes: | - sdk/**/pulumi-plugin.json - sdk/dotnet/Pulumi.*.csproj - sdk/go/**/pulumiUtilities.go - sdk/nodejs/package.json - sdk/python/pyproject.toml - - name: Compress SDK folder - run: tar -zcf sdk/${{ matrix.language }}.tar.gz -C sdk/${{ matrix.language }} . - - name: Upload artifacts - uses: actions/upload-artifact@v4 - with: - name: ${{ matrix.language }}-sdk.tar.gz - path: ${{ github.workspace}}/sdk/${{ matrix.language }}.tar.gz - retention-days: 30 - - if: failure() && github.event_name == 'push' - name: Notify Slack - uses: 8398a7/action-slack@v3 - with: - author_name: Failure in building ${{ matrix.language }} sdk - fields: repo,commit,author,action - status: ${{ job.status }} - strategy: - fail-fast: true - matrix: - language: - - nodejs - - python - - dotnet - - go - - java + uses: ./.github/workflows/build_sdk.yml + secrets: inherit generate_coverage_data: continue-on-error: true diff --git a/provider-ci/test-workflows/cloudflare/.github/workflows/prerelease.yml b/provider-ci/test-workflows/cloudflare/.github/workflows/prerelease.yml index 4cf46e5ec..393c68b3b 100644 --- a/provider-ci/test-workflows/cloudflare/.github/workflows/prerelease.yml +++ b/provider-ci/test-workflows/cloudflare/.github/workflows/prerelease.yml @@ -25,107 +25,8 @@ jobs: build_sdk: name: build_sdk needs: prerequisites - runs-on: ubuntu-latest - steps: - - name: Checkout Repo - uses: actions/checkout@v4 - - uses: pulumi/provider-version-action@v1 - with: - set-env: 'PROVIDER_VERSION' - - name: Install Go - uses: actions/setup-go@v5 - with: - go-version: "1.21.x" - cache-dependency-path: | - sdk/go.sum - - name: Cache examples generation - uses: actions/cache@v4 - with: - path: | - .pulumi/examples-cache - key: ${{ runner.os }}-${{ hashFiles('provider/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: - name: cloudflare-provider.tar.gz - path: ${{ github.workspace }}/bin - - name: Untar provider binaries - run: >- - tar -zxf ${{ github.workspace }}/bin/provider.tar.gz -C ${{ - github.workspace}}/bin - - find ${{ github.workspace }} -name "pulumi-*-cloudflare" -print -exec chmod +x {} \; - - name: Install plugins - run: make install_plugins - - name: Update path - run: echo "${{ github.workspace }}/bin" >> "$GITHUB_PATH" - - name: Build SDK - run: make build_${{ matrix.language }} - - name: Check worktree clean - uses: pulumi/git-status-check-action@v1 - with: - allowed-changes: | - sdk/**/pulumi-plugin.json - sdk/dotnet/Pulumi.*.csproj - sdk/go/**/pulumiUtilities.go - sdk/nodejs/package.json - sdk/python/pyproject.toml - - name: Compress SDK folder - run: tar -zcf sdk/${{ matrix.language }}.tar.gz -C sdk/${{ matrix.language }} . - - name: Upload artifacts - uses: actions/upload-artifact@v4 - with: - name: ${{ matrix.language }}-sdk.tar.gz - path: ${{ github.workspace}}/sdk/${{ matrix.language }}.tar.gz - retention-days: 30 - - if: failure() && github.event_name == 'push' - name: Notify Slack - uses: 8398a7/action-slack@v3 - with: - author_name: Failure in building ${{ matrix.language }} sdk - fields: repo,commit,author,action - status: ${{ job.status }} - strategy: - fail-fast: true - matrix: - language: - - nodejs - - python - - dotnet - - go - - java + uses: ./.github/workflows/build_sdk.yml + secrets: inherit lint: name: lint diff --git a/provider-ci/test-workflows/cloudflare/.github/workflows/release.yml b/provider-ci/test-workflows/cloudflare/.github/workflows/release.yml index 6d1b59e04..27329eb93 100644 --- a/provider-ci/test-workflows/cloudflare/.github/workflows/release.yml +++ b/provider-ci/test-workflows/cloudflare/.github/workflows/release.yml @@ -24,107 +24,8 @@ jobs: build_sdk: name: build_sdk needs: prerequisites - runs-on: ubuntu-latest - steps: - - name: Checkout Repo - uses: actions/checkout@v4 - - uses: pulumi/provider-version-action@v1 - with: - set-env: 'PROVIDER_VERSION' - - name: Install Go - uses: actions/setup-go@v5 - with: - go-version: "1.21.x" - cache-dependency-path: | - sdk/go.sum - - name: Cache examples generation - uses: actions/cache@v4 - with: - path: | - .pulumi/examples-cache - key: ${{ runner.os }}-${{ hashFiles('provider/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: - name: cloudflare-provider.tar.gz - path: ${{ github.workspace }}/bin - - name: Untar provider binaries - run: >- - tar -zxf ${{ github.workspace }}/bin/provider.tar.gz -C ${{ - github.workspace}}/bin - - find ${{ github.workspace }} -name "pulumi-*-cloudflare" -print -exec chmod +x {} \; - - name: Install plugins - run: make install_plugins - - name: Update path - run: echo "${{ github.workspace }}/bin" >> "$GITHUB_PATH" - - name: Build SDK - run: make build_${{ matrix.language }} - - name: Check worktree clean - uses: pulumi/git-status-check-action@v1 - with: - allowed-changes: | - sdk/**/pulumi-plugin.json - sdk/dotnet/Pulumi.*.csproj - sdk/go/**/pulumiUtilities.go - sdk/nodejs/package.json - sdk/python/pyproject.toml - - name: Compress SDK folder - run: tar -zcf sdk/${{ matrix.language }}.tar.gz -C sdk/${{ matrix.language }} . - - name: Upload artifacts - uses: actions/upload-artifact@v4 - with: - name: ${{ matrix.language }}-sdk.tar.gz - path: ${{ github.workspace}}/sdk/${{ matrix.language }}.tar.gz - retention-days: 30 - - if: failure() && github.event_name == 'push' - name: Notify Slack - uses: 8398a7/action-slack@v3 - with: - author_name: Failure in building ${{ matrix.language }} sdk - fields: repo,commit,author,action - status: ${{ job.status }} - strategy: - fail-fast: true - matrix: - language: - - nodejs - - python - - dotnet - - go - - java + uses: ./.github/workflows/build_sdk.yml + secrets: inherit create_docs_build: name: create_docs_build diff --git a/provider-ci/test-workflows/cloudflare/.github/workflows/run-acceptance-tests.yml b/provider-ci/test-workflows/cloudflare/.github/workflows/run-acceptance-tests.yml index 4c0f4da12..7a3f5c905 100644 --- a/provider-ci/test-workflows/cloudflare/.github/workflows/run-acceptance-tests.yml +++ b/provider-ci/test-workflows/cloudflare/.github/workflows/run-acceptance-tests.yml @@ -32,109 +32,8 @@ jobs: github.event.pull_request.head.repo.full_name == github.repository name: build_sdk needs: prerequisites - runs-on: ubuntu-latest - steps: - - name: Checkout Repo - uses: actions/checkout@v4 - with: - ref: ${{ env.PR_COMMIT_SHA }} - - uses: pulumi/provider-version-action@v1 - with: - set-env: 'PROVIDER_VERSION' - - name: Install Go - uses: actions/setup-go@v5 - with: - go-version: "1.21.x" - cache-dependency-path: | - sdk/go.sum - - name: Cache examples generation - uses: actions/cache@v4 - with: - path: | - .pulumi/examples-cache - key: ${{ runner.os }}-${{ hashFiles('provider/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: - name: cloudflare-provider.tar.gz - path: ${{ github.workspace }}/bin - - name: Untar provider binaries - run: >- - tar -zxf ${{ github.workspace }}/bin/provider.tar.gz -C ${{ - github.workspace}}/bin - - find ${{ github.workspace }} -name "pulumi-*-cloudflare" -print -exec chmod +x {} \; - - name: Install plugins - run: make install_plugins - - name: Update path - run: echo "${{ github.workspace }}/bin" >> "$GITHUB_PATH" - - name: Build SDK - run: make build_${{ matrix.language }} - - name: Check worktree clean - uses: pulumi/git-status-check-action@v1 - with: - allowed-changes: | - sdk/**/pulumi-plugin.json - sdk/dotnet/Pulumi.*.csproj - sdk/go/**/pulumiUtilities.go - sdk/nodejs/package.json - sdk/python/pyproject.toml - - name: Compress SDK folder - run: tar -zcf sdk/${{ matrix.language }}.tar.gz -C sdk/${{ matrix.language }} . - - name: Upload artifacts - uses: actions/upload-artifact@v4 - with: - name: ${{ matrix.language }}-sdk.tar.gz - path: ${{ github.workspace}}/sdk/${{ matrix.language }}.tar.gz - retention-days: 30 - - if: failure() && github.event_name == 'push' - name: Notify Slack - uses: 8398a7/action-slack@v3 - with: - author_name: Failure in building ${{ matrix.language }} sdk - fields: repo,commit,author,action - status: ${{ job.status }} - strategy: - fail-fast: true - matrix: - language: - - nodejs - - python - - dotnet - - go - - java + uses: ./.github/workflows/build_sdk.yml + secrets: inherit comment-notification: if: github.event_name == 'repository_dispatch' diff --git a/provider-ci/test-workflows/docker/.github/workflows/build_sdk.yml b/provider-ci/test-workflows/docker/.github/workflows/build_sdk.yml new file mode 100644 index 000000000..194ae7445 --- /dev/null +++ b/provider-ci/test-workflows/docker/.github/workflows/build_sdk.yml @@ -0,0 +1,99 @@ +name: "Build SDK" + +on: + workflow_call: {} + +jobs: + build_sdk: + name: build_sdk + runs-on: ubuntu-latest + strategy: + fail-fast: true + matrix: + language: + - nodejs + - python + - dotnet + - go + - java + steps: + - name: Checkout Repo + uses: actions/checkout@v4 + - uses: pulumi/provider-version-action@v1 + with: + set-env: 'PROVIDER_VERSION' + - name: Cache examples generation + uses: actions/cache@v4 + with: + path: | + .pulumi/examples-cache + key: ${{ runner.os }}-${{ hashFiles('provider/go.sum') }} + - 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: + registry-url: https://registry.npmjs.org + - name: Setup DotNet + uses: actions/setup-dotnet@v4 + with: + dotnet-version: null + - name: Setup Python + uses: actions/setup-python@v5 + with: + python-version: + - name: Setup Java + uses: actions/setup-java@v4 + with: + cache: gradle + distribution: temurin + java-version: + - name: Setup Gradle + uses: gradle/gradle-build-action@v3 + with: + gradle-version: + - name: Download provider + tfgen binaries + uses: actions/download-artifact@v4 + with: + name: docker-provider.tar.gz + path: ${{ github.workspace }}/bin + - name: Untar provider binaries + run: >- + tar -zxf ${{ github.workspace }}/bin/provider.tar.gz -C ${{ + github.workspace}}/bin + + find ${{ github.workspace }} -name "pulumi-*-docker" -print -exec chmod +x {} \; + - name: Install plugins + run: make install_plugins + - name: Update path + run: echo "${{ github.workspace }}/bin" >> "$GITHUB_PATH" + - name: Build SDK + run: make build_${{ matrix.language }} + - name: Check worktree clean + uses: pulumi/git-status-check-action@v1 + with: + allowed-changes: | + sdk/**/pulumi-plugin.json + sdk/dotnet/Pulumi.*.csproj + sdk/go/**/pulumiUtilities.go + sdk/nodejs/package.json + sdk/python/pyproject.toml + - name: Compress SDK folder + run: tar -zcf sdk/${{ matrix.language }}.tar.gz -C sdk/${{ matrix.language }} . + - name: Upload artifacts + uses: actions/upload-artifact@v4 + with: + name: ${{ matrix.language }}-sdk.tar.gz + path: ${{ github.workspace}}/sdk/${{ matrix.language }}.tar.gz + retention-days: 30 + - if: failure() && github.event_name == 'push' + name: Notify Slack + uses: 8398a7/action-slack@v3 + with: + author_name: Failure in building ${{ matrix.language }} sdk + fields: repo,commit,author,action + status: ${{ job.status }} diff --git a/provider-ci/test-workflows/docker/.github/workflows/master.yml b/provider-ci/test-workflows/docker/.github/workflows/master.yml index 14e6cb271..172531d1e 100644 --- a/provider-ci/test-workflows/docker/.github/workflows/master.yml +++ b/provider-ci/test-workflows/docker/.github/workflows/master.yml @@ -37,107 +37,8 @@ jobs: build_sdk: name: build_sdk needs: prerequisites - runs-on: ubuntu-latest - steps: - - name: Checkout Repo - uses: actions/checkout@v4 - - uses: pulumi/provider-version-action@v1 - with: - set-env: 'PROVIDER_VERSION' - - name: Install Go - uses: actions/setup-go@v5 - with: - go-version: "1.21.x" - cache-dependency-path: | - sdk/go.sum - - name: Cache examples generation - uses: actions/cache@v4 - with: - path: | - .pulumi/examples-cache - key: ${{ runner.os }}-${{ hashFiles('provider/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: - name: docker-provider.tar.gz - path: ${{ github.workspace }}/bin - - name: Untar provider binaries - run: >- - tar -zxf ${{ github.workspace }}/bin/provider.tar.gz -C ${{ - github.workspace}}/bin - - find ${{ github.workspace }} -name "pulumi-*-docker" -print -exec chmod +x {} \; - - name: Install plugins - run: make install_plugins - - name: Update path - run: echo "${{ github.workspace }}/bin" >> "$GITHUB_PATH" - - name: Build SDK - run: make build_${{ matrix.language }} - - name: Check worktree clean - uses: pulumi/git-status-check-action@v1 - with: - allowed-changes: | - sdk/**/pulumi-plugin.json - sdk/dotnet/Pulumi.*.csproj - sdk/go/**/pulumiUtilities.go - sdk/nodejs/package.json - sdk/python/pyproject.toml - - name: Compress SDK folder - run: tar -zcf sdk/${{ matrix.language }}.tar.gz -C sdk/${{ matrix.language }} . - - name: Upload artifacts - uses: actions/upload-artifact@v4 - with: - name: ${{ matrix.language }}-sdk.tar.gz - path: ${{ github.workspace}}/sdk/${{ matrix.language }}.tar.gz - retention-days: 30 - - if: failure() && github.event_name == 'push' - name: Notify Slack - uses: 8398a7/action-slack@v3 - with: - author_name: Failure in building ${{ matrix.language }} sdk - fields: repo,commit,author,action - status: ${{ job.status }} - strategy: - fail-fast: true - matrix: - language: - - nodejs - - python - - dotnet - - go - - java + uses: ./.github/workflows/build_sdk.yml + secrets: inherit generate_coverage_data: continue-on-error: true diff --git a/provider-ci/test-workflows/docker/.github/workflows/prerelease.yml b/provider-ci/test-workflows/docker/.github/workflows/prerelease.yml index d5ed57769..a81b55992 100644 --- a/provider-ci/test-workflows/docker/.github/workflows/prerelease.yml +++ b/provider-ci/test-workflows/docker/.github/workflows/prerelease.yml @@ -38,107 +38,8 @@ jobs: build_sdk: name: build_sdk needs: prerequisites - runs-on: ubuntu-latest - steps: - - name: Checkout Repo - uses: actions/checkout@v4 - - uses: pulumi/provider-version-action@v1 - with: - set-env: 'PROVIDER_VERSION' - - name: Install Go - uses: actions/setup-go@v5 - with: - go-version: "1.21.x" - cache-dependency-path: | - sdk/go.sum - - name: Cache examples generation - uses: actions/cache@v4 - with: - path: | - .pulumi/examples-cache - key: ${{ runner.os }}-${{ hashFiles('provider/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: - name: docker-provider.tar.gz - path: ${{ github.workspace }}/bin - - name: Untar provider binaries - run: >- - tar -zxf ${{ github.workspace }}/bin/provider.tar.gz -C ${{ - github.workspace}}/bin - - find ${{ github.workspace }} -name "pulumi-*-docker" -print -exec chmod +x {} \; - - name: Install plugins - run: make install_plugins - - name: Update path - run: echo "${{ github.workspace }}/bin" >> "$GITHUB_PATH" - - name: Build SDK - run: make build_${{ matrix.language }} - - name: Check worktree clean - uses: pulumi/git-status-check-action@v1 - with: - allowed-changes: | - sdk/**/pulumi-plugin.json - sdk/dotnet/Pulumi.*.csproj - sdk/go/**/pulumiUtilities.go - sdk/nodejs/package.json - sdk/python/pyproject.toml - - name: Compress SDK folder - run: tar -zcf sdk/${{ matrix.language }}.tar.gz -C sdk/${{ matrix.language }} . - - name: Upload artifacts - uses: actions/upload-artifact@v4 - with: - name: ${{ matrix.language }}-sdk.tar.gz - path: ${{ github.workspace}}/sdk/${{ matrix.language }}.tar.gz - retention-days: 30 - - if: failure() && github.event_name == 'push' - name: Notify Slack - uses: 8398a7/action-slack@v3 - with: - author_name: Failure in building ${{ matrix.language }} sdk - fields: repo,commit,author,action - status: ${{ job.status }} - strategy: - fail-fast: true - matrix: - language: - - nodejs - - python - - dotnet - - go - - java + uses: ./.github/workflows/build_sdk.yml + secrets: inherit lint: name: lint diff --git a/provider-ci/test-workflows/docker/.github/workflows/release.yml b/provider-ci/test-workflows/docker/.github/workflows/release.yml index f809b1512..623a3e625 100644 --- a/provider-ci/test-workflows/docker/.github/workflows/release.yml +++ b/provider-ci/test-workflows/docker/.github/workflows/release.yml @@ -37,107 +37,8 @@ jobs: build_sdk: name: build_sdk needs: prerequisites - runs-on: ubuntu-latest - steps: - - name: Checkout Repo - uses: actions/checkout@v4 - - uses: pulumi/provider-version-action@v1 - with: - set-env: 'PROVIDER_VERSION' - - name: Install Go - uses: actions/setup-go@v5 - with: - go-version: "1.21.x" - cache-dependency-path: | - sdk/go.sum - - name: Cache examples generation - uses: actions/cache@v4 - with: - path: | - .pulumi/examples-cache - key: ${{ runner.os }}-${{ hashFiles('provider/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: - name: docker-provider.tar.gz - path: ${{ github.workspace }}/bin - - name: Untar provider binaries - run: >- - tar -zxf ${{ github.workspace }}/bin/provider.tar.gz -C ${{ - github.workspace}}/bin - - find ${{ github.workspace }} -name "pulumi-*-docker" -print -exec chmod +x {} \; - - name: Install plugins - run: make install_plugins - - name: Update path - run: echo "${{ github.workspace }}/bin" >> "$GITHUB_PATH" - - name: Build SDK - run: make build_${{ matrix.language }} - - name: Check worktree clean - uses: pulumi/git-status-check-action@v1 - with: - allowed-changes: | - sdk/**/pulumi-plugin.json - sdk/dotnet/Pulumi.*.csproj - sdk/go/**/pulumiUtilities.go - sdk/nodejs/package.json - sdk/python/pyproject.toml - - name: Compress SDK folder - run: tar -zcf sdk/${{ matrix.language }}.tar.gz -C sdk/${{ matrix.language }} . - - name: Upload artifacts - uses: actions/upload-artifact@v4 - with: - name: ${{ matrix.language }}-sdk.tar.gz - path: ${{ github.workspace}}/sdk/${{ matrix.language }}.tar.gz - retention-days: 30 - - if: failure() && github.event_name == 'push' - name: Notify Slack - uses: 8398a7/action-slack@v3 - with: - author_name: Failure in building ${{ matrix.language }} sdk - fields: repo,commit,author,action - status: ${{ job.status }} - strategy: - fail-fast: true - matrix: - language: - - nodejs - - python - - dotnet - - go - - java + uses: ./.github/workflows/build_sdk.yml + secrets: inherit create_docs_build: name: create_docs_build diff --git a/provider-ci/test-workflows/docker/.github/workflows/run-acceptance-tests.yml b/provider-ci/test-workflows/docker/.github/workflows/run-acceptance-tests.yml index 357d720ab..489e3574f 100644 --- a/provider-ci/test-workflows/docker/.github/workflows/run-acceptance-tests.yml +++ b/provider-ci/test-workflows/docker/.github/workflows/run-acceptance-tests.yml @@ -45,109 +45,8 @@ jobs: github.event.pull_request.head.repo.full_name == github.repository name: build_sdk needs: prerequisites - runs-on: ubuntu-latest - steps: - - name: Checkout Repo - uses: actions/checkout@v4 - with: - ref: ${{ env.PR_COMMIT_SHA }} - - uses: pulumi/provider-version-action@v1 - with: - set-env: 'PROVIDER_VERSION' - - name: Install Go - uses: actions/setup-go@v5 - with: - go-version: "1.21.x" - cache-dependency-path: | - sdk/go.sum - - name: Cache examples generation - uses: actions/cache@v4 - with: - path: | - .pulumi/examples-cache - key: ${{ runner.os }}-${{ hashFiles('provider/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: - name: docker-provider.tar.gz - path: ${{ github.workspace }}/bin - - name: Untar provider binaries - run: >- - tar -zxf ${{ github.workspace }}/bin/provider.tar.gz -C ${{ - github.workspace}}/bin - - find ${{ github.workspace }} -name "pulumi-*-docker" -print -exec chmod +x {} \; - - name: Install plugins - run: make install_plugins - - name: Update path - run: echo "${{ github.workspace }}/bin" >> "$GITHUB_PATH" - - name: Build SDK - run: make build_${{ matrix.language }} - - name: Check worktree clean - uses: pulumi/git-status-check-action@v1 - with: - allowed-changes: | - sdk/**/pulumi-plugin.json - sdk/dotnet/Pulumi.*.csproj - sdk/go/**/pulumiUtilities.go - sdk/nodejs/package.json - sdk/python/pyproject.toml - - name: Compress SDK folder - run: tar -zcf sdk/${{ matrix.language }}.tar.gz -C sdk/${{ matrix.language }} . - - name: Upload artifacts - uses: actions/upload-artifact@v4 - with: - name: ${{ matrix.language }}-sdk.tar.gz - path: ${{ github.workspace}}/sdk/${{ matrix.language }}.tar.gz - retention-days: 30 - - if: failure() && github.event_name == 'push' - name: Notify Slack - uses: 8398a7/action-slack@v3 - with: - author_name: Failure in building ${{ matrix.language }} sdk - fields: repo,commit,author,action - status: ${{ job.status }} - strategy: - fail-fast: true - matrix: - language: - - nodejs - - python - - dotnet - - go - - java + uses: ./.github/workflows/build_sdk.yml + secrets: inherit comment-notification: if: github.event_name == 'repository_dispatch'