generated from pulumi/pulumi-tf-provider-boilerplate
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update GitHub Actions workflows. (#376)
This PR was automatically generated by the update-workflows-ecosystem-providers workflow in the pulumi/ci-mgmt repo, from commit 9272ebba50451550e813ac40aeb2fb15ecd26b67.
- Loading branch information
1 parent
24bf476
commit 198b1c3
Showing
6 changed files
with
245 additions
and
760 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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/[email protected] | ||
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: splunk-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-*-splunk" -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 }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,107 +25,8 @@ jobs: | |
build_sdk: | ||
name: build_sdk | ||
needs: prerequisites | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Repo | ||
uses: actions/checkout@v4 | ||
- uses: pulumi/provider-version-action@v1 | ||
with: | ||
set-env: 'PROVIDER_VERSION' | ||
- name: Install Go | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version: "1.21.x" | ||
cache-dependency-path: | | ||
sdk/go.sum | ||
- name: Cache examples generation | ||
uses: actions/cache@v4 | ||
with: | ||
path: | | ||
.pulumi/examples-cache | ||
key: ${{ runner.os }}-${{ hashFiles('provider/go.sum') }} | ||
- name: Install pulumictl | ||
uses: jaxxstorm/[email protected] | ||
with: | ||
tag: v0.0.46 | ||
repo: pulumi/pulumictl | ||
- name: Install Pulumi CLI | ||
uses: pulumi/actions@v5 | ||
with: | ||
pulumi-version: "^3" | ||
- name: Setup Node | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: "20.x" | ||
registry-url: https://registry.npmjs.org | ||
- name: Setup DotNet | ||
uses: actions/setup-dotnet@v4 | ||
with: | ||
dotnet-version: "6.0.x" | ||
- name: Setup Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.11.8" | ||
- name: Setup Java | ||
uses: actions/setup-java@v4 | ||
with: | ||
cache: gradle | ||
distribution: temurin | ||
java-version: "11" | ||
- name: Setup Gradle | ||
uses: gradle/gradle-build-action@v3 | ||
with: | ||
gradle-version: "7.6" | ||
- name: Download provider + tfgen binaries | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: splunk-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-*-splunk" -print -exec chmod +x {} \; | ||
- name: Install plugins | ||
run: make install_plugins | ||
- name: Update path | ||
run: echo "${{ github.workspace }}/bin" >> "$GITHUB_PATH" | ||
- name: Build SDK | ||
run: make build_${{ matrix.language }} | ||
- name: Check worktree clean | ||
uses: pulumi/git-status-check-action@v1 | ||
with: | ||
allowed-changes: | | ||
sdk/**/pulumi-plugin.json | ||
sdk/dotnet/Pulumi.*.csproj | ||
sdk/go/**/pulumiUtilities.go | ||
sdk/nodejs/package.json | ||
sdk/python/pyproject.toml | ||
- name: Compress SDK folder | ||
run: tar -zcf sdk/${{ matrix.language }}.tar.gz -C sdk/${{ matrix.language }} . | ||
- name: Upload artifacts | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: ${{ matrix.language }}-sdk.tar.gz | ||
path: ${{ github.workspace}}/sdk/${{ matrix.language }}.tar.gz | ||
retention-days: 30 | ||
- if: failure() && github.event_name == 'push' | ||
name: Notify Slack | ||
uses: 8398a7/action-slack@v3 | ||
with: | ||
author_name: Failure in building ${{ matrix.language }} sdk | ||
fields: repo,commit,author,action | ||
status: ${{ job.status }} | ||
strategy: | ||
fail-fast: true | ||
matrix: | ||
language: | ||
- nodejs | ||
- python | ||
- dotnet | ||
- go | ||
- java | ||
uses: ./.github/workflows/build_sdk.yml | ||
secrets: inherit | ||
|
||
generate_coverage_data: | ||
continue-on-error: true | ||
|
@@ -190,92 +91,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/[email protected] | ||
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/[email protected] | ||
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 splunk -o ${{ github.event.repository.default_branch }} -n --local-path=provider/cmd/pulumi-resource-splunk/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-splunk | ||
pulumi-tfgen-splunk | ||
- name: Upload artifacts | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: splunk-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 | ||
|
Oops, something went wrong.