Skip to content

Commit

Permalink
Update GitHub Actions workflows. (#859)
Browse files Browse the repository at this point in the history
This PR was automatically generated by the
update-workflows-ecosystem-providers workflow in the pulumi/ci-mgmt
repo, from commit 92b8348f8fe272a987baccae89fd6c6efe434ce2.
  • Loading branch information
pulumi-bot committed Mar 28, 2024
1 parent 9f64c2c commit 9e0f1d0
Show file tree
Hide file tree
Showing 5 changed files with 70 additions and 25 deletions.
20 changes: 15 additions & 5 deletions .github/workflows/master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ jobs:
- dotnet
- go
- java

generate_coverage_data:
continue-on-error: true
env:
Expand Down Expand Up @@ -212,12 +213,15 @@ jobs:
ref: deca2c5c6015ad7aaea6f572a1c2b198ca323592
- name: Unshallow clone for tags
run: git fetch --prune --unshallow --tags
- name: Prepare upstream code
run: make upstream
- name: Install Go
uses: actions/setup-go@v5
with:
cache-dependency-path: |
sdk/go.sum
go-version: 1.21.x
cache-dependency-path: |
provider/*.sum
upstream/*.sum
- name: Install pulumictl
uses: jaxxstorm/action-install-gh-release@v1.11.0
with:
Expand All @@ -232,8 +236,14 @@ jobs:
uses: jaxxstorm/action-install-gh-release@v1.11.0
with:
repo: pulumi/schema-tools
- name: Build tfgen & provider binaries
run: make provider
- 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'
Expand Down Expand Up @@ -264,7 +274,7 @@ jobs:
name: Check Configuration section
run: |
sed -n '/## Configuration/,$p' README.md | sed -n '/## Reference/q;p' >> config_section.txt
jq -r '.config[] | keys[]' < provider/cmd/pulumi-resource-${{ env.PROVIDER }}/schema.json >> keys.txt
jq -r '.config | select(.variables) | .variables | keys[]' < provider/cmd/pulumi-resource-${{ env.PROVIDER }}/schema.json >> keys.txt
EOF=$(dd if=/dev/urandom bs=15 count=1 status=none | base64)
{
echo "MISSING_CONFIG<<$EOF";
Expand Down
21 changes: 16 additions & 5 deletions .github/workflows/prerelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ jobs:
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
Expand All @@ -128,6 +129,7 @@ jobs:
- dotnet
- go
- java

lint:
name: lint
uses: ./.github/workflows/lint.yml
Expand All @@ -150,12 +152,15 @@ jobs:
ref: deca2c5c6015ad7aaea6f572a1c2b198ca323592
- name: Unshallow clone for tags
run: git fetch --prune --unshallow --tags
- name: Prepare upstream code
run: make upstream
- name: Install Go
uses: actions/setup-go@v5
with:
cache-dependency-path: |
sdk/go.sum
go-version: 1.21.x
cache-dependency-path: |
provider/*.sum
upstream/*.sum
- name: Install pulumictl
uses: jaxxstorm/action-install-gh-release@v1.11.0
with:
Expand All @@ -170,8 +175,14 @@ jobs:
uses: jaxxstorm/action-install-gh-release@v1.11.0
with:
repo: pulumi/schema-tools
- name: Build tfgen & provider binaries
run: make provider
- 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'
Expand Down Expand Up @@ -202,7 +213,7 @@ jobs:
name: Check Configuration section
run: |
sed -n '/## Configuration/,$p' README.md | sed -n '/## Reference/q;p' >> config_section.txt
jq -r '.config[] | keys[]' < provider/cmd/pulumi-resource-${{ env.PROVIDER }}/schema.json >> keys.txt
jq -r '.config | select(.variables) | .variables | keys[]' < provider/cmd/pulumi-resource-${{ env.PROVIDER }}/schema.json >> keys.txt
EOF=$(dd if=/dev/urandom bs=15 count=1 status=none | base64)
{
echo "MISSING_CONFIG<<$EOF";
Expand Down
21 changes: 16 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ jobs:
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
Expand All @@ -127,6 +128,7 @@ jobs:
- dotnet
- go
- java

create_docs_build:
name: create_docs_build
needs: tag_sdk
Expand Down Expand Up @@ -164,12 +166,15 @@ jobs:
ref: deca2c5c6015ad7aaea6f572a1c2b198ca323592
- name: Unshallow clone for tags
run: git fetch --prune --unshallow --tags
- name: Prepare upstream code
run: make upstream
- name: Install Go
uses: actions/setup-go@v5
with:
cache-dependency-path: |
sdk/go.sum
go-version: 1.21.x
cache-dependency-path: |
provider/*.sum
upstream/*.sum
- name: Install pulumictl
uses: jaxxstorm/action-install-gh-release@v1.11.0
with:
Expand All @@ -184,8 +189,14 @@ jobs:
uses: jaxxstorm/action-install-gh-release@v1.11.0
with:
repo: pulumi/schema-tools
- name: Build tfgen & provider binaries
run: make provider
- 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'
Expand Down Expand Up @@ -216,7 +227,7 @@ jobs:
name: Check Configuration section
run: |
sed -n '/## Configuration/,$p' README.md | sed -n '/## Reference/q;p' >> config_section.txt
jq -r '.config[] | keys[]' < provider/cmd/pulumi-resource-${{ env.PROVIDER }}/schema.json >> keys.txt
jq -r '.config | select(.variables) | .variables | keys[]' < provider/cmd/pulumi-resource-${{ env.PROVIDER }}/schema.json >> keys.txt
EOF=$(dd if=/dev/urandom bs=15 count=1 status=none | base64)
{
echo "MISSING_CONFIG<<$EOF";
Expand Down
20 changes: 15 additions & 5 deletions .github/workflows/run-acceptance-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ jobs:
- dotnet
- go
- java

comment-notification:
if: github.event_name == 'repository_dispatch'
name: comment-notification
Expand Down Expand Up @@ -175,12 +176,15 @@ jobs:
ref: deca2c5c6015ad7aaea6f572a1c2b198ca323592
- name: Unshallow clone for tags
run: git fetch --prune --unshallow --tags
- name: Prepare upstream code
run: make upstream
- name: Install Go
uses: actions/setup-go@v5
with:
cache-dependency-path: |
sdk/go.sum
go-version: 1.21.x
cache-dependency-path: |
provider/*.sum
upstream/*.sum
- name: Install pulumictl
uses: jaxxstorm/action-install-gh-release@v1.11.0
with:
Expand All @@ -195,8 +199,14 @@ jobs:
uses: jaxxstorm/action-install-gh-release@v1.11.0
with:
repo: pulumi/schema-tools
- name: Build tfgen & provider binaries
run: make provider
- 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'
Expand Down Expand Up @@ -227,7 +237,7 @@ jobs:
name: Check Configuration section
run: |
sed -n '/## Configuration/,$p' README.md | sed -n '/## Reference/q;p' >> config_section.txt
jq -r '.config[] | keys[]' < provider/cmd/pulumi-resource-${{ env.PROVIDER }}/schema.json >> keys.txt
jq -r '.config | select(.variables) | .variables | keys[]' < provider/cmd/pulumi-resource-${{ env.PROVIDER }}/schema.json >> keys.txt
EOF=$(dd if=/dev/urandom bs=15 count=1 status=none | base64)
{
echo "MISSING_CONFIG<<$EOF";
Expand Down
13 changes: 8 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -135,11 +135,14 @@ test_provider:
@echo ""
cd provider && go test -v -short ./... -parallel $(TESTPARALLELISM)

tfgen: export PULUMI_HOME := $(WORKING_DIR)/.pulumi
tfgen: export PATH := $(WORKING_DIR)/.pulumi/bin:$(PATH)
tfgen: install_plugins upstream
(cd provider && go build $(PULUMI_PROVIDER_BUILD_PARALLELISM) -o $(WORKING_DIR)/bin/$(TFGEN) -ldflags "-X $(PROJECT)/$(VERSION_PATH)=$(VERSION)" $(PROJECT)/$(PROVIDER_PATH)/cmd/$(TFGEN))
PULUMI_CONVERT=$(PULUMI_CONVERT) PULUMI_DISABLE_AUTOMATIC_PLUGIN_ACQUISITION=$(PULUMI_CONVERT) $(WORKING_DIR)/bin/$(TFGEN) schema --out provider/cmd/$(PROVIDER)
tfgen: install_plugins upstream tfgen_no_deps

tfgen_no_deps: export PULUMI_HOME := $(WORKING_DIR)/.pulumi
tfgen_no_deps: export PATH := $(WORKING_DIR)/.pulumi/bin:$(PATH)
tfgen_no_deps: export PULUMI_CONVERT := $(PULUMI_CONVERT)
tfgen_no_deps: export PULUMI_DISABLE_AUTOMATIC_PLUGIN_ACQUISITION := $(PULUMI_CONVERT)
tfgen_no_deps: tfgen_build_only
$(WORKING_DIR)/bin/$(TFGEN) schema --out provider/cmd/$(PROVIDER)
(cd provider && VERSION=$(VERSION) go generate cmd/$(PROVIDER)/main.go)

tfgen_build_only:
Expand Down

0 comments on commit 9e0f1d0

Please sign in to comment.