Skip to content

Commit

Permalink
Update GitHub Actions workflows. (#250)
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 37dec67d2f95d9d7f35658dc637ce507fdfa43b9.
  • Loading branch information
pulumi-bot authored Mar 2, 2024
1 parent 8387fdf commit 19a525b
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Free Disk Space (Ubuntu)
uses: jlumbroso/free-disk-spacev@v1
uses: jlumbroso/free-disk-space@v1.3.1
with:
# this might remove tools that are actually needed,
# if set to "true" but frees about 6 GB
Expand Down
11 changes: 9 additions & 2 deletions .github/workflows/upgrade-bridge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@ on:
required: false
type: string
default: ""
pr-title-prefix:
description: Prefix to add to the auto-opened pull request title
required: false
type: string
default: ""
automerge:
description: Mark created PR for auto-merging?
required: false
Expand All @@ -53,7 +58,7 @@ jobs:
steps:
- name: Call upgrade provider action
if: github.event_name == 'workflow_dispatch'
uses: pulumi/pulumi-upgrade-provider-action@v0.0.11
uses: pulumi/pulumi-upgrade-provider-action@v0.0.12
with:
kind: ${{ inputs.kind }}
email: bot@pulumi.com
Expand All @@ -63,9 +68,10 @@ jobs:
target-pulumi-version: ${{ inputs.target-pulumi-version }}
pr-reviewers: ${{ inputs.pr-reviewers }}
pr-description: ${{ inputs.pr-description }}
pr-title-prefix: ${{ inputs.pr-title-prefix }}
- name: Call upgrade provider action
if: github.event_name == 'repository_dispatch'
uses: pulumi/pulumi-upgrade-provider-action@v0.0.11
uses: pulumi/pulumi-upgrade-provider-action@v0.0.12
with:
kind: ${{ github.event.client_payload.kind || 'bridge' }}
email: bot@pulumi.com
Expand All @@ -75,6 +81,7 @@ jobs:
target-bridge-version: ${{ github.event.client_payload.target-bridge-version }}
pr-reviewers: ${{ github.event.client_payload.pr-reviewers }}
pr-description: ${{ github.event.client_payload.pr-description }}
pr-title-prefix: ${{ github.event.client_payload.pr-title-prefix }}
- env:
SLACK_CHANNEL: provider-upgrade-publish-status
SLACK_COLOR: "#7CFC00"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/upgrade-provider.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Call upgrade provider action
uses: pulumi/pulumi-upgrade-provider-action@v0.0.11
uses: pulumi/pulumi-upgrade-provider-action@v0.0.12
with:
kind: all
email: bot@pulumi.com
Expand Down
17 changes: 16 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ install_sdks: install_dotnet_sdk install_python_sdk install_nodejs_sdk install_j
only_build: build

build_dotnet: DOTNET_VERSION := $(shell pulumictl get version --language dotnet)
build_dotnet: export PULUMI_HOME := $(WORKING_DIR)/.pulumi
build_dotnet: export PATH := $(WORKING_DIR)/.pulumi/bin:$(PATH)
build_dotnet: upstream
pulumictl get version --language dotnet
PULUMI_CONVERT=$(PULUMI_CONVERT) PULUMI_DISABLE_AUTOMATIC_PLUGIN_ACQUISITION=$(PULUMI_CONVERT) $(WORKING_DIR)/bin/$(TFGEN) dotnet --out sdk/dotnet/
Expand All @@ -38,18 +40,24 @@ build_dotnet: upstream
echo "$(DOTNET_VERSION)" >version.txt && \
dotnet build /p:Version=$(DOTNET_VERSION)

build_go: export PULUMI_HOME := $(WORKING_DIR)/.pulumi
build_go: export PATH := $(WORKING_DIR)/.pulumi/bin:$(PATH)
build_go: upstream
PULUMI_CONVERT=$(PULUMI_CONVERT) PULUMI_DISABLE_AUTOMATIC_PLUGIN_ACQUISITION=$(PULUMI_CONVERT) $(WORKING_DIR)/bin/$(TFGEN) go --out sdk/go/
cd sdk && go list "$$(grep -e "^module" go.mod | cut -d ' ' -f 2)/go/..." | xargs -I {} bash -c 'go build {} && go clean -i {}'

build_java: PACKAGE_VERSION := $(shell pulumictl get version --language generic)
build_java: export PULUMI_HOME := $(WORKING_DIR)/.pulumi
build_java: export PATH := $(WORKING_DIR)/.pulumi/bin:$(PATH)
build_java: bin/pulumi-java-gen upstream
$(WORKING_DIR)/bin/$(JAVA_GEN) generate --schema provider/cmd/$(PROVIDER)/schema.json --out sdk/java --build gradle-nexus
cd sdk/java/ && \
printf "module fake_java_module // Exclude this directory from Go tools\n\ngo 1.17\n" > go.mod && \
gradle --console=plain build

build_nodejs: VERSION := $(shell pulumictl get version --language javascript)
build_nodejs: export PULUMI_HOME := $(WORKING_DIR)/.pulumi
build_nodejs: export PATH := $(WORKING_DIR)/.pulumi/bin:$(PATH)
build_nodejs: upstream
PULUMI_CONVERT=$(PULUMI_CONVERT) PULUMI_DISABLE_AUTOMATIC_PLUGIN_ACQUISITION=$(PULUMI_CONVERT) $(WORKING_DIR)/bin/$(TFGEN) nodejs --out sdk/nodejs/
cd sdk/nodejs/ && \
Expand All @@ -60,6 +68,8 @@ build_nodejs: upstream
sed -i.bak -e "s/\$${VERSION}/$(VERSION)/g" ./bin/package.json

build_python: PYPI_VERSION := $(shell pulumictl get version --language python)
build_python: export PULUMI_HOME := $(WORKING_DIR)/.pulumi
build_python: export PATH := $(WORKING_DIR)/.pulumi/bin:$(PATH)
build_python: upstream
rm -rf sdk/python/
PULUMI_CONVERT=$(PULUMI_CONVERT) PULUMI_DISABLE_AUTOMATIC_PLUGIN_ACQUISITION=$(PULUMI_CONVERT) $(WORKING_DIR)/bin/$(TFGEN) python --out sdk/python/
Expand Down Expand Up @@ -93,6 +103,8 @@ install_dotnet_sdk:
install_nodejs_sdk:
yarn link --cwd $(WORKING_DIR)/sdk/nodejs/bin

install_plugins: export PULUMI_HOME := $(WORKING_DIR)/.pulumi
install_plugins: export PATH := $(WORKING_DIR)/.pulumi/bin:$(PATH)
install_plugins: .pulumi/bin/pulumi

lint_provider: provider
Expand All @@ -111,6 +123,7 @@ provider_no_deps:

provider: tfgen provider_no_deps

test: export PATH := $(WORKING_DIR)/bin:$(PATH)
test:
cd examples && go test -v -tags=all -parallel $(TESTPARALLELISM) -timeout 2h

Expand All @@ -120,9 +133,11 @@ 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))
PATH=${PWD}/.pulumi/bin:$$PATH PULUMI_CONVERT=$(PULUMI_CONVERT) PULUMI_DISABLE_AUTOMATIC_PLUGIN_ACQUISITION=$(PULUMI_CONVERT) $(WORKING_DIR)/bin/$(TFGEN) schema --out provider/cmd/$(PROVIDER)
PULUMI_CONVERT=$(PULUMI_CONVERT) PULUMI_DISABLE_AUTOMATIC_PLUGIN_ACQUISITION=$(PULUMI_CONVERT) $(WORKING_DIR)/bin/$(TFGEN) schema --out provider/cmd/$(PROVIDER)
(cd provider && VERSION=$(VERSION) go generate cmd/$(PROVIDER)/main.go)

upstream:
Expand Down

0 comments on commit 19a525b

Please sign in to comment.