From 3bbe412d0533774161022289706cdf3d5eb19392 Mon Sep 17 00:00:00 2001 From: Erik Rasmussen Date: Sun, 2 Jun 2024 20:26:11 -0500 Subject: [PATCH] Copy over most of the workflows from pulumi-ci-mgmt (#29) * Copy over most of the workflows from pulumi-ci-mgmt * Remove publish workflow * Copy over generated PR workflow * Codegen target * Set repo for schema-tools * Remove other extraneous workflows * Set github token * Copy over regenerated workflows * Regen workflows yet again * Remove make dep * Use pulumi bin if it exists * Build test image --- .github/workflows/build-test.yml | 225 ---------- .github/workflows/build.yml | 412 ++++++++++++++++++ .github/workflows/dev-version.yml | 35 -- .github/workflows/main.yml | 48 --- .github/workflows/prerelease.yml | 440 +++++++++++++++++++ .github/workflows/publish.yml | 281 ------------- .github/workflows/pull-request.yml | 351 ++++++++++++---- .github/workflows/release.yml | 468 +++++++++++++++++++-- .github/workflows/weekly-pulumi-update.yml | 114 +++++ .goreleaser.prerelease.yml | 31 ++ .goreleaser.yml | 60 +-- Makefile | 5 +- examples/examples_test.go | 10 +- go.work.sum | 20 +- 14 files changed, 1767 insertions(+), 733 deletions(-) delete mode 100644 .github/workflows/build-test.yml create mode 100644 .github/workflows/build.yml delete mode 100644 .github/workflows/dev-version.yml delete mode 100644 .github/workflows/main.yml create mode 100644 .github/workflows/prerelease.yml delete mode 100644 .github/workflows/publish.yml create mode 100644 .github/workflows/weekly-pulumi-update.yml create mode 100644 .goreleaser.prerelease.yml diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml deleted file mode 100644 index 3e274b3..0000000 --- a/.github/workflows/build-test.yml +++ /dev/null @@ -1,225 +0,0 @@ -name: build-test - -on: - workflow_call: - inputs: - ref: - required: true - type: string - version: - type: string - description: Version to be used to build the binaries, schema and SDKs - required: true - short_test: - type: boolean - description: Skip longer running tests - default: false - retention_days: - type: number - description: The number of days for which we retain assets - default: 30 - -env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - PROVIDER: commandx - PROVIDER_VERSION: ${{ inputs.version }} - PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_ACCESS_TOKEN }} - PULUMI_LOCAL_NUGET: ${{ github.workspace }}/nuget - PULUMI_GO_DEP_ROOT: ${{ github.workspace }}/.. - -jobs: - prerequisites: - runs-on: ubuntu-latest - name: Build binaries and schema - steps: - - name: Checkout Repo - uses: actions/checkout@v4 - with: - ref: ${{ inputs.ref }} - - - name: Install Languages & Frameworks - uses: ./.github/actions/install - with: - skip_dotnet_and_java: "true" - - - name: Build binaries - run: make provider - - - name: Artifact capture - uses: ./.github/actions/prerequisites-artifact-capture - - - name: Check worktree clean - uses: pulumi/git-status-check-action@v1 - with: - allowed-changes: |- - sdk/**/pulumi-plugin.json - sdk/dotnet/*.csproj - sdk/go/*/internal/pulumiUtilities.go - sdk/nodejs/package.json - sdk/python/pyproject.toml - sdk/java/build.gradle - - run: git status --porcelain - - build_sdks: - needs: prerequisites - runs-on: ubuntu-latest - strategy: - fail-fast: true - matrix: - language: - - nodejs - - python - - dotnet - - go - - java - name: Build SDKs - steps: - - name: Checkout Repo - uses: actions/checkout@v4 - with: - ref: ${{ inputs.ref }} - - - name: Install Languages & Frameworks - uses: ./.github/actions/install - - - run: make ensure - - - name: Prerequisites artifact restore - uses: ./.github/actions/prerequisites-artifact-restore - - - name: Mark prerequisites as up-to-date - run: make --touch provider - - - name: Generate SDK - run: make generate_${{ matrix.language }} - - - 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/*.csproj - sdk/go/*/internal/pulumiUtilities.go - sdk/nodejs/package.json - sdk/python/pyproject.toml - sdk/java/build.gradle - - run: git status --porcelain - - - name: Tar 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: ${{ inputs.retention_days }} - - test_sdks: - needs: build_sdks - runs-on: ubuntu-latest - strategy: - fail-fast: true - matrix: - language: - - nodejs - - python - - dotnet - - go - - java - name: Test SDKs - steps: - - name: Checkout Repo - uses: actions/checkout@v4 - with: - ref: ${{ inputs.ref }} - - - name: Setup - uses: ./.github/actions/test-setup - with: - language: ${{ matrix.language }} - - - name: Build test image - uses: ./.github/actions/build-test-image - - - name: Run tests - if: ${{ ! inputs.short_test }} - run: | - set -euo pipefail - cd examples && go test -v -json -cover -timeout 2h -tags=${{ matrix.language }} -parallel 16 . 2>&1 | tee /tmp/gotest.log | gotestfmt - - - name: Run short tests - if: inputs.short_test - run: | - set -euo pipefail - cd examples && go test -v -json -cover -timeout 15m -short -tags=${{ matrix.language }} -parallel 16 . 2>&1 | tee /tmp/gotest.log | gotestfmt - - test_provider: - runs-on: ubuntu-latest - name: Test Provider - needs: prerequisites - steps: - - name: Checkout Repo - uses: actions/checkout@v4 - with: - ref: ${{ inputs.ref }} - - - name: Install Languages & Frameworks - uses: ./.github/actions/install - with: - skip_dotnet_and_java: "true" - - - name: Install gotestfmt - uses: jaxxstorm/action-install-gh-release@v1.12.0 - with: - tag: v2.5.0 - repo: GoTestTools/gotestfmt - - - run: make ensure - - - name: Prerequisites artifact restore - uses: ./.github/actions/prerequisites-artifact-restore - - # Enable when we actually have some tests - # - name: Test Provider Library - # run: | - # set -euo pipefail - # cd provider && go test -v -json -coverprofile="coverage.txt" -coverpkg=./... -timeout 1h -parallel 16 ./... 2>&1 | tee /tmp/gotest.log | gotestfmt - - # - name: Upload coverage reports to Codecov - # uses: codecov/codecov-action@v4 - # env: - # CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} - - dist: - runs-on: ubuntu-latest - name: Provider Dist - needs: prerequisites - steps: - - name: Checkout Repo - uses: actions/checkout@v4 - with: - ref: ${{ inputs.ref }} - - - name: Install Languages & Frameworks - uses: ./.github/actions/install - with: - skip_dotnet_and_java: "true" - - - run: make ensure - - - name: Prerequisites artifact restore - uses: ./.github/actions/prerequisites-artifact-restore - - - name: Build dist packages - run: make dist --jobs=2 - - - name: Upload artifacts - uses: actions/upload-artifact@v4 - with: - name: dist - path: dist - retention-days: ${{ inputs.retention_days }} diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..c59a8e9 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,412 @@ +# WARNING: This file is autogenerated - changes will be overwritten if not made via https://github.com/UnstoppableMango/pulumi-ci-mgmt + +name: build +on: + push: + branches: + - main + paths-ignore: + - CHANGELOG.md + tags-ignore: + - v* + - sdk/* + - "**" + workflow_dispatch: {} +env: + PROVIDER: commandx + PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_ACCESS_TOKEN }} + PULUMI_LOCAL_NUGET: ${{ github.workspace }}/nuget + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + NUGET_PUBLISH_KEY: ${{ secrets.NUGET_PUBLISH_KEY }} + PYPI_USERNAME: __token__ + PYPI_PASSWORD: ${{ secrets.PYPI_API_TOKEN }} + PULUMI_GO_DEP_ROOT: ${{ github.workspace }}/.. + GOVERSION: 1.22.x + NODEVERSION: 20.x + PYTHONVERSION: "3.11" + DOTNETVERSION: | + 6.0.x + 3.1.301 + JAVAVERSION: "11" +jobs: + prerequisites: + runs-on: ubuntu-latest + name: prerequisites + steps: + - name: Checkout Repo + uses: actions/checkout@v4 + with: + lfs: true + - id: version + name: Set Provider Version + uses: pulumi/provider-version-action@v1 + with: + set-env: PROVIDER_VERSION + - name: Install Go + uses: actions/setup-go@v5 + with: + go-version: ${{ env.GOVERSION }} + cache-dependency-path: "**/*.sum" + - name: Install pulumictl + uses: jaxxstorm/action-install-gh-release@v1.11.0 + with: + repo: pulumi/pulumictl + - name: Install Pulumi CLI + uses: pulumi/actions@v5 + - 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 codegen binaries + run: make codegen + - name: Build Schema + run: make generate_schema + - if: github.event_name == 'pull_request' + name: Check Schema is Valid + run: >- + echo 'SCHEMA_CHANGES<> $GITHUB_ENV + + schema-tools compare -p ${{ env.PROVIDER }} -o ${{ github.event.repository.default_branch }} -n --local-path=provider/cmd/pulumi-resource-${{ env.PROVIDER }}/schema.json --repository=github://api.github.com/unstoppablemango >> $GITHUB_ENV + + echo 'EOF' >> $GITHUB_ENV + - if: github.event_name == 'pull_request' + name: Comment on PR with Details of Schema Check + uses: thollander/actions-comment-pull-request@v2 + with: + message: | + ${{ env.SCHEMA_CHANGES }} + comment_tag: schemaCheck + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Build Provider + run: make provider + - name: Check worktree clean + uses: pulumi/git-status-check-action@v1 + with: + allowed-changes: |- + sdk/**/pulumi-plugin.json + sdk/dotnet/*.csproj + sdk/go/**/pulumiUtilities.go + sdk/nodejs/package.json + sdk/python/pyproject.toml + sdk/java/build.gradle + - run: git status --porcelain + - name: Tar provider binaries + run: tar -zcf ${{ github.workspace }}/bin/provider.tar.gz -C ${{ + github.workspace}}/bin/ pulumi-resource-${{ env.PROVIDER }} + - name: Upload artifacts + uses: actions/upload-artifact@v4 + with: + name: pulumi-${{ env.PROVIDER }}-provider.tar.gz + path: ${{ github.workspace }}/bin/provider.tar.gz + build_sdks: + needs: prerequisites + runs-on: ubuntu-latest + strategy: + fail-fast: true + matrix: + language: + - nodejs + - python + - dotnet + - go + - java + name: build_sdks + steps: + - name: Checkout Repo + uses: actions/checkout@v4 + with: + lfs: true + - id: version + name: Set Provider Version + uses: pulumi/provider-version-action@v1 + with: + set-env: PROVIDER_VERSION + - name: Install Go + uses: actions/setup-go@v5 + with: + go-version: ${{ env.GOVERSION }} + cache-dependency-path: "**/*.sum" + - name: Install pulumictl + uses: jaxxstorm/action-install-gh-release@v1.11.0 + with: + repo: pulumi/pulumictl + - name: Install Pulumi CLI + uses: pulumi/actions@v5 + - 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: + java-version: ${{ env.JAVAVERSION }} + distribution: temurin + cache: gradle + - name: Setup Gradle + uses: gradle/actions/setup-gradle@v3 + with: + gradle-version: "7.6" + - name: Download provider + tfgen binaries + uses: actions/download-artifact@v4 + with: + name: pulumi-${{ 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 + - name: Restore Binary Permissions + run: find ${{ github.workspace }} -name "pulumi-*-${{ env.PROVIDER }}" -print + -exec chmod +x {} \; + - name: Generate SDK + run: make generate_${{ matrix.language }} + - 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/*.csproj + sdk/go/**/pulumiUtilities.go + sdk/nodejs/package.json + sdk/python/pyproject.toml + sdk/java/build.gradle + - run: git status --porcelain + - name: Tar 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 + test: + runs-on: ubuntu-latest + needs: + - build_sdks + strategy: + fail-fast: true + matrix: + language: + - nodejs + - python + - dotnet + - go + - java + name: test + permissions: + contents: read + id-token: write + steps: + - name: Checkout Repo + uses: actions/checkout@v4 + with: + lfs: true + - id: version + name: Set Provider Version + uses: pulumi/provider-version-action@v1 + with: + set-env: PROVIDER_VERSION + - name: Install Go + uses: actions/setup-go@v5 + with: + go-version: ${{ env.GOVERSION }} + cache-dependency-path: "**/*.sum" + - name: Install pulumictl + uses: jaxxstorm/action-install-gh-release@v1.11.0 + with: + repo: pulumi/pulumictl + - name: Install Pulumi CLI + uses: pulumi/actions@v5 + - 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: + java-version: ${{ env.JAVAVERSION }} + distribution: temurin + cache: gradle + - name: Setup Gradle + uses: gradle/actions/setup-gradle@v3 + with: + gradle-version: "7.6" + - name: Download provider + tfgen binaries + uses: actions/download-artifact@v4 + with: + name: pulumi-${{ 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 + - name: Restore Binary Permissions + run: find ${{ github.workspace }} -name "pulumi-*-${{ env.PROVIDER }}" -print + -exec chmod +x {} \; + - name: Download SDK + uses: actions/download-artifact@v4 + with: + name: ${{ matrix.language }}-sdk.tar.gz + path: ${{ github.workspace}}/sdk/ + - name: UnTar SDK folder + run: tar -zxf ${{ github.workspace}}/sdk/${{ matrix.language}}.tar.gz -C ${{ + github.workspace}}/sdk/${{ matrix.language}} + - name: Update path + run: echo "${{ github.workspace }}/bin" >> $GITHUB_PATH + - name: Install Node dependencies + run: yarn global add typescript + - run: dotnet nuget add source ${{ github.workspace }}/nuget + - name: Install Python deps + run: |- + pip3 install virtualenv==20.0.23 + pip3 install pipenv + - name: Install dependencies + run: make install_${{ matrix.language}}_sdk + - name: Install gotestfmt + uses: GoTestTools/gotestfmt-action@v2 + with: + version: v2.5.0 + token: ${{ secrets.GITHUB_TOKEN }} + - name: Build test image + uses: ./.github/actions/build-test-image + - name: Run tests + run: >- + set -euo pipefail + + cd examples && go test -v -json -count=1 -cover -timeout 2h -tags=${{ matrix.language }} -parallel 4 . 2>&1 | tee /tmp/gotest.log | gotestfmt + publish: + runs-on: ubuntu-latest + needs: test + name: publish + steps: + - name: Checkout Repo + uses: actions/checkout@v4 + with: + lfs: true + - id: version + name: Set Provider Version + uses: pulumi/provider-version-action@v1 + with: + set-env: PROVIDER_VERSION + - name: Install Go + uses: actions/setup-go@v5 + with: + go-version: ${{ env.GOVERSION }} + cache-dependency-path: "**/*.sum" + - name: Clear GitHub Actions Ubuntu runner disk space + uses: jlumbroso/free-disk-space@v1.3.1 + with: + tool-cache: false + dotnet: false + android: true + haskell: true + swap-storage: true + large-packages: false + - name: Install pulumictl + uses: jaxxstorm/action-install-gh-release@v1.11.0 + with: + repo: pulumi/pulumictl + - name: Install Pulumi CLI + uses: pulumi/actions@v5 + - name: Run GoReleaser + uses: goreleaser/goreleaser-action@v5 + env: + GORELEASER_CURRENT_TAG: v${{ steps.version.outputs.version }} + with: + args: -p 3 -f .goreleaser.prerelease.yml --clean --skip=validate --timeout 60m0s + version: latest + publish_sdk: + runs-on: ubuntu-latest + needs: publish + name: publish_sdk + steps: + - name: Checkout Repo + uses: actions/checkout@v4 + with: + lfs: true + - id: version + name: Set Provider Version + uses: pulumi/provider-version-action@v1 + with: + set-env: PROVIDER_VERSION + - name: Checkout Scripts Repo + uses: actions/checkout@v4 + with: + path: ci-scripts + repository: pulumi/scripts + - run: echo "ci-scripts" >> .git/info/exclude + - name: Install Go + uses: actions/setup-go@v5 + with: + go-version: ${{ env.GOVERSION }} + cache-dependency-path: "**/*.sum" + - name: Install pulumictl + uses: jaxxstorm/action-install-gh-release@v1.11.0 + with: + repo: pulumi/pulumictl + - name: Install Pulumi CLI + uses: pulumi/actions@v5 + - 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: Download python SDK + uses: actions/download-artifact@v4 + with: + name: python-sdk.tar.gz + path: ${{ github.workspace}}/sdk/ + - name: Uncompress python SDK + run: tar -zxf ${{github.workspace}}/sdk/python.tar.gz -C + ${{github.workspace}}/sdk/python + - name: Download dotnet SDK + uses: actions/download-artifact@v4 + with: + name: dotnet-sdk.tar.gz + path: ${{ github.workspace}}/sdk/ + - name: Uncompress dotnet SDK + run: tar -zxf ${{github.workspace}}/sdk/dotnet.tar.gz -C + ${{github.workspace}}/sdk/dotnet + - name: Download nodejs SDK + uses: actions/download-artifact@v4 + with: + name: nodejs-sdk.tar.gz + path: ${{ github.workspace}}/sdk/ + - name: Uncompress nodejs SDK + run: tar -zxf ${{github.workspace}}/sdk/nodejs.tar.gz -C + ${{github.workspace}}/sdk/nodejs + - name: Install Twine + run: python -m pip install pip twine + - name: Publish SDKs + run: ./scripts/publish_sdks.sh ${{ github.workspace }} + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + PYPI_PUBLISH_ARTIFACTS: all diff --git a/.github/workflows/dev-version.yml b/.github/workflows/dev-version.yml deleted file mode 100644 index f2e202e..0000000 --- a/.github/workflows/dev-version.yml +++ /dev/null @@ -1,35 +0,0 @@ -name: dev-version - -on: - workflow_call: - outputs: - version: - description: Calculated version - value: ${{ jobs.version.outputs.version }} - -env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - -jobs: - version: - runs-on: ubuntu-latest - name: Calculate Dev Version - steps: - - id: version - name: Calculate build version - run: | - GH_VERSION=$(gh release list --repo UnstoppableMango/pulumi-commandx --exclude-drafts --exclude-pre-releases --limit 1) - # Get latest stable release. Return only first column from result (tag). - LAST_VERSION=$(echo "${GH_VERSION}" | cut -f1) - # Use semver NPM CLI tool to find next minimal version - NEXT_VERSION=$(npx -y semver --increment patch "${LAST_VERSION}") - # Include an always-increasing number to order correctly - TIMESTAMP=$(date +%s) - # Indicate the commit the build came from - SHORTHASH=$(echo "${GITHUB_SHA}" | cut -c1-8) - # Combine all version components together - VERSION=${NEXT_VERSION}-alpha.${TIMESTAMP}+${SHORTHASH} - echo "${VERSION}" - echo "VERSION=$VERSION" >> "$GITHUB_OUTPUT" - outputs: - version: ${{ steps.version.outputs.VERSION }} diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml deleted file mode 100644 index c4b1a9e..0000000 --- a/.github/workflows/main.yml +++ /dev/null @@ -1,48 +0,0 @@ -name: main - -on: - push: - branches: - - main - paths-ignore: - - CHANGELOG.md - tags-ignore: - - v* - - sdk/* - - "**" - workflow_dispatch: - inputs: - short_test: - type: boolean - description: Skip longer running tests - default: false - -jobs: - version: - uses: ./.github/workflows/dev-version.yml - secrets: inherit - - build_test: - uses: ./.github/workflows/build-test.yml - secrets: inherit - needs: version - with: - ref: ${{ github.ref }} - version: ${{ needs.version.outputs.version }} - short_test: ${{ inputs.short_test || false }} - retention_days: 15 - - publish: - uses: ./.github/workflows/publish.yml - if: github.event_name != 'pull_request' - secrets: inherit - needs: - - version - - build_test - with: - ref: ${{ github.ref }} - version: ${{ needs.version.outputs.version }} - prerelease: true - # Skip creating the GH release draft because we never publish these prereleases. - # Push a prerelease tag instead if we want something that's publicly visible. - publishGhRelease: false diff --git a/.github/workflows/prerelease.yml b/.github/workflows/prerelease.yml new file mode 100644 index 0000000..3f919ec --- /dev/null +++ b/.github/workflows/prerelease.yml @@ -0,0 +1,440 @@ +# WARNING: This file is autogenerated - changes will be overwritten if not made via https://github.com/UnstoppableMango/pulumi-ci-mgmt + +name: prerelease +on: + push: + tags: + - v*.*.*-** +env: + PROVIDER: commandx + PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_ACCESS_TOKEN }} + PULUMI_LOCAL_NUGET: ${{ github.workspace }}/nuget + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + NUGET_PUBLISH_KEY: ${{ secrets.NUGET_PUBLISH_KEY }} + PYPI_USERNAME: __token__ + PYPI_PASSWORD: ${{ secrets.PYPI_API_TOKEN }} + PULUMI_GO_DEP_ROOT: ${{ github.workspace }}/.. + GOVERSION: 1.22.x + NODEVERSION: 20.x + PYTHONVERSION: "3.11" + DOTNETVERSION: | + 6.0.x + 3.1.301 + JAVAVERSION: "11" + IS_PRERELEASE: true +jobs: + prerequisites: + runs-on: ubuntu-latest + name: prerequisites + steps: + - name: Checkout Repo + uses: actions/checkout@v4 + with: + lfs: true + - id: version + name: Set Provider Version + uses: pulumi/provider-version-action@v1 + with: + set-env: PROVIDER_VERSION + - name: Install Go + uses: actions/setup-go@v5 + with: + go-version: ${{ env.GOVERSION }} + cache-dependency-path: "**/*.sum" + - name: Install pulumictl + uses: jaxxstorm/action-install-gh-release@v1.11.0 + with: + repo: pulumi/pulumictl + - name: Install Pulumi CLI + uses: pulumi/actions@v5 + - 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 codegen binaries + run: make codegen + - name: Build Schema + run: make generate_schema + - if: github.event_name == 'pull_request' + name: Check Schema is Valid + run: >- + echo 'SCHEMA_CHANGES<> $GITHUB_ENV + + schema-tools compare -p ${{ env.PROVIDER }} -o ${{ github.event.repository.default_branch }} -n --local-path=provider/cmd/pulumi-resource-${{ env.PROVIDER }}/schema.json --repository=github://api.github.com/unstoppablemango >> $GITHUB_ENV + + echo 'EOF' >> $GITHUB_ENV + - if: github.event_name == 'pull_request' + name: Comment on PR with Details of Schema Check + uses: thollander/actions-comment-pull-request@v2 + with: + message: | + ${{ env.SCHEMA_CHANGES }} + comment_tag: schemaCheck + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Build Provider + run: make provider + - name: Check worktree clean + uses: pulumi/git-status-check-action@v1 + with: + allowed-changes: |- + sdk/**/pulumi-plugin.json + sdk/dotnet/*.csproj + sdk/go/**/pulumiUtilities.go + sdk/nodejs/package.json + sdk/python/pyproject.toml + sdk/java/build.gradle + - run: git status --porcelain + - name: Tar provider binaries + run: tar -zcf ${{ github.workspace }}/bin/provider.tar.gz -C ${{ + github.workspace}}/bin/ pulumi-resource-${{ env.PROVIDER }} + - name: Upload artifacts + uses: actions/upload-artifact@v4 + with: + name: pulumi-${{ env.PROVIDER }}-provider.tar.gz + path: ${{ github.workspace }}/bin/provider.tar.gz + build_sdks: + needs: prerequisites + runs-on: ubuntu-latest + strategy: + fail-fast: true + matrix: + language: + - nodejs + - python + - dotnet + - go + - java + name: build_sdks + steps: + - name: Checkout Repo + uses: actions/checkout@v4 + with: + lfs: true + - id: version + name: Set Provider Version + uses: pulumi/provider-version-action@v1 + with: + set-env: PROVIDER_VERSION + - name: Install Go + uses: actions/setup-go@v5 + with: + go-version: ${{ env.GOVERSION }} + cache-dependency-path: "**/*.sum" + - name: Install pulumictl + uses: jaxxstorm/action-install-gh-release@v1.11.0 + with: + repo: pulumi/pulumictl + - name: Install Pulumi CLI + uses: pulumi/actions@v5 + - 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: + java-version: ${{ env.JAVAVERSION }} + distribution: temurin + cache: gradle + - name: Setup Gradle + uses: gradle/actions/setup-gradle@v3 + with: + gradle-version: "7.6" + - name: Download provider + tfgen binaries + uses: actions/download-artifact@v4 + with: + name: pulumi-${{ 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 + - name: Restore Binary Permissions + run: find ${{ github.workspace }} -name "pulumi-*-${{ env.PROVIDER }}" -print + -exec chmod +x {} \; + - name: Generate SDK + run: make generate_${{ matrix.language }} + - 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/*.csproj + sdk/go/**/pulumiUtilities.go + sdk/nodejs/package.json + sdk/python/pyproject.toml + sdk/java/build.gradle + - run: git status --porcelain + - name: Tar 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 + test: + runs-on: ubuntu-latest + needs: + - build_sdks + strategy: + fail-fast: true + matrix: + language: + - nodejs + - python + - dotnet + - go + - java + name: test + permissions: + contents: read + id-token: write + steps: + - name: Checkout Repo + uses: actions/checkout@v4 + with: + lfs: true + - id: version + name: Set Provider Version + uses: pulumi/provider-version-action@v1 + with: + set-env: PROVIDER_VERSION + - name: Install Go + uses: actions/setup-go@v5 + with: + go-version: ${{ env.GOVERSION }} + cache-dependency-path: "**/*.sum" + - name: Install pulumictl + uses: jaxxstorm/action-install-gh-release@v1.11.0 + with: + repo: pulumi/pulumictl + - name: Install Pulumi CLI + uses: pulumi/actions@v5 + - 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: + java-version: ${{ env.JAVAVERSION }} + distribution: temurin + cache: gradle + - name: Setup Gradle + uses: gradle/actions/setup-gradle@v3 + with: + gradle-version: "7.6" + - name: Download provider + tfgen binaries + uses: actions/download-artifact@v4 + with: + name: pulumi-${{ 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 + - name: Restore Binary Permissions + run: find ${{ github.workspace }} -name "pulumi-*-${{ env.PROVIDER }}" -print + -exec chmod +x {} \; + - name: Download SDK + uses: actions/download-artifact@v4 + with: + name: ${{ matrix.language }}-sdk.tar.gz + path: ${{ github.workspace}}/sdk/ + - name: UnTar SDK folder + run: tar -zxf ${{ github.workspace}}/sdk/${{ matrix.language}}.tar.gz -C ${{ + github.workspace}}/sdk/${{ matrix.language}} + - name: Update path + run: echo "${{ github.workspace }}/bin" >> $GITHUB_PATH + - name: Install Node dependencies + run: yarn global add typescript + - run: dotnet nuget add source ${{ github.workspace }}/nuget + - name: Install Python deps + run: |- + pip3 install virtualenv==20.0.23 + pip3 install pipenv + - name: Install dependencies + run: make install_${{ matrix.language}}_sdk + - name: Install gotestfmt + uses: GoTestTools/gotestfmt-action@v2 + with: + version: v2.5.0 + token: ${{ secrets.GITHUB_TOKEN }} + - name: Build test image + uses: ./.github/actions/build-test-image + - name: Run tests + run: >- + set -euo pipefail + + cd examples && go test -v -json -count=1 -cover -timeout 2h -tags=${{ matrix.language }} -parallel 4 . 2>&1 | tee /tmp/gotest.log | gotestfmt + publish: + runs-on: ubuntu-latest + needs: test + name: publish + steps: + - name: Checkout Repo + uses: actions/checkout@v4 + with: + lfs: true + - id: version + name: Set Provider Version + uses: pulumi/provider-version-action@v1 + with: + set-env: PROVIDER_VERSION + - name: Install Go + uses: actions/setup-go@v5 + with: + go-version: ${{ env.GOVERSION }} + cache-dependency-path: "**/*.sum" + - name: Clear GitHub Actions Ubuntu runner disk space + uses: jlumbroso/free-disk-space@v1.3.1 + with: + tool-cache: false + dotnet: false + android: true + haskell: true + swap-storage: true + large-packages: false + - name: Install pulumictl + uses: jaxxstorm/action-install-gh-release@v1.11.0 + with: + repo: pulumi/pulumictl + - name: Install Pulumi CLI + uses: pulumi/actions@v5 + - name: Run GoReleaser + uses: goreleaser/goreleaser-action@v5 + env: + GORELEASER_CURRENT_TAG: v${{ steps.version.outputs.version }} + with: + args: -p 3 -f .goreleaser.prerelease.yml --clean --skip=validate --timeout 60m0s + version: latest + publish_sdk: + runs-on: ubuntu-latest + needs: publish + name: publish_sdk + steps: + - name: Checkout Repo + uses: actions/checkout@v4 + with: + lfs: true + - id: version + name: Set Provider Version + uses: pulumi/provider-version-action@v1 + with: + set-env: PROVIDER_VERSION + - name: Checkout Scripts Repo + uses: actions/checkout@v4 + with: + path: ci-scripts + repository: pulumi/scripts + - run: echo "ci-scripts" >> .git/info/exclude + - name: Install Go + uses: actions/setup-go@v5 + with: + go-version: ${{ env.GOVERSION }} + cache-dependency-path: "**/*.sum" + - name: Install pulumictl + uses: jaxxstorm/action-install-gh-release@v1.11.0 + with: + repo: pulumi/pulumictl + - name: Install Pulumi CLI + uses: pulumi/actions@v5 + - 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: Download python SDK + uses: actions/download-artifact@v4 + with: + name: python-sdk.tar.gz + path: ${{ github.workspace}}/sdk/ + - name: Uncompress python SDK + run: tar -zxf ${{github.workspace}}/sdk/python.tar.gz -C + ${{github.workspace}}/sdk/python + - name: Download dotnet SDK + uses: actions/download-artifact@v4 + with: + name: dotnet-sdk.tar.gz + path: ${{ github.workspace}}/sdk/ + - name: Uncompress dotnet SDK + run: tar -zxf ${{github.workspace}}/sdk/dotnet.tar.gz -C + ${{github.workspace}}/sdk/dotnet + - name: Download nodejs SDK + uses: actions/download-artifact@v4 + with: + name: nodejs-sdk.tar.gz + path: ${{ github.workspace}}/sdk/ + - name: Uncompress nodejs SDK + run: tar -zxf ${{github.workspace}}/sdk/nodejs.tar.gz -C + ${{github.workspace}}/sdk/nodejs + - name: Install Twine + run: python -m pip install pip twine + - name: Publish SDKs + run: ./scripts/publish_sdks.sh ${{ github.workspace }} + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + PYPI_PUBLISH_ARTIFACTS: all + publish_go_sdk: + runs-on: ubuntu-latest + name: publish-go-sdk + needs: publish_sdk + steps: + - name: Checkout Repo + uses: actions/checkout@v4 + with: + lfs: true + - id: version + name: Set Provider Version + uses: pulumi/provider-version-action@v1 + with: + set-env: PROVIDER_VERSION + - name: Download go SDK + uses: actions/download-artifact@v4 + with: + name: go-sdk.tar.gz + path: ${{ github.workspace}}/sdk/ + - name: Uncompress go SDK + run: tar -zxf ${{github.workspace}}/sdk/go.tar.gz -C + ${{github.workspace}}/sdk/go + - name: Publish Go SDK + uses: pulumi/publish-go-sdk-action@v1 + with: + repository: ${{ github.repository }} + base-ref: ${{ github.sha }} + source: sdk + path: sdk + version: ${{ steps.version.outputs.version }} + additive: false + files: |- + go.* + go/** + !*.tar.gz diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml deleted file mode 100644 index f8a5713..0000000 --- a/.github/workflows/publish.yml +++ /dev/null @@ -1,281 +0,0 @@ -name: publish - -on: - workflow_call: - inputs: - ref: - required: true - type: string - version: - required: true - type: string - description: Version to be used to publish the SDKs - prerelease: - required: true - type: boolean - description: Indicates if we're doing a pre- or proper release. - publishGhRelease: - type: boolean - description: Indicates if we're publishing a GitHub release. - default: true - -env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - PROVIDER: commandx - PROVIDER_VERSION: ${{ inputs.version }} - PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_ACCESS_TOKEN }} - PULUMI_LOCAL_NUGET: ${{ github.workspace }}/nuget - NPM_TOKEN: ${{ secrets.NPM_TOKEN }} - NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} - NUGET_PUBLISH_KEY: ${{ secrets.NUGET_PUBLISH_KEY }} - PYPI_USERNAME: __token__ - PYPI_PASSWORD: ${{ secrets.PYPI_TOKEN }} - PULUMI_GO_DEP_ROOT: ${{ github.workspace }}/.. -# PUBLISH_REPO_USERNAME: ${{ secrets.OSSRH_USERNAME }} -# PUBLISH_REPO_PASSWORD: ${{ secrets.OSSRH_PASSWORD }} -# SIGNING_KEY_ID: ${{ secrets.JAVA_SIGNING_KEY_ID }} -# SIGNING_KEY: ${{ secrets.JAVA_SIGNING_KEY }} -# SIGNING_PASSWORD: ${{ secrets.JAVA_SIGNING_PASSWORD }} - -jobs: - publish-provider: - runs-on: ubuntu-latest - name: publish-provider - steps: - - name: Checkout Repo - uses: actions/checkout@v4 - with: - ref: ${{ inputs.ref }} - - - name: Install Languages & Frameworks - uses: ./.github/actions/install - with: - skip_dotnet_and_java: "true" - - - run: make ensure - - - name: Prerequisites artifact restore - uses: ./.github/actions/prerequisites-artifact-restore - - - name: Build dist packages - run: make dist --jobs=2 - - - name: Install Schema Tools - uses: jaxxstorm/action-install-gh-release@v1.12.0 - with: - repo: pulumi/schema-tools - - - name: Get Schema Change Summary - id: schema-summary - continue-on-error: true - shell: bash - run: | - # Get latest stable release. Return only first column from result (tag). - LAST_VERSION=$(gh release view --repo unstoppablemango/pulumi-commandx --json tagName -q .tagName) - { - echo 'summary<> "$GITHUB_OUTPUT" - - - name: Create GH Release - uses: softprops/action-gh-release@v2 - if: inputs.publishGhRelease - with: - tag_name: v${{ inputs.version }} - prerelease: ${{ inputs.prerelease }} - # We keep pre-releases as drafts so they're not visible until we manually publish them. - draft: ${{ inputs.prerelease }} - body: ${{ steps.schema-summary.outputs.summary }} - generate_release_notes: true - files: dist/* - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - publish-python-sdk: - runs-on: ubuntu-latest - name: publish-python-sdk - needs: publish-provider - steps: - - name: Checkout Repo - uses: actions/checkout@v4 - - - name: Install Languages & Frameworks - uses: ./.github/actions/install - - - name: Download python SDK - uses: actions/download-artifact@v4 - with: - name: python-sdk.tar.gz - path: ${{ github.workspace }}/sdk/ - - - name: Uncompress python SDK - run: tar -zxf ${{ github.workspace }}/sdk/python.tar.gz -C - ${{ github.workspace }}/sdk/python - - - name: Install Twine - run: python -m pip install pip twine - - - name: Publish PyPi Package - run: > - twine upload - -u "${PYPI_USERNAME}" - -p "${PYPI_PASSWORD}" - "${{ github.workspace }}/sdk/python/bin/dist/*" - --skip-existing - --verbose - - publish-dotnet-sdk: - runs-on: ubuntu-latest - name: publish-dotnet-sdk - needs: publish-provider - steps: - - name: Checkout Repo - uses: actions/checkout@v4 - - - name: Install Languages & Frameworks - uses: ./.github/actions/install - - - name: Download dotnet SDK - uses: actions/download-artifact@v4 - with: - name: dotnet-sdk.tar.gz - path: ${{ github.workspace }}/sdk/ - - - name: Uncompress dotnet SDK - run: tar -zxf ${{github.workspace }}/sdk/dotnet.tar.gz -C - ${{github.workspace }}/sdk/dotnet - - - name: Publish NuGet Package - run: | # TODO: Update here if the namespace jank ever gets worked out - find "sdk/dotnet/bin/Debug/" -name 'UnMango.*.nupkg' \ - -exec dotnet nuget push -k "${NUGET_PUBLISH_KEY}" -s https://api.nuget.org/v3/index.json {} ';' - - publish-nodejs-sdk: - runs-on: ubuntu-latest - name: publish-nodejs-sdk - needs: publish-provider - steps: - - name: Checkout Repo - uses: actions/checkout@v4 - - - name: Install Languages & Frameworks - uses: ./.github/actions/install - - - name: Download nodejs SDK - uses: actions/download-artifact@v4 - with: - name: nodejs-sdk.tar.gz - path: ${{ github.workspace }}/sdk/ - - - name: Uncompress nodejs SDK - run: tar -zxf ${{github.workspace }}/sdk/nodejs.tar.gz -C - ${{github.workspace }}/sdk/nodejs - - - name: Calculate tag - id: tag - run: echo "tag=$(./.github/scripts/calculate-npm-tag.sh "${{ inputs.version }}")" >> "$GITHUB_OUTPUT" - - - name: Publish Node.JS SDK - working-directory: sdk/nodejs/bin - run: npm publish --tag "${{ steps.tag.outputs.tag }}" --access public - env: - NPM_TOKEN: ${{ secrets.NPM_TOKEN }} - - publish-java-sdk: - # Need to learn how this works - if: false - runs-on: ubuntu-latest - name: publish-java-sdk - needs: publish-provider - env: - PACKAGE_VERSION: ${{ inputs.version }} - steps: - - name: Checkout Repo - uses: actions/checkout@v4 - - - name: Install Languages & Frameworks - uses: ./.github/actions/install - - - name: Download java SDK - uses: actions/download-artifact@v4 - with: - name: java-sdk.tar.gz - path: ${{ github.workspace }}/sdk/ - - - name: Uncompress java SDK - run: tar -zxf ${{github.workspace }}/sdk/java.tar.gz -C - ${{github.workspace }}/sdk/java - - - name: Publish Java SDK - # Maven doesn't use lock files and version ranges can't exclude prereleases. - # Therefore we can't publish prereleases without risking breaking customers. - # All other ecosystems handle prereleases correctly, Maven is the exception. - if: inputs.prerelease == false - uses: gradle/gradle-build-action@4c39dd82cd5e1ec7c6fa0173bb41b4b6bb3b86ff - with: - arguments: publishToSonatype closeAndReleaseSonatypeStagingRepository - build-root-directory: ./sdk/java - gradle-version: 7.4.1 - - publish-go-sdk: - # I'll figure this out later - if: false - runs-on: ubuntu-latest - name: publish-go-sdk - needs: publish-provider - steps: - - name: Checkout Repo - uses: actions/checkout@v4 - - - name: Install Languages & Frameworks - uses: ./.github/actions/install -# -# - name: Checkout prerelease branch -# if: inputs.prerelease == true -# working-directory: sdk/go -# run: git checkout -b ${{ inputs.version }} - -# - name: Checkout master branch -# if: inputs.prerelease == false -# working-directory: sdk/go -# run: git checkout master - - - name: Clear all source files - working-directory: sdk/go - run: find . -maxdepth 1 -not -name '.*' -exec rm -rf {} \; - - - name: Download Go SDK artifact - uses: actions/download-artifact@v4 - with: - name: pulumi-commandx.tar.gz - path: ${{ github.workspace }}/sdk/ - - - name: UnTar Go SDK artifact - run: | - mkdir -p ${{github.workspace }}/sdk/go - tar -zxf ${{ github.workspace }}/sdk/pulumi-commandx.tar.gz -C ${{ github.workspace }}/sdk/go - - - name: Prepare for publishing - run: make prepublish_go - - - name: Commit and tag - working-directory: sdk/go - run: | - git add . - git commit -m "v${{ inputs.version }}" - ../../.github/scripts/tag-go-module.sh ${{ inputs.version }} - - - name: Publish to prerelease branch - if: inputs.prerelease == true - working-directory: sdk/go - run: git push -u origin ${{ inputs.version }} --tags - - - name: Publish to main branch - if: inputs.prerelease == false - working-directory: sdk/go - run: git push -u origin main --tags diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 50981ed..9232ca7 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -1,100 +1,287 @@ -name: pull-request +# WARNING: This file is autogenerated - changes will be overwritten if not made via https://github.com/UnstoppableMango/pulumi-ci-mgmt +name: pull-request on: - pull_request: - branches: - - main - paths-ignore: - - CHANGELOG.md - + pull_request: {} env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} PROVIDER: commandx PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_ACCESS_TOKEN }} PULUMI_LOCAL_NUGET: ${{ github.workspace }}/nuget + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + NUGET_PUBLISH_KEY: ${{ secrets.NUGET_PUBLISH_KEY }} + PYPI_USERNAME: __token__ + PYPI_PASSWORD: ${{ secrets.PYPI_API_TOKEN }} PULUMI_GO_DEP_ROOT: ${{ github.workspace }}/.. - + GOVERSION: 1.22.x + NODEVERSION: 20.x + PYTHONVERSION: "3.11" + DOTNETVERSION: | + 6.0.x + 3.1.301 + JAVAVERSION: "11" jobs: - version: - uses: ./.github/workflows/dev-version.yml - secrets: inherit + prerequisites: + runs-on: ubuntu-latest + name: prerequisites + steps: + - name: Checkout Repo + uses: actions/checkout@v4 + with: + lfs: true + - id: version + name: Set Provider Version + uses: pulumi/provider-version-action@v1 + with: + set-env: PROVIDER_VERSION + - name: Install Go + uses: actions/setup-go@v5 + with: + go-version: ${{ env.GOVERSION }} + cache-dependency-path: "**/*.sum" + - name: Install pulumictl + uses: jaxxstorm/action-install-gh-release@v1.11.0 + with: + repo: pulumi/pulumictl + - name: Install Pulumi CLI + uses: pulumi/actions@v5 + - 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 codegen binaries + run: make codegen + - name: Build Schema + run: make generate_schema + - if: github.event_name == 'pull_request' + name: Check Schema is Valid + run: >- + echo 'SCHEMA_CHANGES<> $GITHUB_ENV - build_test: + schema-tools compare -p ${{ env.PROVIDER }} -o ${{ github.event.repository.default_branch }} -n --local-path=provider/cmd/pulumi-resource-${{ env.PROVIDER }}/schema.json --repository=github://api.github.com/unstoppablemango >> $GITHUB_ENV + + echo 'EOF' >> $GITHUB_ENV + - if: github.event_name == 'pull_request' + name: Comment on PR with Details of Schema Check + uses: thollander/actions-comment-pull-request@v2 + with: + message: | + ${{ env.SCHEMA_CHANGES }} + comment_tag: schemaCheck + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Build Provider + run: make provider + - name: Check worktree clean + uses: pulumi/git-status-check-action@v1 + with: + allowed-changes: |- + sdk/**/pulumi-plugin.json + sdk/dotnet/*.csproj + sdk/go/**/pulumiUtilities.go + sdk/nodejs/package.json + sdk/python/pyproject.toml + sdk/java/build.gradle + - run: git status --porcelain + - name: Tar provider binaries + run: tar -zcf ${{ github.workspace }}/bin/provider.tar.gz -C ${{ + github.workspace}}/bin/ pulumi-resource-${{ env.PROVIDER }} + - name: Upload artifacts + uses: actions/upload-artifact@v4 + with: + name: pulumi-${{ env.PROVIDER }}-provider.tar.gz + path: ${{ github.workspace }}/bin/provider.tar.gz + build_sdks: + needs: prerequisites runs-on: ubuntu-latest - needs: version - env: - PROVIDER_VERSION: ${{ needs.version.outputs.version }} strategy: fail-fast: true matrix: language: - - nodejs - - python - - dotnet - - go - - java + - nodejs + - python + - dotnet + - go + - java + name: build_sdks steps: - - name: Checkout Repo - uses: actions/checkout@v4 - - - name: Install Languages & Frameworks - uses: ./.github/actions/install - with: - skip_dotnet_and_java: ${{ matrix.language != 'dotnet' && matrix.language != 'java' }} - - - run: make ensure - - - name: Build binaries - run: make provider - - - name: Build SDK - run: make build_${{ matrix.language }} - - # Enable when we actually have some tests - # - name: Test Provider Library - # run: | - # set -euo pipefail - # cd provider && go test -v -json -coverprofile="coverage.txt" -coverpkg=./... -timeout 1h -parallel 16 ./... 2>&1 | tee /tmp/gotest.log | gotestfmt - - # - name: Upload coverage reports to Codecov - # uses: codecov/codecov-action@v4 - # env: - # CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} - - - name: Install Node dependencies - if: matrix.language == 'nodejs' - run: yarn global add typescript - - - name: Install Python deps - if: matrix.language == 'python' - run: |- - pip3 install virtualenv==20.0.23 - pip3 install pipenv - - - name: Install gotestfmt - uses: jaxxstorm/action-install-gh-release@v1.12.0 - with: - tag: v2.5.0 - repo: GoTestTools/gotestfmt - - - name: Install dependencies - run: make install_${{ matrix.language }}_sdk - - - name: Build test image - uses: ./.github/actions/build-test-image - - - name: Run tests - run: | - set -euo pipefail - cd examples && go test -v -json -cover -timeout 15m -tags=${{ matrix.language }} -parallel 16 . 2>&1 | tee /tmp/gotest.log | gotestfmt - - lint_workflows: - # Temporary since it doesn't seem to like large diffs - if: false + - name: Checkout Repo + uses: actions/checkout@v4 + with: + lfs: true + - id: version + name: Set Provider Version + uses: pulumi/provider-version-action@v1 + with: + set-env: PROVIDER_VERSION + - name: Install Go + uses: actions/setup-go@v5 + with: + go-version: ${{ env.GOVERSION }} + cache-dependency-path: "**/*.sum" + - name: Install pulumictl + uses: jaxxstorm/action-install-gh-release@v1.11.0 + with: + repo: pulumi/pulumictl + - name: Install Pulumi CLI + uses: pulumi/actions@v5 + - 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: + java-version: ${{ env.JAVAVERSION }} + distribution: temurin + cache: gradle + - name: Setup Gradle + uses: gradle/actions/setup-gradle@v3 + with: + gradle-version: "7.6" + - name: Download provider + tfgen binaries + uses: actions/download-artifact@v4 + with: + name: pulumi-${{ 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 + - name: Restore Binary Permissions + run: find ${{ github.workspace }} -name "pulumi-*-${{ env.PROVIDER }}" -print + -exec chmod +x {} \; + - name: Generate SDK + run: make generate_${{ matrix.language }} + - 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/*.csproj + sdk/go/**/pulumiUtilities.go + sdk/nodejs/package.json + sdk/python/pyproject.toml + sdk/java/build.gradle + - run: git status --porcelain + - name: Tar 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 + test: runs-on: ubuntu-latest + needs: + - build_sdks + strategy: + fail-fast: true + matrix: + language: + - nodejs + - python + - dotnet + - go + - java + name: test + permissions: + contents: read + id-token: write steps: - - name: Checkout Repo - uses: actions/checkout@v4 + - name: Checkout Repo + uses: actions/checkout@v4 + with: + lfs: true + - id: version + name: Set Provider Version + uses: pulumi/provider-version-action@v1 + with: + set-env: PROVIDER_VERSION + - name: Install Go + uses: actions/setup-go@v5 + with: + go-version: ${{ env.GOVERSION }} + cache-dependency-path: "**/*.sum" + - name: Install pulumictl + uses: jaxxstorm/action-install-gh-release@v1.11.0 + with: + repo: pulumi/pulumictl + - name: Install Pulumi CLI + uses: pulumi/actions@v5 + - 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: + java-version: ${{ env.JAVAVERSION }} + distribution: temurin + cache: gradle + - name: Setup Gradle + uses: gradle/actions/setup-gradle@v3 + with: + gradle-version: "7.6" + - name: Download provider + tfgen binaries + uses: actions/download-artifact@v4 + with: + name: pulumi-${{ 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 + - name: Restore Binary Permissions + run: find ${{ github.workspace }} -name "pulumi-*-${{ env.PROVIDER }}" -print + -exec chmod +x {} \; + - name: Download SDK + uses: actions/download-artifact@v4 + with: + name: ${{ matrix.language }}-sdk.tar.gz + path: ${{ github.workspace}}/sdk/ + - name: UnTar SDK folder + run: tar -zxf ${{ github.workspace}}/sdk/${{ matrix.language}}.tar.gz -C ${{ + github.workspace}}/sdk/${{ matrix.language}} + - name: Update path + run: echo "${{ github.workspace }}/bin" >> $GITHUB_PATH + - name: Install Node dependencies + run: yarn global add typescript + - run: dotnet nuget add source ${{ github.workspace }}/nuget + - name: Install Python deps + run: |- + pip3 install virtualenv==20.0.23 + pip3 install pipenv + - name: Install dependencies + run: make install_${{ matrix.language}}_sdk + - name: Install gotestfmt + uses: GoTestTools/gotestfmt-action@v2 + with: + version: v2.5.0 + token: ${{ secrets.GITHUB_TOKEN }} + - name: Build test image + uses: ./.github/actions/build-test-image + - name: Run tests + run: >- + set -euo pipefail - - name: Lint actions - uses: reviewdog/action-actionlint@v1.47.0 + cd examples && go test -v -json -count=1 -cover -timeout 2h -tags=${{ matrix.language }} -parallel 4 . 2>&1 | tee /tmp/gotest.log | gotestfmt diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 046ae35..6b39332 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,36 +1,452 @@ -name: release +# WARNING: This file is autogenerated - changes will be overwritten if not made via https://github.com/UnstoppableMango/pulumi-ci-mgmt +name: release on: push: tags: - - v*.*.* - + - v*.*.* + - "!v*.*.*-**" +env: + PROVIDER: commandx + PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_ACCESS_TOKEN }} + PULUMI_LOCAL_NUGET: ${{ github.workspace }}/nuget + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + NUGET_PUBLISH_KEY: ${{ secrets.NUGET_PUBLISH_KEY }} + PYPI_USERNAME: __token__ + PYPI_PASSWORD: ${{ secrets.PYPI_API_TOKEN }} + PULUMI_GO_DEP_ROOT: ${{ github.workspace }}/.. + GOVERSION: 1.22.x + NODEVERSION: 20.x + PYTHONVERSION: "3.11" + DOTNETVERSION: | + 6.0.x + 3.1.301 + JAVAVERSION: "11" jobs: - version: + prerequisites: runs-on: ubuntu-latest + name: prerequisites steps: - - id: version - name: Calculate build version - # Remove "v" if present - run: echo "version=${GITHUB_REF_NAME/v/}" >> "$GITHUB_OUTPUT" - outputs: - version: ${{ steps.version.outputs.version }} + - name: Checkout Repo + uses: actions/checkout@v4 + with: + lfs: true + - id: version + name: Set Provider Version + uses: pulumi/provider-version-action@v1 + with: + set-env: PROVIDER_VERSION + - name: Install Go + uses: actions/setup-go@v5 + with: + go-version: ${{ env.GOVERSION }} + cache-dependency-path: "**/*.sum" + - name: Install pulumictl + uses: jaxxstorm/action-install-gh-release@v1.11.0 + with: + repo: pulumi/pulumictl + - name: Install Pulumi CLI + uses: pulumi/actions@v5 + - 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 codegen binaries + run: make codegen + - name: Build Schema + run: make generate_schema + - if: github.event_name == 'pull_request' + name: Check Schema is Valid + run: >- + echo 'SCHEMA_CHANGES<> $GITHUB_ENV - build_test: - uses: ./.github/workflows/build-test.yml - needs: version - secrets: inherit - with: - ref: ${{ github.ref }} - version: ${{ needs.version.outputs.version }} + schema-tools compare -p ${{ env.PROVIDER }} -o ${{ github.event.repository.default_branch }} -n --local-path=provider/cmd/pulumi-resource-${{ env.PROVIDER }}/schema.json --repository=github://api.github.com/unstoppablemango >> $GITHUB_ENV - publish: - uses: ./.github/workflows/publish.yml - secrets: inherit + echo 'EOF' >> $GITHUB_ENV + - if: github.event_name == 'pull_request' + name: Comment on PR with Details of Schema Check + uses: thollander/actions-comment-pull-request@v2 + with: + message: | + ${{ env.SCHEMA_CHANGES }} + comment_tag: schemaCheck + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Build Provider + run: make provider + - name: Check worktree clean + uses: pulumi/git-status-check-action@v1 + with: + allowed-changes: |- + sdk/**/pulumi-plugin.json + sdk/dotnet/*.csproj + sdk/go/**/pulumiUtilities.go + sdk/nodejs/package.json + sdk/python/pyproject.toml + sdk/java/build.gradle + - run: git status --porcelain + - name: Tar provider binaries + run: tar -zcf ${{ github.workspace }}/bin/provider.tar.gz -C ${{ + github.workspace}}/bin/ pulumi-resource-${{ env.PROVIDER }} + - name: Upload artifacts + uses: actions/upload-artifact@v4 + with: + name: pulumi-${{ env.PROVIDER }}-provider.tar.gz + path: ${{ github.workspace }}/bin/provider.tar.gz + build_sdks: + needs: prerequisites + runs-on: ubuntu-latest + strategy: + fail-fast: true + matrix: + language: + - nodejs + - python + - dotnet + - go + - java + name: build_sdks + steps: + - name: Checkout Repo + uses: actions/checkout@v4 + with: + lfs: true + - id: version + name: Set Provider Version + uses: pulumi/provider-version-action@v1 + with: + set-env: PROVIDER_VERSION + - name: Install Go + uses: actions/setup-go@v5 + with: + go-version: ${{ env.GOVERSION }} + cache-dependency-path: "**/*.sum" + - name: Install pulumictl + uses: jaxxstorm/action-install-gh-release@v1.11.0 + with: + repo: pulumi/pulumictl + - name: Install Pulumi CLI + uses: pulumi/actions@v5 + - 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: + java-version: ${{ env.JAVAVERSION }} + distribution: temurin + cache: gradle + - name: Setup Gradle + uses: gradle/actions/setup-gradle@v3 + with: + gradle-version: "7.6" + - name: Download provider + tfgen binaries + uses: actions/download-artifact@v4 + with: + name: pulumi-${{ 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 + - name: Restore Binary Permissions + run: find ${{ github.workspace }} -name "pulumi-*-${{ env.PROVIDER }}" -print + -exec chmod +x {} \; + - name: Generate SDK + run: make generate_${{ matrix.language }} + - 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/*.csproj + sdk/go/**/pulumiUtilities.go + sdk/nodejs/package.json + sdk/python/pyproject.toml + sdk/java/build.gradle + - run: git status --porcelain + - name: Tar 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 + test: + runs-on: ubuntu-latest needs: - - build_test - - version - with: - ref: ${{ github.ref }} - version: ${{ needs.version.outputs.version }} - prerelease: ${{ contains(github.ref_name,'-') }} + - build_sdks + strategy: + fail-fast: true + matrix: + language: + - nodejs + - python + - dotnet + - go + - java + name: test + permissions: + contents: read + id-token: write + steps: + - name: Checkout Repo + uses: actions/checkout@v4 + with: + lfs: true + - id: version + name: Set Provider Version + uses: pulumi/provider-version-action@v1 + with: + set-env: PROVIDER_VERSION + - name: Install Go + uses: actions/setup-go@v5 + with: + go-version: ${{ env.GOVERSION }} + cache-dependency-path: "**/*.sum" + - name: Install pulumictl + uses: jaxxstorm/action-install-gh-release@v1.11.0 + with: + repo: pulumi/pulumictl + - name: Install Pulumi CLI + uses: pulumi/actions@v5 + - 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: + java-version: ${{ env.JAVAVERSION }} + distribution: temurin + cache: gradle + - name: Setup Gradle + uses: gradle/actions/setup-gradle@v3 + with: + gradle-version: "7.6" + - name: Download provider + tfgen binaries + uses: actions/download-artifact@v4 + with: + name: pulumi-${{ 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 + - name: Restore Binary Permissions + run: find ${{ github.workspace }} -name "pulumi-*-${{ env.PROVIDER }}" -print + -exec chmod +x {} \; + - name: Download SDK + uses: actions/download-artifact@v4 + with: + name: ${{ matrix.language }}-sdk.tar.gz + path: ${{ github.workspace}}/sdk/ + - name: UnTar SDK folder + run: tar -zxf ${{ github.workspace}}/sdk/${{ matrix.language}}.tar.gz -C ${{ + github.workspace}}/sdk/${{ matrix.language}} + - name: Update path + run: echo "${{ github.workspace }}/bin" >> $GITHUB_PATH + - name: Install Node dependencies + run: yarn global add typescript + - run: dotnet nuget add source ${{ github.workspace }}/nuget + - name: Install Python deps + run: |- + pip3 install virtualenv==20.0.23 + pip3 install pipenv + - name: Install dependencies + run: make install_${{ matrix.language}}_sdk + - name: Install gotestfmt + uses: GoTestTools/gotestfmt-action@v2 + with: + version: v2.5.0 + token: ${{ secrets.GITHUB_TOKEN }} + - name: Build test image + uses: ./.github/actions/build-test-image + - name: Run tests + run: >- + set -euo pipefail + + cd examples && go test -v -json -count=1 -cover -timeout 2h -tags=${{ matrix.language }} -parallel 4 . 2>&1 | tee /tmp/gotest.log | gotestfmt + publish: + runs-on: ubuntu-latest + needs: test + name: publish + steps: + - name: Checkout Repo + uses: actions/checkout@v4 + with: + lfs: true + - id: version + name: Set Provider Version + uses: pulumi/provider-version-action@v1 + with: + set-env: PROVIDER_VERSION + - name: Install Go + uses: actions/setup-go@v5 + with: + go-version: ${{ env.GOVERSION }} + cache-dependency-path: "**/*.sum" + - name: Clear GitHub Actions Ubuntu runner disk space + uses: jlumbroso/free-disk-space@v1.3.1 + with: + tool-cache: false + dotnet: false + android: true + haskell: true + swap-storage: true + large-packages: false + - name: Install pulumictl + uses: jaxxstorm/action-install-gh-release@v1.11.0 + with: + repo: pulumi/pulumictl + - name: Install Pulumi CLI + uses: pulumi/actions@v5 + - name: Run GoReleaser + uses: goreleaser/goreleaser-action@v5 + env: + GORELEASER_CURRENT_TAG: v${{ steps.version.outputs.version }} + with: + args: -p 3 release --clean --timeout 60m0s + version: latest + publish_sdk: + runs-on: ubuntu-latest + needs: publish + name: publish_sdks + steps: + - name: Checkout Repo + uses: actions/checkout@v4 + with: + lfs: true + - id: version + name: Set Provider Version + uses: pulumi/provider-version-action@v1 + with: + set-env: PROVIDER_VERSION + - name: Checkout Scripts Repo + uses: actions/checkout@v4 + with: + path: ci-scripts + repository: pulumi/scripts + - run: echo "ci-scripts" >> .git/info/exclude + - name: Install Go + uses: actions/setup-go@v5 + with: + go-version: ${{ env.GOVERSION }} + cache-dependency-path: "**/*.sum" + - name: Install pulumictl + uses: jaxxstorm/action-install-gh-release@v1.11.0 + with: + repo: pulumi/pulumictl + - name: Install Pulumi CLI + uses: pulumi/actions@v5 + - 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: Download python SDK + uses: actions/download-artifact@v4 + with: + name: python-sdk.tar.gz + path: ${{ github.workspace}}/sdk/ + - name: Uncompress python SDK + run: tar -zxf ${{github.workspace}}/sdk/python.tar.gz -C + ${{github.workspace}}/sdk/python + - name: Download dotnet SDK + uses: actions/download-artifact@v4 + with: + name: dotnet-sdk.tar.gz + path: ${{ github.workspace}}/sdk/ + - name: Uncompress dotnet SDK + run: tar -zxf ${{github.workspace}}/sdk/dotnet.tar.gz -C + ${{github.workspace}}/sdk/dotnet + - name: Download nodejs SDK + uses: actions/download-artifact@v4 + with: + name: nodejs-sdk.tar.gz + path: ${{ github.workspace}}/sdk/ + - name: Uncompress nodejs SDK + run: tar -zxf ${{github.workspace}}/sdk/nodejs.tar.gz -C + ${{github.workspace}}/sdk/nodejs + - name: Install Twine + run: python -m pip install pip twine + - name: Publish SDKs + run: ./scripts/publish_sdks.sh ${{ github.workspace }} + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + PYPI_PUBLISH_ARTIFACTS: all + publish_go_sdk: + runs-on: ubuntu-latest + name: publish-go-sdk + needs: publish_sdk + steps: + - name: Checkout Repo + uses: actions/checkout@v4 + with: + lfs: true + - id: version + name: Set Provider Version + uses: pulumi/provider-version-action@v1 + with: + set-env: PROVIDER_VERSION + - name: Download go SDK + uses: actions/download-artifact@v4 + with: + name: go-sdk.tar.gz + path: ${{ github.workspace}}/sdk/ + - name: Uncompress go SDK + run: tar -zxf ${{github.workspace}}/sdk/go.tar.gz -C + ${{github.workspace}}/sdk/go + - name: Publish Go SDK + uses: pulumi/publish-go-sdk-action@v1 + with: + repository: ${{ github.repository }} + base-ref: ${{ github.sha }} + source: sdk + path: sdk + version: ${{ steps.version.outputs.version }} + additive: false + files: |- + go.* + go/** + !*.tar.gz + dispatch_docs_build: + runs-on: ubuntu-latest + needs: publish_go_sdk + steps: + - name: Install pulumictl + uses: jaxxstorm/action-install-gh-release@v1.11.0 + with: + repo: pulumi/pulumictl + - name: Dispatch Event + run: pulumictl create docs-build pulumi-${{ env.PROVIDER }} + ${GITHUB_REF#refs/tags/} + name: dispatch_docs_build diff --git a/.github/workflows/weekly-pulumi-update.yml b/.github/workflows/weekly-pulumi-update.yml new file mode 100644 index 0000000..cfb856d --- /dev/null +++ b/.github/workflows/weekly-pulumi-update.yml @@ -0,0 +1,114 @@ +# WARNING: This file is autogenerated - changes will be overwritten if not made via https://github.com/UnstoppableMango/pulumi-ci-mgmt + +name: weekly-pulumi-update +on: + schedule: + - cron: 35 12 * * 4 + workflow_dispatch: {} +env: + PROVIDER: commandx + PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_ACCESS_TOKEN }} + PULUMI_LOCAL_NUGET: ${{ github.workspace }}/nuget + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + NUGET_PUBLISH_KEY: ${{ secrets.NUGET_PUBLISH_KEY }} + PYPI_USERNAME: __token__ + PYPI_PASSWORD: ${{ secrets.PYPI_API_TOKEN }} + PULUMI_GO_DEP_ROOT: ${{ github.workspace }}/.. + GOVERSION: 1.22.x + NODEVERSION: 20.x + PYTHONVERSION: "3.11" + DOTNETVERSION: | + 6.0.x + 3.1.301 + JAVAVERSION: "11" +jobs: + weekly-pulumi-update: + runs-on: ubuntu-latest + steps: + - name: Checkout Repo + uses: actions/checkout@v4 + with: + lfs: true + - id: version + name: Set Provider Version + uses: pulumi/provider-version-action@v1 + with: + set-env: PROVIDER_VERSION + - name: Install Go + uses: actions/setup-go@v5 + with: + go-version: ${{ env.GOVERSION }} + cache-dependency-path: "**/*.sum" + - name: Install pulumictl + uses: jaxxstorm/action-install-gh-release@v1.11.0 + with: + repo: pulumi/pulumictl + - name: Install Pulumi CLI + uses: pulumi/actions@v5 + - name: Setup DotNet + uses: actions/setup-dotnet@v4 + with: + dotnet-version: ${{ env.DOTNETVERSION }} + - name: Setup Node + uses: actions/setup-node@v4 + with: + node-version: ${{ env.NODEVERSION }} + registry-url: https://registry.npmjs.org + - name: Setup Python + uses: actions/setup-python@v5 + with: + python-version: ${{ env.PYTHONVERSION }} + - name: Update Pulumi/Pulumi + id: gomod + run: >- + git checkout -b update-pulumi/${{ github.run_id }}-${{ github.run_number + }} + + for MODFILE in $(find . -name go.mod); do pushd $(dirname $MODFILE); go get github.com/pulumi/pulumi/pkg/v3 github.com/pulumi/pulumi/sdk/v3; go mod tidy; popd; done + + gh repo view pulumi/pulumi --json latestRelease --jq .latestRelease.tagName | sed 's/^v//' > .pulumi.version + + git update-index -q --refresh + + if ! git diff-files --quiet; then echo changes=1 >> "$GITHUB_OUTPUT"; fi + - name: Provider with Pulumi Upgrade + if: steps.gomod.outputs.changes != 0 + run: >- + make codegen && make local_generate + + git add sdk/nodejs + + git commit -m "Regenerating Node.js SDK based on updated modules" || echo "ignore commit failure, may be empty" + + git add sdk/python + + git commit -m "Regenerating Python SDK based on updated modules" || echo "ignore commit failure, may be empty" + + git add sdk/dotnet + + git commit -m "Regenerating .NET SDK based on updated modules" || echo "ignore commit failure, may be empty" + + git add sdk/go* + + git commit -m "Regenerating Go SDK based on updated modules" || echo "ignore commit failure, may be empty" + + git add sdk/java* + + git commit -m "Regenerating Java SDK based on updated modules" || echo "ignore commit failure, may be empty" + + git add . + + git commit -m "Updated modules" || echo "ignore commit failure, may be empty" + + git push origin update-pulumi/${{ github.run_id }}-${{ github.run_number }} + - name: Create PR + id: create-pr + if: steps.gomod.outputs.changes != 0 + uses: repo-sync/pull-request@v2.6.2 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + source_branch: update-pulumi/${{ github.run_id }}-${{ github.run_number }} + destination_branch: main + pr_title: Automated Pulumi/Pulumi upgrade + name: weekly-pulumi-update diff --git a/.goreleaser.prerelease.yml b/.goreleaser.prerelease.yml new file mode 100644 index 0000000..abbc4f3 --- /dev/null +++ b/.goreleaser.prerelease.yml @@ -0,0 +1,31 @@ +# WARNING: This file is autogenerated - changes will be overwritten if not made via https://github.com/UnstoppableMango/pulumi-ci-mgmt + +project_name: pulumi-commandx +builds: +- dir: provider + env: + - CGO_ENABLED=0 + - GO111MODULE=on + goos: + - darwin + - windows + - linux + goarch: + - amd64 + - arm64 + ignore: [] + main: ./cmd/pulumi-resource-commandx/ + ldflags: + - -X + github.com/UnstoppableMango/pulumi-commandx/provider/pkg/version.Version={{.Tag}} + binary: pulumi-resource-commandx +archives: +- name_template: "{{ .Binary }}-{{ .Tag }}-{{ .Os }}-{{ .Arch }}" + id: archive +snapshot: + name_template: "{{ .Tag }}-SNAPSHOT" +changelog: + skip: true +release: + disable: true +blobs: [] diff --git a/.goreleaser.yml b/.goreleaser.yml index bef38ac..2987f72 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -1,29 +1,39 @@ -archives: - - id: archive - name_template: '{{ .Binary }}-{{ .Tag }}-{{ .Os }}-{{ .Arch }}' -before: - hooks: - - make provider +# WARNING: This file is autogenerated - changes will be overwritten if not made via https://github.com/UnstoppableMango/pulumi-ci-mgmt + +project_name: pulumi-commandx builds: - - binary: pulumi-resource-commandx - dir: provider - env: - - CGO_ENABLED=0 - goarch: - - amd64 - - arm64 - goos: - - darwin - - windows - - linux - ldflags: - # The line below MUST align with the module in current provider/go.mod - - -X github.com/unstoppablemango/pulumi-commandx/provider/pkg/version.Version={{.Tag }} - main: ./cmd/pulumi-resource-commandx/ +- dir: provider + env: + - CGO_ENABLED=0 + - GO111MODULE=on + goos: + - darwin + - windows + - linux + goarch: + - amd64 + - arm64 + ignore: [] + main: ./cmd/pulumi-resource-commandx/ + ldflags: + - -X + github.com/UnstoppableMango/pulumi-commandx/provider/pkg/version.Version={{.Tag}} + binary: pulumi-resource-commandx +archives: +- name_template: "{{ .Binary }}-{{ .Tag }}-{{ .Os }}-{{ .Arch }}" + id: archive +snapshot: + name_template: "{{ .Tag }}-SNAPSHOT" changelog: - skip: true + filters: + exclude: + - Merge branch + - Merge pull request + - \Winternal\W + - \Wci\W + - \Wchore\W + sort: asc + use: git release: disable: false - prerelease: auto -snapshot: - name_template: '{{ .Tag }}-SNAPSHOT' +blobs: [] diff --git a/Makefile b/Makefile index 4b73a92..068b1de 100644 --- a/Makefile +++ b/Makefile @@ -77,6 +77,9 @@ install_provider: .make/install_provider .PHONY: docker docker: .make/examples_dockerfile +.PHONY: codegen +codegen: generate_schema + .PHONY: generate generate_java generate_nodejs generate_python generate_dotnet generate_go generate_types generate_schema generate: generate_schema generate_types generate_java generate_nodejs generate_python generate_dotnet generate_go generate_java: .make/generate_java @@ -320,7 +323,7 @@ provider/scripts/vendor/pulumi-schema.d.ts: .awsx.version yarn link --cwd sdk/nodejs/bin @touch $@ -.make/install_dotnet_sdk: .make/build_dotnet +.make/install_dotnet_sdk: @mkdir -p nuget find sdk/dotnet/bin -name '*.nupkg' -print -exec cp -p {} ${WORKING_DIR}/nuget \; if ! dotnet nuget list source | grep ${WORKING_DIR}; then \ diff --git a/examples/examples_test.go b/examples/examples_test.go index 29f7710..14a629f 100644 --- a/examples/examples_test.go +++ b/examples/examples_test.go @@ -11,13 +11,19 @@ import ( ) func getBaseOptions(t *testing.T) integration.ProgramTestOptions { - return integration.ProgramTestOptions{ - Bin: path.Join(getCwd(t), "..", ".pulumi", "bin", "pulumi"), + result := integration.ProgramTestOptions{ LocalProviders: []integration.LocalDependency{{ Package: "commandx", Path: path.Join(getCwd(t), "..", "bin"), }}, } + + pulumiBin := path.Join(getCwd(t), "..", ".pulumi", "bin", "pulumi") + if _, err := os.Stat(pulumiBin); err == nil { + result.Bin = pulumiBin + } + + return result } func getCwd(t *testing.T) string { diff --git a/go.work.sum b/go.work.sum index 699fe3c..68654d9 100644 --- a/go.work.sum +++ b/go.work.sum @@ -154,6 +154,8 @@ github.com/BurntSushi/toml v1.2.1/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbi github.com/Code-Hex/go-generics-cache v1.3.1/go.mod h1:qxcC9kRVrct9rHeiYpFWSoW1vxyillCVzX13KZG8dl4= github.com/GoogleCloudPlatform/cloudsql-proxy v1.34.0/go.mod h1:XNDFTVaBS0jJYam3A88dpdzImNh0RRhBF4k05CNEENs= github.com/KimMachineGun/automemlimit v0.5.0/go.mod h1:di3GCKiu9Y+1fs92erCbUvKzPkNyViN3mA0vti/ykEQ= +github.com/Masterminds/goutils v1.1.1/go.mod h1:8cTjp+g8YejhMuvIA5y2vz3BpJxksy863GQaJW2MFNU= +github.com/Masterminds/sprig/v3 v3.2.1/go.mod h1:UoaO7Yp8KlPnJIYWTFkMaqPUYKTfGFPhxNuwnnxkKlk= github.com/Netflix/go-expect v0.0.0-20220104043353-73e0943537d2/go.mod h1:HBCaDeC1lPdgDeDbhX8XFpy1jqjK0IBG8W5K+xYqA0w= github.com/OneOfOne/xxhash v1.2.8/go.mod h1:eZbhyaAYD41SGSSsnmcpxVoRiQ/MPUTjUdIIOT9Um7Q= github.com/acarl005/stripansi v0.0.0-20180116102854-5a71ef0e047d/go.mod h1:asat636LX7Bqt5lYEZ27JNDcqxfjdBQuJ/MM4CN/Lzo= @@ -169,6 +171,7 @@ github.com/apache/arrow/go/v14 v14.0.2/go.mod h1:u3fgh3EdgN/YQ8cVQRguVW3R+seMybF github.com/apparentlymart/go-dump v0.0.0-20180507223929-23540a00eaa3/go.mod h1:oL81AME2rN47vu18xqj1S1jPIPuN7afo62yKTNn3XMM= github.com/apparentlymart/go-textseg v1.0.0 h1:rRmlIsPEEhUTIKQb7T++Nz/A5Q6C9IuX2wFoYVvnCs0= github.com/apparentlymart/go-textseg v1.0.0/go.mod h1:z96Txxhf3xSFMPmb5X/1W05FF/Nj9VFpLOpjS5yuumk= +github.com/apparentlymart/go-textseg/v13 v13.0.0/go.mod h1:ZK2fH7c4NqDTLtiYLvIkEghdlcqw7yxLeM89kiTRPUo= github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2/go.mod h1:WaHUgvxTVq04UNunO+XhnAqY/wQc+bxr74GqbsZ/Jqw= github.com/aws/aws-sdk-go v1.44.298/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI= github.com/aws/aws-sdk-go-v2 v1.17.3/go.mod h1:uzbQtefpm44goOPmdKyAlXSNcwlRgF3ePWVW6EtJvvw= @@ -230,8 +233,10 @@ github.com/containerd/fifo v1.1.0/go.mod h1:bmC4NWMbXlt2EZ0Hc7Fx7QzTFxgPID13eH0Q github.com/containerd/go-cni v1.1.9/go.mod h1:XYrZJ1d5W6E2VOvjffL3IZq0Dz6bsVlERHbekNK90PM= github.com/containerd/imgcrypt v1.1.7/go.mod h1:FD8gqIcX5aTotCtOmjeCsi3A1dHmTZpnMISGKSczt4k= github.com/containerd/nri v0.4.0/go.mod h1:Zw9q2lP16sdg0zYybemZ9yTDy8g7fPCIB3KXOGlggXI= +github.com/containerd/nri v0.6.0/go.mod h1:F7OZfO4QTPqw5r87aq+syZJwiVvRYLIlHZiZDBV1W3A= github.com/containerd/stargz-snapshotter/estargz v0.14.3/go.mod h1:KY//uOCIkSuNAHhJogcZtrNHdKrA99/FCCRjE3HD36o= github.com/containerd/ttrpc v1.2.2/go.mod h1:sIT6l32Ph/H9cvnJsfXM5drIVzTr5A2flTf1G5tYZak= +github.com/containerd/ttrpc v1.2.3/go.mod h1:ieWsXucbb8Mj9PH0rXCw1i8IunRbbAiDkpXkbfflWBM= github.com/containerd/typeurl/v2 v2.1.1/go.mod h1:IDp2JFvbwZ31H8dQbEIY7sDl2L3o3HZj1hsSQlywkQ0= github.com/containerd/zfs v1.1.0/go.mod h1:oZF9wBnrnQjpWLaPKEinrx3TQ9a+W/RJO7Zb41d8YLE= github.com/containernetworking/cni v1.1.2/go.mod h1:sDpYKmGVENF3s6uvMvGgldDWeG8dMxakj/u+i9ht9vw= @@ -259,6 +264,7 @@ github.com/facette/natsort v0.0.0-20181210072756-2cd4dd1e2dcb/go.mod h1:bH6Xx7IW github.com/fogleman/gg v1.2.1-0.20190220221249-0403632d5b90/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k= github.com/frankban/quicktest v1.14.3/go.mod h1:mgiwOwqx65TmIk1wJ6Q7wvnVMocbUorkibMOrVTHZps= github.com/frankban/quicktest v1.14.4/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0= +github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= github.com/fxamacker/cbor/v2 v2.4.0/go.mod h1:TA1xS00nchWmaBnEIxPSE5oHLuJBAVvqrtAnWBwBCVo= github.com/gedex/inflector v0.0.0-20170307190818-16278e9db813/go.mod h1:P+oSoE9yhSRvsmYyZsshflcR6ePWYLql6UU1amW13IM= github.com/go-kit/kit v0.12.0/go.mod h1:lHd+EkCZPIwYItmGDDRdhinkzX2A1sj+M9biaEaizzs= @@ -282,8 +288,6 @@ github.com/gobwas/ws v1.2.1/go.mod h1:hRKAFb8wOxFROYNsT1bqfWnhX+b5MFeJM9r2ZSwg/K github.com/goccy/go-json v0.9.7/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= github.com/goccy/go-json v0.10.2/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= github.com/godbus/dbus/v5 v5.1.0/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= -github.com/gofrs/uuid v4.4.0+incompatible h1:3qXRTX8/NbyulANqlc0lchS1gqAVxRgsuW1YrTJupqA= -github.com/gofrs/uuid v4.4.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= github.com/golang-jwt/jwt v3.2.1+incompatible h1:73Z+4BJcrTC+KczS6WvTPvRGOp1WmfEP4Q1lOd9Z/+c= github.com/golang-jwt/jwt/v5 v5.0.0/go.mod h1:pqrtFR0X4osieyHYxtmOUWsAWrfe1Q5UVIyoH402zdk= github.com/golang-jwt/jwt/v5 v5.2.0/go.mod h1:pqrtFR0X4osieyHYxtmOUWsAWrfe1Q5UVIyoH402zdk= @@ -326,6 +330,7 @@ github.com/hexops/gotextdiff v1.0.3/go.mod h1:pSWU5MAI3yDq+fZBTazCSJysOMbxWL1BSo github.com/hexops/valast v1.4.4/go.mod h1:Jcy1pNH7LNraVaAZDLyv21hHg2WBv9Nf9FL6fGxU7o4= github.com/hinshun/vt10x v0.0.0-20220119200601-820417d04eec/go.mod h1:Q48J4R4DvxnHolD5P8pOtXigYlRuPLGl6moFx3ulM68= github.com/hinshun/vt10x v0.0.0-20220301184237-5011da428d02/go.mod h1:Q48J4R4DvxnHolD5P8pOtXigYlRuPLGl6moFx3ulM68= +github.com/huandu/xstrings v1.3.2/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= github.com/iancoleman/strcase v0.3.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= github.com/ianlancetaylor/demangle v0.0.0-20230524184225-eabc099b10ab/go.mod h1:gx7rwoVhcfuVKG5uya9Hs3Sxj7EIvldVofAWIUtGouw= github.com/ijc/Gotty v0.0.0-20170406111628-a8b993ba6abd/go.mod h1:3LVOLeyx9XVvwPgrt2be44XgSqndprz1G18rSk8KD84= @@ -341,8 +346,6 @@ github.com/joho/godotenv v1.5.1/go.mod h1:f4LDr5Voq0i2e/R5DDNOoa2zzDfwtkZa6DnEwA github.com/josephspurrier/goversioninfo v1.4.0/go.mod h1:JWzv5rKQr+MmW+LvM412ToT/IkYDZjaclF2pKDss8IY= github.com/jung-kurt/gofpdf v1.0.3-0.20190309125859-24315acbbda5/go.mod h1:7Id9E/uU8ce6rXgefFLlgrJj/GYY22cpxn+r32jIOes= github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51/go.mod h1:CzGEWj7cYgsdH8dAjBGEr58BoE7ScuLd+fwFZ44+/x8= -github.com/klauspost/compress v1.17.4 h1:Ej5ixsIri7BrIjBkRZLTo6ghwrEtHFk7ijlczPW4fZ4= -github.com/klauspost/compress v1.17.4/go.mod h1:/dCuZOvVtNoHsyb+cuJD3itjs3NbnF6KH9zAO4BDxPM= github.com/klauspost/cpuid/v2 v2.0.4/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= github.com/klauspost/cpuid/v2 v2.2.5/go.mod h1:Lcz8mBdAVJIBVzewtcLocK12l3Y+JytZYpaMropDUws= github.com/kolo/xmlrpc v0.0.0-20220921171641-a4b6fa1dd06b/go.mod h1:pcaDhQK0/NJZEvtCO0qQPPropqV0sJOJ6YW7X+9kRwM= @@ -372,6 +375,7 @@ github.com/miekg/dns v1.1.58/go.mod h1:Ypv+3b/KadlvW9vJfXOTf300O4UqaHFzFCuHz+rPk github.com/miekg/pkcs11 v1.1.1/go.mod h1:XsNlhZGX73bx86s2hdc/FuaLm2CPZJemRLMA+WTFxgs= github.com/minio/sha256-simd v1.0.0/go.mod h1:OuYzVNI5vcoYIAmbIvHPl3N3jUzVedXbKy5RFepssQM= github.com/mistifyio/go-zfs/v3 v3.0.1/go.mod h1:CzVgeB0RvF2EGzQnytKVvVSDwmKJXxkOTUGbNrTja/k= +github.com/mitchellh/cli v1.1.5/go.mod h1:v8+iFts2sPIKUV1ltktPXMCC8fumSKFItNcD2cLtRR4= github.com/mitchellh/go-wordwrap v0.0.0-20150314170334-ad45545899c7/go.mod h1:ZXFpozHsX6DPmq2I0TCekCxypsnAUbP2oI0UX1GXzOo= github.com/mmcloughlin/avo v0.5.0/go.mod h1:ChHFdoV7ql95Wi7vuq2YT1bwCJqiWdZrQ1im3VujLYM= github.com/moby/moby v25.0.4+incompatible/go.mod h1:fDXVQ6+S340veQPv35CzDahGBmHsiclFwfEygB/TWMc= @@ -384,6 +388,7 @@ github.com/mxschmitt/golang-combinations v1.0.0/go.mod h1:RbMhWvfCelHR6WROvT2bVf github.com/nbutton23/zxcvbn-go v0.0.0-20180912185939-ae427f1e4c1d/go.mod h1:o96djdrsSGy3AWPyBgZMAGfxZNfgntdJG+11KU4QvbU= github.com/nightlyone/lockfile v1.0.0/go.mod h1:rywoIealpdNse2r832aiD9jRk8ErCatROs6LzC841CI= github.com/nsf/jsondiff v0.0.0-20230430225905-43f6cf3098c1/go.mod h1:mpRZBD8SJ55OIICQ3iWH0Yz3cjzA61JdqMLoWXeB2+8= +github.com/nxadm/tail v1.4.11/go.mod h1:OTaG3NK980DZzxbRq6lEuzgU+mug70nY11sMd4JXXHc= github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY= github.com/open-policy-agent/opa v0.42.2/go.mod h1:MrmoTi/BsKWT58kXlVayBb+rYVeaMwuBm3nYAN3923s= github.com/opencontainers/runc v1.1.5/go.mod h1:1J5XiS+vdZ3wCyZybsuxXZWGrgSr8fFJHLXuG2PsnNg= @@ -422,6 +427,7 @@ github.com/rivo/uniseg v0.4.6/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUc github.com/rogpeppe/go-charset v0.0.0-20180617210344-2471d30d28b4/go.mod h1:qgYeAmZ5ZIpBWTGllZSQnw97Dj+woV0toclVaRGI8pc= github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= github.com/russross/blackfriday v1.6.0/go.mod h1:ti0ldHuxg49ri4ksnFxlkCfN+hvslNlmVHqNRXXJNAY= +github.com/ryanuber/columnize v2.1.2+incompatible/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= github.com/sahilm/fuzzy v0.1.1-0.20230530133925-c48e322e2a8f/go.mod h1:VFvziUEIMCrT6A6tw2RFIXPXXmzXbOsSHF0DOI8ZK9Y= github.com/scaleway/scaleway-sdk-go v1.0.0-beta.22/go.mod h1:fCa7OJZ/9DRTnOKmxvT6pn+LPWUptQAmHF/SBJUGEcg= github.com/segmentio/asm v1.1.3/go.mod h1:Ld3L4ZXGNcSLRg4JBsZ3//1+f/TjYl0Mzen/DQy1EJg= @@ -469,10 +475,8 @@ go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.47.0/go.mod h1: go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.48.0/go.mod h1:rdENBZMT2OE6Ne/KLwpiXudnAsbdrdBaqBvTN8M8BgA= go.opentelemetry.io/otel v1.22.0/go.mod h1:eoV4iAi3Ea8LkAEI9+GFT44O6T/D0GWAVFyZVCC6pMI= go.opentelemetry.io/otel v1.23.0/go.mod h1:YCycw9ZeKhcJFrb34iVSkyT0iczq/zYDtZYFufObyB0= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.22.0/go.mod h1:noq80iT8rrHP1SfybmPiRGc9dc5M8RPmGvtwo7Oo7tc= go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.19.0/go.mod h1:0+KuTDyKL4gjKCF75pHOX4wuzYDUZYfAQdSu43o+Z2I= go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.22.0/go.mod h1:WfCWp1bGoYK8MeULtI15MmQVczfR+bFkk0DF3h06QmQ= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.22.0/go.mod h1:hYwym2nDEeZfG/motx0p7L7J1N1vyzIThemQsb4g2qY= go.opentelemetry.io/otel/metric v1.22.0/go.mod h1:evJGjVpZv0mQ5QBRJoBF64yMuOf4xCWdXjK8pzFvliY= go.opentelemetry.io/otel/metric v1.23.0/go.mod h1:MqUW2X2a6Q8RN96E2/nqNoT+z9BSms20Jb7Bbp+HiTo= go.opentelemetry.io/otel/sdk v1.21.0/go.mod h1:Nna6Yv7PWTdgJHVRD9hIYywQBRx7pbox6nwBnZIxl/E= @@ -489,7 +493,6 @@ golang.org/x/crypto v0.0.0-20220517005047-85d78b3ac167/go.mod h1:IxCIyHEi3zRg3s0 golang.org/x/crypto v0.12.0/go.mod h1:NF0Gs7EO5K4qLn+Ylc+fih8BSTeIjAP05siRnAh98yw= golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4= golang.org/x/crypto v0.17.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4= -golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU= golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20180807140117-3d87b88a115f/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190125153040-c74c464bbbf2/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= @@ -521,7 +524,6 @@ golang.org/x/sys v0.0.0-20220829200755-d48e67d00261/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.4.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.7.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/telemetry v0.0.0-20240228155512-f48c80bd79b2/go.mod h1:TeRTkGYfJXctD9OcfyVLyj2J3IxLnKwHJR8f4D8a3YE= golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.3.0/go.mod h1:q750SLmJuPmVoN1blW3UFBPREJfb1KmY3vwxfr+nFDA= @@ -614,3 +616,5 @@ sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2/go.mod h1:B8JuhiUyNFVKdsE8h6 sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= sigs.k8s.io/structured-merge-diff/v4 v4.2.3/go.mod h1:qjx8mGObPmV2aSZepjQjbmb2ihdVs8cGKBraizNC69E= sigs.k8s.io/structured-merge-diff/v4 v4.4.1/go.mod h1:N8hJocpFajUSSeSJ9bOZ77VzejKZaXsTtZo4/u7Io08= +tags.cncf.io/container-device-interface v0.6.2/go.mod h1:Shusyhjs1A5Na/kqPVLL0KqnHQHuunol9LFeUNkuGVE= +tags.cncf.io/container-device-interface/specs-go v0.6.0/go.mod h1:hMAwAbMZyBLdmYqWgYcKH0F/yctNpV3P35f+/088A80=