diff --git a/.github/ISSUE_TEMPLATE/bug.yaml b/.github/ISSUE_TEMPLATE/bug.yaml new file mode 100644 index 00000000..2fd54bca --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug.yaml @@ -0,0 +1,71 @@ +name: Bug Report +description: Report something that's not working correctly +labels: ["kind/bug", "needs-triage"] +body: + - type: markdown + attributes: + value: | + Thanks for taking the time to fill out this bug report! + You can also ask questions on our [Community Slack](https://slack.pulumi.com/). + - type: textarea + id: what-happened + attributes: + label: Describe what happened + description: Please summarize what happened, including what Pulumi commands you ran, as well as + an inline snippet of any relevant error or console output. + validations: + required: true + - type: textarea + id: sample-program + attributes: + label: Sample program + description: | +
Provide a reproducible sample program + If this is a bug you encountered while running a Pulumi command, please provide us with a minimal, + self-contained Pulumi program that reproduces this behavior so that we can investigate on our end. + Without a functional reproduction, we will not be able to prioritize this bug. + **Note:** If the program output is more than a few lines, please send us a Gist or a link to a file. +
+ validations: + required: true + - type: textarea + id: log-output + attributes: + label: Log output + description: | +
How to Submit Logs + If this is something that is dependent on your environment, please also provide us with the output of + `pulumi up --logtostderr --logflow -v=10` from the root of your project. + We may also ask you to supply us with debug output following [these steps](https://www.pulumi.com/docs/using-pulumi/pulumi-packages/debugging-provider-packages/). + **Note:** If the log output is more than a few lines, please send us a Gist or a link to a file. +
+ validations: + required: true + - type: textarea + id: resources + attributes: + label: Affected Resource(s) + description: Please list the affected Pulumi Resource(s) or Function(s). + validations: + required: false + - type: textarea + id: versions + attributes: + label: Output of `pulumi about` + description: Provide the output of `pulumi about` from the root of your project. + validations: + required: true + - type: textarea + id: ctx + attributes: + label: Additional context + description: Anything else you would like to add? + validations: + required: false + - type: textarea + id: voting + attributes: + label: Contributing + value: | + Vote on this issue by adding a 👍 reaction. + To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already). \ No newline at end of file diff --git a/.github/workflows/build_sdk.yml b/.github/workflows/build_sdk.yml new file mode 100644 index 00000000..344bb457 --- /dev/null +++ b/.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: 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: xyz-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-*-xyz" -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/.github/workflows/check-upstream-upgrade.yml b/.github/workflows/check-upstream-upgrade.yml index 352bc4d9..34c4eb8f 100644 --- a/.github/workflows/check-upstream-upgrade.yml +++ b/.github/workflows/check-upstream-upgrade.yml @@ -11,9 +11,9 @@ jobs: - name: Install Go uses: actions/setup-go@v5 with: + go-version: "1.21.x" cache-dependency-path: | - sdk/go.sum - go-version: 1.21.x + sdk/go.sum - name: Checkout Repo uses: actions/checkout@v4 - name: Install upgrade-provider diff --git a/.github/workflows/command-dispatch.yml b/.github/workflows/command-dispatch.yml index 6dcee1be..53621f70 100644 --- a/.github/workflows/command-dispatch.yml +++ b/.github/workflows/command-dispatch.yml @@ -1,16 +1,8 @@ # WARNING: This file is autogenerated - changes will be overwritten if not made via https://github.com/pulumi/ci-mgmt env: - PROVIDER: xyz - DOTNETVERSION: | - 6.0.x - 3.1.301 GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - GOVERSION: 1.21.x - GRADLEVERSION: "7.6" - JAVAVERSION: "11" NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} - NODEVERSION: 20.x NPM_TOKEN: ${{ secrets.NPM_TOKEN }} NUGET_PUBLISH_KEY: ${{ secrets.NUGET_PUBLISH_KEY }} PUBLISH_REPO_PASSWORD: ${{ secrets.OSSRH_PASSWORD }} @@ -22,13 +14,11 @@ env: PULUMI_MISSING_DOCS_ERROR: true PYPI_PASSWORD: ${{ secrets.PYPI_API_TOKEN }} PYPI_USERNAME: __token__ - PYTHONVERSION: 3.11.8 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 XYZ_REGION: us-west-2 jobs: command-dispatch-for-testing: diff --git a/.github/workflows/license.yml b/.github/workflows/license.yml index 2ffae6f9..9e0eaa8b 100644 --- a/.github/workflows/license.yml +++ b/.github/workflows/license.yml @@ -8,15 +8,8 @@ on: env: - DOTNETVERSION: | - 6.0.x - 3.1.301 GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - GOVERSION: 1.21.x - GRADLEVERSION: "7.6" - JAVAVERSION: "11" NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} - NODEVERSION: 20.x NPM_TOKEN: ${{ secrets.NPM_TOKEN }} NUGET_PUBLISH_KEY: ${{ secrets.NUGET_PUBLISH_KEY }} PUBLISH_REPO_PASSWORD: ${{ secrets.OSSRH_PASSWORD }} @@ -28,13 +21,11 @@ env: PULUMI_MISSING_DOCS_ERROR: true PYPI_PASSWORD: ${{ secrets.PYPI_API_TOKEN }} PYPI_USERNAME: __token__ - PYTHONVERSION: 3.11.8 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 XYZ_REGION: us-west-2 jobs: @@ -51,7 +42,7 @@ jobs: with: cache-dependency-path: | sdk/go.sum - go-version: 1.21.x + go-version: "1.21.x" - run: make upstream - uses: pulumi/license-check-action@main with: diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index c9d3dbf4..731d8ea1 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -7,15 +7,8 @@ on: inputs: {} env: - DOTNETVERSION: | - 6.0.x - 3.1.301 GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - GOVERSION: 1.21.x - GRADLEVERSION: "7.6" - JAVAVERSION: "11" NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} - NODEVERSION: 20.x NPM_TOKEN: ${{ secrets.NPM_TOKEN }} NUGET_PUBLISH_KEY: ${{ secrets.NUGET_PUBLISH_KEY }} PUBLISH_REPO_PASSWORD: ${{ secrets.OSSRH_PASSWORD }} @@ -27,13 +20,11 @@ env: PULUMI_MISSING_DOCS_ERROR: true PYPI_PASSWORD: ${{ secrets.PYPI_API_TOKEN }} PYPI_USERNAME: __token__ - PYTHONVERSION: 3.11.8 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 XYZ_REGION: us-west-2 jobs: diff --git a/.github/workflows/master.yml b/.github/workflows/master.yml index 0035665b..303dbb4f 100644 --- a/.github/workflows/master.yml +++ b/.github/workflows/master.yml @@ -1,16 +1,8 @@ # WARNING: This file is autogenerated - changes will be overwritten if not made via https://github.com/pulumi/ci-mgmt env: - PROVIDER: xyz - DOTNETVERSION: | - 6.0.x - 3.1.301 GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - GOVERSION: 1.21.x - GRADLEVERSION: "7.6" - JAVAVERSION: "11" NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} - NODEVERSION: 20.x NPM_TOKEN: ${{ secrets.NPM_TOKEN }} NUGET_PUBLISH_KEY: ${{ secrets.NUGET_PUBLISH_KEY }} PUBLISH_REPO_PASSWORD: ${{ secrets.OSSRH_PASSWORD }} @@ -22,119 +14,18 @@ env: PULUMI_MISSING_DOCS_ERROR: true PYPI_PASSWORD: ${{ secrets.PYPI_API_TOKEN }} PYPI_USERNAME: __token__ - PYTHONVERSION: 3.11.8 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 XYZ_REGION: us-west-2 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: - cache-dependency-path: | - sdk/go.sum - go-version: 1.21.x - - 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: ${{ env.NODEVERSION }} - registry-url: https://registry.npmjs.org - - name: Setup DotNet - uses: actions/setup-dotnet@v4 - with: - dotnet-version: ${{ env.DOTNETVERSION }} - - name: Setup Python - uses: actions/setup-python@v5 - with: - python-version: ${{ env.PYTHONVERSION }} - - name: Setup Java - uses: actions/setup-java@v4 - with: - cache: gradle - distribution: temurin - java-version: ${{ env.JAVAVERSION }} - - name: Setup Gradle - uses: gradle/gradle-build-action@v3 - with: - gradle-version: ${{ env.GRADLEVERSION }} - - name: Download provider + tfgen binaries - uses: actions/download-artifact@v4 - with: - name: ${{ env.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-*-${{ env.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 - with: - allowed-changes: | - sdk/**/pulumi-plugin.json - sdk/dotnet/Pulumi.*.csproj - sdk/go/*/internal/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 @@ -160,9 +51,9 @@ jobs: - name: Install Go uses: actions/setup-go@v5 with: + go-version: "1.21.x" cache-dependency-path: | - sdk/go.sum - go-version: 1.21.x + sdk/go.sum - name: Install pulumictl uses: jaxxstorm/action-install-gh-release@v1.11.0 with: @@ -171,7 +62,7 @@ jobs: - name: Install Pulumi CLI uses: pulumi/actions@v5 with: - pulumi-version: ^3 + pulumi-version: "^3" - if: github.event_name == 'pull_request' name: Install Schema Tools uses: jaxxstorm/action-install-gh-release@v1.11.0 @@ -199,92 +90,12 @@ jobs: uses: ./.github/workflows/license.yml secrets: inherit prerequisites: - name: 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: Cache examples generation - uses: actions/cache@v4 - with: - path: | - .pulumi/examples-cache - key: ${{ runner.os }}-${{ hashFiles('provider/go.sum') }} - - name: Prepare upstream code - run: make upstream - - 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: github.event_name == 'pull_request' - name: Install Schema Tools - uses: jaxxstorm/action-install-gh-release@v1.11.0 - with: - repo: pulumi/schema-tools - - name: Build schema generator binary - run: make tfgen_build_only - - name: Install plugins - run: make install_plugins - - name: Generate schema - run: make tfgen_no_deps - - name: Build provider binary - run: make provider_no_deps - - name: Unit-test provider code - run: make test_provider - - if: github.event_name == 'pull_request' - name: Check Schema is Valid - 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@v2 - with: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - comment_tag: schemaCheck - message: >+ - ${{ 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 }} - pulumi-tfgen-${{ env.PROVIDER }} - - name: Upload artifacts - uses: actions/upload-artifact@v4 - with: - name: ${{ env.PROVIDER }}-provider.tar.gz - path: ${{ github.workspace }}/bin/provider.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 provider prerequisites - fields: repo,commit,author,action - status: ${{ job.status }} - + uses: ./.github/workflows/prerequisites.yml + secrets: inherit + with: + default_branch: ${{ github.event.repository.default_branch }} + is_pr: ${{ github.event_name == 'pull_request' }} + is_automated: ${{ github.actor == 'dependabot[bot]' }} publish: name: publish @@ -305,9 +116,9 @@ jobs: - name: Install Go uses: actions/setup-go@v5 with: + go-version: "1.21.x" cache-dependency-path: | - sdk/go.sum - go-version: 1.21.x + sdk/go.sum - name: Install pulumictl uses: jaxxstorm/action-install-gh-release@v1.11.0 with: @@ -316,7 +127,7 @@ jobs: - name: Install Pulumi CLI uses: pulumi/actions@v5 with: - pulumi-version: ^3 + pulumi-version: "^3" - name: Configure AWS Credentials uses: aws-actions/configure-aws-credentials@v4 with: @@ -325,7 +136,7 @@ jobs: aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} role-duration-seconds: 7200 role-external-id: upload-pulumi-release - role-session-name: ${{ env.PROVIDER }}@githubActions + role-session-name: xyz@githubActions role-to-assume: ${{ secrets.AWS_UPLOAD_ROLE_ARN }} - id: version uses: pulumi/provider-version-action@v1 @@ -353,10 +164,14 @@ jobs: - id: version uses: pulumi/provider-version-action@v1 - name: Publish SDKs - uses: pulumi/pulumi-package-publisher@v0.0.15 + uses: pulumi/pulumi-package-publisher@v0.0.17 with: sdk: all version: ${{ steps.version.outputs.version }} + dotnet-version: "6.0.x" + java-version: "11" + node-version: "20.x" + python-version: "3.11.8" - env: SLACK_CHANNEL: provider-upgrade-publish-status SLACK_COLOR: "#FF0000" @@ -402,9 +217,9 @@ jobs: - name: Install Go uses: actions/setup-go@v5 with: + go-version: "1.21.x" cache-dependency-path: | - sdk/go.sum - go-version: 1.21.x + sdk/go.sum - name: Install pulumictl uses: jaxxstorm/action-install-gh-release@v1.11.0 with: @@ -413,41 +228,41 @@ jobs: - name: Install Pulumi CLI uses: pulumi/actions@v5 with: - pulumi-version: ^3 + pulumi-version: "^3" - name: Setup Node uses: actions/setup-node@v4 with: - node-version: ${{ env.NODEVERSION }} + node-version: "20.x" registry-url: https://registry.npmjs.org - name: Setup DotNet uses: actions/setup-dotnet@v4 with: - dotnet-version: ${{ env.DOTNETVERSION }} + dotnet-version: "6.0.x" - name: Setup Python uses: actions/setup-python@v5 with: - python-version: ${{ env.PYTHONVERSION }} + python-version: "3.11.8" - name: Setup Java uses: actions/setup-java@v4 with: cache: gradle distribution: temurin - java-version: ${{ env.JAVAVERSION }} + java-version: "11" - name: Setup Gradle uses: gradle/gradle-build-action@v3 with: - gradle-version: ${{ env.GRADLEVERSION }} + gradle-version: "7.6" - name: Download provider + tfgen binaries uses: actions/download-artifact@v4 with: - name: ${{ env.PROVIDER }}-provider.tar.gz + name: xyz-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-*-${{ env.PROVIDER }}" -print -exec chmod +x {} \; + find ${{ github.workspace }} -name "pulumi-*-xyz" -print -exec chmod +x {} \; - run: dotnet nuget add source ${{ github.workspace }}/nuget - name: Download SDK uses: actions/download-artifact@v4 diff --git a/.github/workflows/prerelease.yml b/.github/workflows/prerelease.yml index bfe494b4..db581b8c 100644 --- a/.github/workflows/prerelease.yml +++ b/.github/workflows/prerelease.yml @@ -1,17 +1,9 @@ # WARNING: This file is autogenerated - changes will be overwritten if not made via https://github.com/pulumi/ci-mgmt env: - PROVIDER: xyz IS_PRERELEASE: true - DOTNETVERSION: | - 6.0.x - 3.1.301 GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - GOVERSION: 1.21.x - GRADLEVERSION: "7.6" - JAVAVERSION: "11" NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} - NODEVERSION: 20.x NPM_TOKEN: ${{ secrets.NPM_TOKEN }} NUGET_PUBLISH_KEY: ${{ secrets.NUGET_PUBLISH_KEY }} PUBLISH_REPO_PASSWORD: ${{ secrets.OSSRH_PASSWORD }} @@ -23,119 +15,18 @@ env: PULUMI_MISSING_DOCS_ERROR: true PYPI_PASSWORD: ${{ secrets.PYPI_API_TOKEN }} PYPI_USERNAME: __token__ - PYTHONVERSION: 3.11.8 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 XYZ_REGION: us-west-2 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: - cache-dependency-path: | - sdk/go.sum - go-version: 1.21.x - - 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: ${{ env.NODEVERSION }} - registry-url: https://registry.npmjs.org - - name: Setup DotNet - uses: actions/setup-dotnet@v4 - with: - dotnet-version: ${{ env.DOTNETVERSION }} - - name: Setup Python - uses: actions/setup-python@v5 - with: - python-version: ${{ env.PYTHONVERSION }} - - name: Setup Java - uses: actions/setup-java@v4 - with: - cache: gradle - distribution: temurin - java-version: ${{ env.JAVAVERSION }} - - name: Setup Gradle - uses: gradle/gradle-build-action@v3 - with: - gradle-version: ${{ env.GRADLEVERSION }} - - name: Download provider + tfgen binaries - uses: actions/download-artifact@v4 - with: - name: ${{ env.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-*-${{ env.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 - with: - allowed-changes: | - sdk/**/pulumi-plugin.json - sdk/dotnet/Pulumi.*.csproj - sdk/go/*/internal/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 @@ -146,92 +37,12 @@ jobs: uses: ./.github/workflows/license.yml secrets: inherit prerequisites: - name: 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: Cache examples generation - uses: actions/cache@v4 - with: - path: | - .pulumi/examples-cache - key: ${{ runner.os }}-${{ hashFiles('provider/go.sum') }} - - name: Prepare upstream code - run: make upstream - - 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: github.event_name == 'pull_request' - name: Install Schema Tools - uses: jaxxstorm/action-install-gh-release@v1.11.0 - with: - repo: pulumi/schema-tools - - name: Build schema generator binary - run: make tfgen_build_only - - name: Install plugins - run: make install_plugins - - name: Generate schema - run: make tfgen_no_deps - - name: Build provider binary - run: make provider_no_deps - - name: Unit-test provider code - run: make test_provider - - if: github.event_name == 'pull_request' - name: Check Schema is Valid - 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@v2 - with: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - comment_tag: schemaCheck - message: >+ - ${{ 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 }} - pulumi-tfgen-${{ env.PROVIDER }} - - name: Upload artifacts - uses: actions/upload-artifact@v4 - with: - name: ${{ env.PROVIDER }}-provider.tar.gz - path: ${{ github.workspace }}/bin/provider.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 provider prerequisites - fields: repo,commit,author,action - status: ${{ job.status }} - + uses: ./.github/workflows/prerequisites.yml + secrets: inherit + with: + default_branch: ${{ github.event.repository.default_branch }} + is_pr: ${{ github.event_name == 'pull_request' }} + is_automated: ${{ github.actor == 'dependabot[bot]' }} publish: name: publish @@ -252,9 +63,9 @@ jobs: - name: Install Go uses: actions/setup-go@v5 with: + go-version: "1.21.x" cache-dependency-path: | - sdk/go.sum - go-version: 1.21.x + sdk/go.sum - name: Install pulumictl uses: jaxxstorm/action-install-gh-release@v1.11.0 with: @@ -263,7 +74,7 @@ jobs: - name: Install Pulumi CLI uses: pulumi/actions@v5 with: - pulumi-version: ^3 + pulumi-version: "^3" - name: Configure AWS Credentials uses: aws-actions/configure-aws-credentials@v4 with: @@ -272,7 +83,7 @@ jobs: aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} role-duration-seconds: 7200 role-external-id: upload-pulumi-release - role-session-name: ${{ env.PROVIDER }}@githubActions + role-session-name: xyz@githubActions role-to-assume: ${{ secrets.AWS_UPLOAD_ROLE_ARN }} - id: version uses: pulumi/provider-version-action@v1 @@ -300,10 +111,14 @@ jobs: - id: version uses: pulumi/provider-version-action@v1 - name: Publish SDKs - uses: pulumi/pulumi-package-publisher@v0.0.15 + uses: pulumi/pulumi-package-publisher@v0.0.17 with: sdk: all version: ${{ steps.version.outputs.version }} + dotnet-version: "6.0.x" + java-version: "11" + node-version: "20.x" + python-version: "3.11.8" - env: SLACK_CHANNEL: provider-upgrade-publish-status SLACK_COLOR: "#FF0000" @@ -367,9 +182,9 @@ jobs: - name: Install Go uses: actions/setup-go@v5 with: + go-version: "1.21.x" cache-dependency-path: | - sdk/go.sum - go-version: 1.21.x + sdk/go.sum - name: Install pulumictl uses: jaxxstorm/action-install-gh-release@v1.11.0 with: @@ -378,41 +193,41 @@ jobs: - name: Install Pulumi CLI uses: pulumi/actions@v5 with: - pulumi-version: ^3 + pulumi-version: "^3" - name: Setup Node uses: actions/setup-node@v4 with: - node-version: ${{ env.NODEVERSION }} + node-version: "20.x" registry-url: https://registry.npmjs.org - name: Setup DotNet uses: actions/setup-dotnet@v4 with: - dotnet-version: ${{ env.DOTNETVERSION }} + dotnet-version: "6.0.x" - name: Setup Python uses: actions/setup-python@v5 with: - python-version: ${{ env.PYTHONVERSION }} + python-version: "3.11.8" - name: Setup Java uses: actions/setup-java@v4 with: cache: gradle distribution: temurin - java-version: ${{ env.JAVAVERSION }} + java-version: "11" - name: Setup Gradle uses: gradle/gradle-build-action@v3 with: - gradle-version: ${{ env.GRADLEVERSION }} + gradle-version: "7.6" - name: Download provider + tfgen binaries uses: actions/download-artifact@v4 with: - name: ${{ env.PROVIDER }}-provider.tar.gz + name: xyz-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-*-${{ env.PROVIDER }}" -print -exec chmod +x {} \; + find ${{ github.workspace }} -name "pulumi-*-xyz" -print -exec chmod +x {} \; - run: dotnet nuget add source ${{ github.workspace }}/nuget - name: Download SDK uses: actions/download-artifact@v4 diff --git a/.github/workflows/prerequisites.yml b/.github/workflows/prerequisites.yml new file mode 100644 index 00000000..7e4ed3c0 --- /dev/null +++ b/.github/workflows/prerequisites.yml @@ -0,0 +1,102 @@ +name: "Prerequisites" + +on: + workflow_call: + inputs: + is_pr: + type: boolean + required: true + is_automated: + type: boolean + required: true + default_branch: + type: string + required: true + +jobs: + prerequisites: + name: 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: Cache examples generation + uses: actions/cache@v4 + with: + path: | + .pulumi/examples-cache + key: ${{ runner.os }}-${{ hashFiles('provider/go.sum') }} + - name: Prepare upstream code + run: make upstream + - 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: + repo: pulumi/schema-tools + - name: Build schema generator binary + run: make tfgen_build_only + - name: Install plugins + run: make install_plugins + - name: Generate schema + run: make tfgen_no_deps + - name: Build provider binary + run: make provider_no_deps + - name: Unit-test provider code + run: make test_provider + - if: inputs.is_pr + name: Check Schema is Valid + run: | + EOF=$(dd if=/dev/urandom bs=15 count=1 status=none | base64) + { + echo "SCHEMA_CHANGES<<$EOF"; + schema-tools compare -p xyz -o ${{ inputs.default_branch }} -n --local-path=provider/cmd/pulumi-resource-xyz/schema.json; + echo "$EOF"; + } >> "$GITHUB_ENV" + - if: inputs.is_pr && inputs.is_automated == false + name: Comment on PR with Details of Schema Check + uses: thollander/actions-comment-pull-request@v2 + with: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + comment_tag: schemaCheck + message: >+ + ${{ 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-xyz + pulumi-tfgen-xyz + - name: Upload artifacts + uses: actions/upload-artifact@v4 + with: + name: xyz-provider.tar.gz + path: ${{ github.workspace }}/bin/provider.tar.gz + retention-days: 30 + - if: failure() && inputs.is_pr + name: Notify Slack + uses: 8398a7/action-slack@v3 + with: + author_name: Failure in building provider prerequisites + fields: repo,commit,author,action + status: ${{ job.status }} diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 230fd370..984a975d 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -1,16 +1,8 @@ # WARNING: This file is autogenerated - changes will be overwritten if not made via https://github.com/pulumi/ci-mgmt env: - PROVIDER: xyz - DOTNETVERSION: | - 6.0.x - 3.1.301 GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - GOVERSION: 1.21.x - GRADLEVERSION: "7.6" - JAVAVERSION: "11" NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} - NODEVERSION: 20.x NPM_TOKEN: ${{ secrets.NPM_TOKEN }} NUGET_PUBLISH_KEY: ${{ secrets.NUGET_PUBLISH_KEY }} PUBLISH_REPO_PASSWORD: ${{ secrets.OSSRH_PASSWORD }} @@ -22,13 +14,11 @@ env: PULUMI_MISSING_DOCS_ERROR: true PYPI_PASSWORD: ${{ secrets.PYPI_API_TOKEN }} PYPI_USERNAME: __token__ - PYTHONVERSION: 3.11.8 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 XYZ_REGION: us-west-2 jobs: comment-on-pr: @@ -49,5 +39,3 @@ jobs: name: pull-request on: pull_request_target: {} - - diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 610ed40a..46ed493c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,16 +1,8 @@ # WARNING: This file is autogenerated - changes will be overwritten if not made via https://github.com/pulumi/ci-mgmt env: - PROVIDER: xyz - DOTNETVERSION: | - 6.0.x - 3.1.301 GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - GOVERSION: 1.21.x - GRADLEVERSION: "7.6" - JAVAVERSION: "11" NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} - NODEVERSION: 20.x NPM_TOKEN: ${{ secrets.NPM_TOKEN }} NUGET_PUBLISH_KEY: ${{ secrets.NUGET_PUBLISH_KEY }} PUBLISH_REPO_PASSWORD: ${{ secrets.OSSRH_PASSWORD }} @@ -22,119 +14,18 @@ env: PULUMI_MISSING_DOCS_ERROR: true PYPI_PASSWORD: ${{ secrets.PYPI_API_TOKEN }} PYPI_USERNAME: __token__ - PYTHONVERSION: 3.11.8 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 XYZ_REGION: us-west-2 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: - cache-dependency-path: | - sdk/go.sum - go-version: 1.21.x - - 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: ${{ env.NODEVERSION }} - registry-url: https://registry.npmjs.org - - name: Setup DotNet - uses: actions/setup-dotnet@v4 - with: - dotnet-version: ${{ env.DOTNETVERSION }} - - name: Setup Python - uses: actions/setup-python@v5 - with: - python-version: ${{ env.PYTHONVERSION }} - - name: Setup Java - uses: actions/setup-java@v4 - with: - cache: gradle - distribution: temurin - java-version: ${{ env.JAVAVERSION }} - - name: Setup Gradle - uses: gradle/gradle-build-action@v3 - with: - gradle-version: ${{ env.GRADLEVERSION }} - - name: Download provider + tfgen binaries - uses: actions/download-artifact@v4 - with: - name: ${{ env.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-*-${{ env.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 - with: - allowed-changes: | - sdk/**/pulumi-plugin.json - sdk/dotnet/Pulumi.*.csproj - sdk/go/*/internal/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 @@ -149,7 +40,7 @@ jobs: - env: GITHUB_TOKEN: ${{ secrets.PULUMI_BOT_TOKEN }} name: Dispatch Event - run: pulumictl create docs-build pulumi-${{ env.PROVIDER }} + run: pulumictl create docs-build pulumi-xyz "${GITHUB_REF#refs/tags/}" lint: name: lint @@ -160,92 +51,12 @@ jobs: uses: ./.github/workflows/license.yml secrets: inherit prerequisites: - name: 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: Cache examples generation - uses: actions/cache@v4 - with: - path: | - .pulumi/examples-cache - key: ${{ runner.os }}-${{ hashFiles('provider/go.sum') }} - - name: Prepare upstream code - run: make upstream - - 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: github.event_name == 'pull_request' - name: Install Schema Tools - uses: jaxxstorm/action-install-gh-release@v1.11.0 - with: - repo: pulumi/schema-tools - - name: Build schema generator binary - run: make tfgen_build_only - - name: Install plugins - run: make install_plugins - - name: Generate schema - run: make tfgen_no_deps - - name: Build provider binary - run: make provider_no_deps - - name: Unit-test provider code - run: make test_provider - - if: github.event_name == 'pull_request' - name: Check Schema is Valid - 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@v2 - with: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - comment_tag: schemaCheck - message: >+ - ${{ 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 }} - pulumi-tfgen-${{ env.PROVIDER }} - - name: Upload artifacts - uses: actions/upload-artifact@v4 - with: - name: ${{ env.PROVIDER }}-provider.tar.gz - path: ${{ github.workspace }}/bin/provider.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 provider prerequisites - fields: repo,commit,author,action - status: ${{ job.status }} - + uses: ./.github/workflows/prerequisites.yml + secrets: inherit + with: + default_branch: ${{ github.event.repository.default_branch }} + is_pr: ${{ github.event_name == 'pull_request' }} + is_automated: ${{ github.actor == 'dependabot[bot]' }} publish: name: publish @@ -266,9 +77,9 @@ jobs: - name: Install Go uses: actions/setup-go@v5 with: + go-version: "1.21.x" cache-dependency-path: | - sdk/go.sum - go-version: 1.21.x + sdk/go.sum - name: Install pulumictl uses: jaxxstorm/action-install-gh-release@v1.11.0 with: @@ -277,7 +88,7 @@ jobs: - name: Install Pulumi CLI uses: pulumi/actions@v5 with: - pulumi-version: ^3 + pulumi-version: "^3" - name: Configure AWS Credentials uses: aws-actions/configure-aws-credentials@v4 with: @@ -286,7 +97,7 @@ jobs: aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} role-duration-seconds: 7200 role-external-id: upload-pulumi-release - role-session-name: ${{ env.PROVIDER }}@githubActions + role-session-name: xyz@githubActions role-to-assume: ${{ secrets.AWS_UPLOAD_ROLE_ARN }} - id: version uses: pulumi/provider-version-action@v1 @@ -313,10 +124,14 @@ jobs: - id: version uses: pulumi/provider-version-action@v1 - name: Publish SDKs - uses: pulumi/pulumi-package-publisher@v0.0.15 + uses: pulumi/pulumi-package-publisher@v0.0.17 with: sdk: all version: ${{ steps.version.outputs.version }} + dotnet-version: "6.0.x" + java-version: "11" + node-version: "20.x" + python-version: "3.11.8" - env: SLACK_CHANNEL: provider-upgrade-publish-status SLACK_COLOR: "#FF0000" @@ -398,9 +213,9 @@ jobs: - name: Install Go uses: actions/setup-go@v5 with: + go-version: "1.21.x" cache-dependency-path: | - sdk/go.sum - go-version: 1.21.x + sdk/go.sum - name: Install pulumictl uses: jaxxstorm/action-install-gh-release@v1.11.0 with: @@ -409,41 +224,41 @@ jobs: - name: Install Pulumi CLI uses: pulumi/actions@v5 with: - pulumi-version: ^3 + pulumi-version: "^3" - name: Setup Node uses: actions/setup-node@v4 with: - node-version: ${{ env.NODEVERSION }} + node-version: "20.x" registry-url: https://registry.npmjs.org - name: Setup DotNet uses: actions/setup-dotnet@v4 with: - dotnet-version: ${{ env.DOTNETVERSION }} + dotnet-version: "6.0.x" - name: Setup Python uses: actions/setup-python@v5 with: - python-version: ${{ env.PYTHONVERSION }} + python-version: "3.11.8" - name: Setup Java uses: actions/setup-java@v4 with: cache: gradle distribution: temurin - java-version: ${{ env.JAVAVERSION }} + java-version: "11" - name: Setup Gradle uses: gradle/gradle-build-action@v3 with: - gradle-version: ${{ env.GRADLEVERSION }} + gradle-version: "7.6" - name: Download provider + tfgen binaries uses: actions/download-artifact@v4 with: - name: ${{ env.PROVIDER }}-provider.tar.gz + name: xyz-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-*-${{ env.PROVIDER }}" -print -exec chmod +x {} \; + find ${{ github.workspace }} -name "pulumi-*-xyz" -print -exec chmod +x {} \; - run: dotnet nuget add source ${{ github.workspace }}/nuget - name: Download SDK uses: actions/download-artifact@v4 diff --git a/.github/workflows/resync-build.yml b/.github/workflows/resync-build.yml index 72bc762f..45fb5514 100644 --- a/.github/workflows/resync-build.yml +++ b/.github/workflows/resync-build.yml @@ -1,18 +1,10 @@ # WARNING: This file is autogenerated - changes will be overwritten if not made via https://github.com/pulumi/ci-mgmt env: - PROVIDER: xyz PULUMI_EXTRA_MAPPING_ERROR: true PULUMI_MISSING_MAPPING_ERROR: true - DOTNETVERSION: | - 6.0.x - 3.1.301 GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - GOVERSION: 1.21.x - GRADLEVERSION: "7.6" - JAVAVERSION: "11" NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} - NODEVERSION: 20.x NPM_TOKEN: ${{ secrets.NPM_TOKEN }} NUGET_PUBLISH_KEY: ${{ secrets.NUGET_PUBLISH_KEY }} PUBLISH_REPO_PASSWORD: ${{ secrets.OSSRH_PASSWORD }} @@ -24,13 +16,11 @@ env: PULUMI_MISSING_DOCS_ERROR: true PYPI_PASSWORD: ${{ secrets.PYPI_API_TOKEN }} PYPI_USERNAME: __token__ - PYTHONVERSION: 3.11.8 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 XYZ_REGION: us-west-2 jobs: resync_build: @@ -50,9 +40,9 @@ jobs: - name: Install Go uses: actions/setup-go@v5 with: + go-version: "1.21.x" cache-dependency-path: | - sdk/go.sum - go-version: 1.21.x + sdk/go.sum - name: Install pulumictl uses: jaxxstorm/action-install-gh-release@v1.11.0 with: @@ -61,20 +51,20 @@ jobs: - name: Install Pulumi CLI uses: pulumi/actions@v5 with: - pulumi-version: ^3 + pulumi-version: "^3" - name: Setup DotNet uses: actions/setup-dotnet@v4 with: - dotnet-version: ${{ env.DOTNETVERSION }} + dotnet-version: "6.0.x" - name: Setup Node uses: actions/setup-node@v4 with: - node-version: ${{ env.NODEVERSION }} + node-version: "20.x" registry-url: https://registry.npmjs.org - name: Setup Python uses: actions/setup-python@v5 with: - python-version: ${{ env.PYTHONVERSION }} + python-version: "3.11.8" - name: Sync with ci-mgmt run: cp -r "ci-mgmt/provider-ci/providers/$PROVIDER/repo/." . - name: Remove ci-mgmt directory @@ -105,11 +95,11 @@ jobs: 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 }} + commit-message: Resync build for pulumi-xyz committer: pulumi-bot labels: impact/no-changelog-required team-reviewers: platform-integrations - title: Fix up build for pulumi-${{ env.PROVIDER }} + title: Fix up build for pulumi-xyz token: ${{ secrets.PULUMI_BOT_TOKEN }} name: Resync build on: diff --git a/.github/workflows/run-acceptance-tests.yml b/.github/workflows/run-acceptance-tests.yml index 2ac44a78..f86242ae 100644 --- a/.github/workflows/run-acceptance-tests.yml +++ b/.github/workflows/run-acceptance-tests.yml @@ -1,17 +1,9 @@ # WARNING: This file is autogenerated - changes will be overwritten if not made via https://github.com/pulumi/ci-mgmt env: - PROVIDER: xyz PR_COMMIT_SHA: ${{ github.event.client_payload.pull_request.head.sha }} - DOTNETVERSION: | - 6.0.x - 3.1.301 GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - GOVERSION: 1.21.x - GRADLEVERSION: "7.6" - JAVAVERSION: "11" NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} - NODEVERSION: 20.x NPM_TOKEN: ${{ secrets.NPM_TOKEN }} NUGET_PUBLISH_KEY: ${{ secrets.NUGET_PUBLISH_KEY }} PUBLISH_REPO_PASSWORD: ${{ secrets.OSSRH_PASSWORD }} @@ -23,13 +15,11 @@ env: PULUMI_MISSING_DOCS_ERROR: true PYPI_PASSWORD: ${{ secrets.PYPI_API_TOKEN }} PYPI_USERNAME: __token__ - PYTHONVERSION: 3.11.8 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 XYZ_REGION: us-west-2 # This should cancel any previous runs of the same workflow on the same branch which are still running. @@ -42,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: - cache-dependency-path: | - sdk/go.sum - go-version: 1.21.x - - 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: ${{ env.NODEVERSION }} - registry-url: https://registry.npmjs.org - - name: Setup DotNet - uses: actions/setup-dotnet@v4 - with: - dotnet-version: ${{ env.DOTNETVERSION }} - - name: Setup Python - uses: actions/setup-python@v5 - with: - python-version: ${{ env.PYTHONVERSION }} - - name: Setup Java - uses: actions/setup-java@v4 - with: - cache: gradle - distribution: temurin - java-version: ${{ env.JAVAVERSION }} - - name: Setup Gradle - uses: gradle/gradle-build-action@v3 - with: - gradle-version: ${{ env.GRADLEVERSION }} - - name: Download provider + tfgen binaries - uses: actions/download-artifact@v4 - with: - name: ${{ env.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-*-${{ env.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 - with: - allowed-changes: | - sdk/**/pulumi-plugin.json - sdk/dotnet/Pulumi.*.csproj - sdk/go/*/internal/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' @@ -170,132 +59,34 @@ jobs: prerequisites: if: github.event_name == 'repository_dispatch' || github.event.pull_request.head.repo.full_name == github.repository - name: 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: Cache examples generation - uses: actions/cache@v4 - with: - path: | - .pulumi/examples-cache - key: ${{ runner.os }}-${{ hashFiles('provider/go.sum') }} - - name: Prepare upstream code - run: make upstream - - 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: github.event_name == 'pull_request' - name: Install Schema Tools - uses: jaxxstorm/action-install-gh-release@v1.11.0 - with: - repo: pulumi/schema-tools - - name: Build schema generator binary - run: make tfgen_build_only - - name: Install plugins - run: make install_plugins - - name: Generate schema - run: make tfgen_no_deps - - name: Build provider binary - run: make provider_no_deps - - name: Unit-test provider code - run: make test_provider - - if: github.event_name == 'pull_request' - name: Check Schema is Valid - 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@v2 - with: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - comment_tag: schemaCheck - message: >+ - ${{ 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 }} - pulumi-tfgen-${{ env.PROVIDER }} - - name: Upload artifacts - uses: actions/upload-artifact@v4 - with: - name: ${{ env.PROVIDER }}-provider.tar.gz - path: ${{ github.workspace }}/bin/provider.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 provider prerequisites - fields: repo,commit,author,action - status: ${{ job.status }} - + uses: ./.github/workflows/prerequisites.yml + secrets: inherit + with: + default_branch: ${{ github.event.repository.default_branch }} + is_pr: ${{ github.event_name == 'pull_request' }} + is_automated: ${{ github.actor == 'dependabot[bot]' }} sentinel: name: sentinel - # We would like to be able to specify `sentinel` as the only required job for this - # workflow. To do that, we need `sentinel` to succeed only when it is safe to - # merge and fail in all other cases. - # - # We can't use the default `if: success()`, since GitHub interprets a skipped job as a - # success, and by default a dependee job failing will skip a dependent job. That means - # if a test step fails, then it will skip `sentinel` so GitHub will register - # `sentinel` as succeeded. - # - # GitHub documents `jobs.result` as: - # - # The result of a job in the reusable workflow. Possible values are success, - # failure, cancelled, or skipped. - # - # GitHub documents `cancelled()` as: - # - # Returns true if the workflow was canceled. - # - # Combining these terms gives us an intuitive definition of success: - # - # We have succeeded when no dependent workflow has failed and the job was - # not cancelled. - # - if: (github.event_name == 'repository_dispatch' || - github.event.pull_request.head.repo.full_name == github.repository) && - ! cancelled() + if: github.event_name == 'repository_dispatch' || + github.event.pull_request.head.repo.full_name == github.repository needs: - test - license_check - lint runs-on: ubuntu-latest steps: - - name: Workflow is not a success - if: contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') || contains(needs.*.result, 'skipped') - run: exit 1 - - name: Workflow is a success - run: echo "🎉🎈🎉🎈🎉" + - uses: guibranco/github-status-action-v2@0849440ec82c5fa69b2377725b9b7852a3977e76 + with: + authToken: ${{secrets.GITHUB_TOKEN}} + # Write an explicit status check called "Sentinel" which will only pass if this code really runs. + # This should always be a required check for PRs. + context: 'Sentinel' + description: 'All required checks passed' + state: 'success' + # Write to the PR commit SHA if it's available as we don't want the merge commit sha, + # otherwise use the current SHA for any other type of build. + sha: ${{ github.event.pull_request.head.sha || github.sha }} test: if: github.event_name == 'repository_dispatch' || @@ -323,9 +114,9 @@ jobs: - name: Install Go uses: actions/setup-go@v5 with: + go-version: "1.21.x" cache-dependency-path: | - sdk/go.sum - go-version: 1.21.x + sdk/go.sum - name: Install pulumictl uses: jaxxstorm/action-install-gh-release@v1.11.0 with: @@ -334,41 +125,41 @@ jobs: - name: Install Pulumi CLI uses: pulumi/actions@v5 with: - pulumi-version: ^3 + pulumi-version: "^3" - name: Setup Node uses: actions/setup-node@v4 with: - node-version: ${{ env.NODEVERSION }} + node-version: "20.x" registry-url: https://registry.npmjs.org - name: Setup DotNet uses: actions/setup-dotnet@v4 with: - dotnet-version: ${{ env.DOTNETVERSION }} + dotnet-version: "6.0.x" - name: Setup Python uses: actions/setup-python@v5 with: - python-version: ${{ env.PYTHONVERSION }} + python-version: "3.11.8" - name: Setup Java uses: actions/setup-java@v4 with: cache: gradle distribution: temurin - java-version: ${{ env.JAVAVERSION }} + java-version: "11" - name: Setup Gradle uses: gradle/gradle-build-action@v3 with: - gradle-version: ${{ env.GRADLEVERSION }} + gradle-version: "7.6" - name: Download provider + tfgen binaries uses: actions/download-artifact@v4 with: - name: ${{ env.PROVIDER }}-provider.tar.gz + name: xyz-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-*-${{ env.PROVIDER }}" -print -exec chmod +x {} \; + find ${{ github.workspace }} -name "pulumi-*-xyz" -print -exec chmod +x {} \; - run: dotnet nuget add source ${{ github.workspace }}/nuget - name: Download SDK uses: actions/download-artifact@v4 diff --git a/Makefile b/Makefile index dc2aab28..8c65d060 100644 --- a/Makefile +++ b/Makefile @@ -12,6 +12,7 @@ TESTPARALLELISM := 10 WORKING_DIR := $(shell pwd) PULUMI_PROVIDER_BUILD_PARALLELISM ?= -p 2 PULUMI_CONVERT := 1 +PULUMI_MISSING_DOCS_ERROR := true # Override during CI using `make [TARGET] PROVIDER_VERSION=""` or by setting a PROVIDER_VERSION environment variable # Local & branch builds will just used this fixed default version unless specified @@ -35,7 +36,6 @@ install_sdks: install_dotnet_sdk install_python_sdk install_nodejs_sdk install_j only_build: build -build_dotnet: DOTNET_VERSION := $(shell pulumictl convert-version --language dotnet -v "$(VERSION_GENERIC)") build_dotnet: export PULUMI_HOME := $(WORKING_DIR)/.pulumi build_dotnet: export PATH := $(WORKING_DIR)/.pulumi/bin:$(PATH) build_dotnet: export PULUMI_CONVERT_EXAMPLES_CACHE_DIR := $(WORKING_DIR)/.pulumi/examples-cache @@ -44,7 +44,7 @@ build_dotnet: upstream cd sdk/dotnet/ && \ printf "module fake_dotnet_module // Exclude this directory from Go tools\n\ngo 1.17\n" > go.mod && \ echo "$(VERSION_GENERIC)" >version.txt && \ - dotnet build /p:Version=$(DOTNET_VERSION) + dotnet build build_go: export PULUMI_HOME := $(WORKING_DIR)/.pulumi build_go: export PATH := $(WORKING_DIR)/.pulumi/bin:$(PATH) @@ -64,7 +64,6 @@ build_java: bin/pulumi-java-gen upstream gradle --console=plain build && \ gradle --console=plain javadoc -build_nodejs: NODE_VERSION := $(shell pulumictl convert-version --language javascript -v "$(VERSION_GENERIC)") build_nodejs: export PULUMI_HOME := $(WORKING_DIR)/.pulumi build_nodejs: export PATH := $(WORKING_DIR)/.pulumi/bin:$(PATH) build_nodejs: export PULUMI_CONVERT_EXAMPLES_CACHE_DIR := $(WORKING_DIR)/.pulumi/examples-cache @@ -74,10 +73,8 @@ build_nodejs: upstream printf "module fake_nodejs_module // Exclude this directory from Go tools\n\ngo 1.17\n" > go.mod && \ yarn install && \ yarn run tsc && \ - cp ../../README.md ../../LICENSE* package.json yarn.lock ./bin/ && \ - sed -i.bak -e "s/\$${VERSION}/$(NODE_VERSION)/g" ./bin/package.json + cp ../../README.md ../../LICENSE* package.json yarn.lock ./bin/ -build_python: PYPI_VERSION := $(shell pulumictl convert-version --language python -v "$(VERSION_GENERIC)") build_python: export PULUMI_HOME := $(WORKING_DIR)/.pulumi build_python: export PATH := $(WORKING_DIR)/.pulumi/bin:$(PATH) build_python: export PULUMI_CONVERT_EXAMPLES_CACHE_DIR := $(WORKING_DIR)/.pulumi/examples-cache @@ -88,8 +85,7 @@ build_python: upstream printf "module fake_python_module // Exclude this directory from Go tools\n\ngo 1.17\n" > go.mod && \ cp ../../README.md . && \ rm -rf ./bin/ ../python.bin/ && cp -R . ../python.bin && mv ../python.bin ./bin && \ - sed -i.bak -e 's/^ version = .*/ version = "$(PYPI_VERSION)"/g' ./bin/pyproject.toml && \ - rm ./bin/pyproject.toml.bak && rm ./bin/go.mod && \ + rm ./bin/go.mod && \ python3 -m venv venv && \ ./venv/bin/python -m pip install build && \ cd ./bin && \ @@ -154,6 +150,7 @@ tfgen_no_deps: export PATH := $(WORKING_DIR)/.pulumi/bin:$(PATH) tfgen_no_deps: export PULUMI_CONVERT := $(PULUMI_CONVERT) tfgen_no_deps: export PULUMI_CONVERT_EXAMPLES_CACHE_DIR := $(WORKING_DIR)/.pulumi/examples-cache tfgen_no_deps: export PULUMI_DISABLE_AUTOMATIC_PLUGIN_ACQUISITION := $(PULUMI_CONVERT) +tfgen_no_deps: export PULUMI_MISSING_DOCS_ERROR := $(PULUMI_MISSING_DOCS_ERROR) tfgen_no_deps: tfgen_build_only $(WORKING_DIR)/bin/$(TFGEN) schema --out provider/cmd/$(PROVIDER) (cd provider && VERSION=$(VERSION_GENERIC) go generate cmd/$(PROVIDER)/main.go) diff --git a/scripts/upstream.sh b/scripts/upstream.sh index 7d35e3b6..d35932e0 100755 --- a/scripts/upstream.sh +++ b/scripts/upstream.sh @@ -79,17 +79,13 @@ start_rebase() { rm -rf .git/modules/upstream/rebase-merge cd upstream && git fetch - if [ -z "$TO" ]; then - echo "\$TO not set, assuming TO is the upstream SHA currently committed." - else - git checkout "$TO" - fi - git branch -f local if [ -n "$FROM" ]; then - git checkout -B pulumi-patch "$FROM" + echo "Rebasing from $FROM to $(git rev-parse HEAD)" + git checkout -B pulumi-patch "$FROM" else - git checkout -B pulumi-patch + echo "Rebasing in place at $(git rev-parse HEAD)" + git checkout -B pulumi-patch fi git branch --set-upstream-to=local pulumi-patch @@ -120,7 +116,7 @@ assert_rebase_in_progress() { Didn't detect an upstream rebase in progress. To start an upstream rebase, run - [FROM=vX.Y.Z] [TO=vA.B.C] make upstream.rebase + [FROM=vX.Y.Z] make upstream.rebase If you are absolutly sure you are already in a rebase, run @@ -149,7 +145,7 @@ make "$1"' failed to apply ${patch}. This is because there is a conflict between the checked out version of upstream and the patch set. To resolve this conflict run: - FROM=\$LAST_KNOWN_GOOD_COMMIT TO=\$NEW_COMMIT make upstream.rebase + FROM=\$LAST_KNOWN_GOOD_COMMIT make upstream.rebase This will walk you through resolving the conflict and producing a patch set that cleanly applies to the current upstream.