Skip to content

Commit

Permalink
Update GitHub Actions workflows. (#1016)
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 066e6d71af56d6d35811ce39873d896c63a05da5.
  • Loading branch information
pulumi-bot authored Mar 1, 2024
1 parent e3571ee commit b03762b
Showing 1 changed file with 16 additions and 1 deletion.
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 @@ -96,6 +106,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
.pulumi/bin/pulumi plugin install resource aws 6.8.0

Expand All @@ -115,6 +127,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 @@ -124,9 +137,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 docs
(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 b03762b

Please sign in to comment.