Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update GitHub Actions workflows. #401

Merged
merged 1 commit into from
Oct 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions .ci-mgmt.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
provider: openstack
major-version: 3
env:
OS_AUTH_URL: "https://auth.cloud.ovh.net/v3/"
OS_IDENTITY_API_VERSION: 3
OS_PASSWORD: ${{ secrets.OS_PASSWORD }}
OS_REGION_NAME: UK1
OS_TENANT_ID: "9d596a0506974e0f8c79673edf0bbdd3"
OS_TENANT_NAME: "9616699805113213"
OS_USERNAME: "jrGMbHHjkUQ7"
OS_USER_DOMAIN_NAME: Default
OS_PROJECT_DOMAIN_NAME: Default
makeTemplate: bridged
plugins:
- name: http
version: 0.0.1
team: ecosystem
javaGenVersion: "v0.9.5"
2 changes: 1 addition & 1 deletion .github/workflows/command-dispatch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ env:
GOVERSION: 1.21.x
JAVAVERSION: "11"
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
NODEVERSION: 16.x
NODEVERSION: 20.x
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
NUGET_PUBLISH_KEY: ${{ secrets.NUGET_PUBLISH_KEY }}
OS_AUTH_URL: https://auth.cloud.ovh.net/v3/
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ env:
GOVERSION: 1.21.x
JAVAVERSION: "11"
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
NODEVERSION: 16.x
NODEVERSION: 20.x
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
NUGET_PUBLISH_KEY: ${{ secrets.NUGET_PUBLISH_KEY }}
OS_AUTH_URL: https://auth.cloud.ovh.net/v3/
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ env:
GOVERSION: 1.21.x
JAVAVERSION: "11"
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
NODEVERSION: 16.x
NODEVERSION: 20.x
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
NUGET_PUBLISH_KEY: ${{ secrets.NUGET_PUBLISH_KEY }}
OS_AUTH_URL: https://auth.cloud.ovh.net/v3/
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/prerelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ env:
GOVERSION: 1.21.x
JAVAVERSION: "11"
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
NODEVERSION: 16.x
NODEVERSION: 20.x
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
NUGET_PUBLISH_KEY: ${{ secrets.NUGET_PUBLISH_KEY }}
OS_AUTH_URL: https://auth.cloud.ovh.net/v3/
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ env:
GOVERSION: 1.21.x
JAVAVERSION: "11"
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
NODEVERSION: 16.x
NODEVERSION: 20.x
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
NUGET_PUBLISH_KEY: ${{ secrets.NUGET_PUBLISH_KEY }}
OS_AUTH_URL: https://auth.cloud.ovh.net/v3/
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ env:
GOVERSION: 1.21.x
JAVAVERSION: "11"
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
NODEVERSION: 16.x
NODEVERSION: 20.x
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
NUGET_PUBLISH_KEY: ${{ secrets.NUGET_PUBLISH_KEY }}
OS_AUTH_URL: https://auth.cloud.ovh.net/v3/
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/resync-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ env:
GOVERSION: 1.21.x
JAVAVERSION: "11"
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
NODEVERSION: 16.x
NODEVERSION: 20.x
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
NUGET_PUBLISH_KEY: ${{ secrets.NUGET_PUBLISH_KEY }}
OS_AUTH_URL: https://auth.cloud.ovh.net/v3/
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/run-acceptance-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ env:
GOVERSION: 1.21.x
JAVAVERSION: "11"
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
NODEVERSION: 16.x
NODEVERSION: 20.x
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
NUGET_PUBLISH_KEY: ${{ secrets.NUGET_PUBLISH_KEY }}
OS_AUTH_URL: https://auth.cloud.ovh.net/v3/
Expand Down
91 changes: 0 additions & 91 deletions .github/workflows/update-bridge.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/upgrade-provider.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
jobs:
upgrade_provider:
if: ${{ contains(github.event.issue.title, 'Upgrade terraform-provider-') }}
if: ${{ contains(github.event.issue.title, 'Upgrade terraform-provider-') || github.event_name == 'workflow_dispatch' }}
name: upgrade-provider
runs-on: ubuntu-latest
steps:
Expand Down
32 changes: 27 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ JAVA_GEN := pulumi-java-gen
JAVA_GEN_VERSION := v0.9.5
TESTPARALLELISM := 10
WORKING_DIR := $(shell pwd)
PULUMI_CONVERT := 0

development: install_plugins provider build_sdks install_sdks

Expand Down Expand Up @@ -93,9 +94,8 @@ install_dotnet_sdk:
install_nodejs_sdk:
yarn link --cwd $(WORKING_DIR)/sdk/nodejs/bin

install_plugins:
[ -x "$(shell command -v pulumi 2>/dev/null)" ] || curl -fsSL https://get.pulumi.com | sh
pulumi plugin install resource http 0.0.1
install_plugins: .pulumi/bin/pulumi
.pulumi/bin/pulumi plugin install resource http 0.0.1

lint_provider: provider
cd provider && golangci-lint run -c ../.golangci.yml
Expand All @@ -108,7 +108,7 @@ test:

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))
$(WORKING_DIR)/bin/$(TFGEN) schema --out provider/cmd/$(PROVIDER)
PATH=${PWD}/.pulumi/bin:$$PATH PULUMI_CONVERT=$(PULUMI_CONVERT) $(WORKING_DIR)/bin/$(TFGEN) schema --out provider/cmd/$(PROVIDER)
(cd provider && VERSION=$(VERSION) go generate cmd/$(PROVIDER)/main.go)

upstream:
Expand All @@ -125,4 +125,26 @@ upstream.rebase:
bin/pulumi-java-gen:
$(shell pulumictl download-binary -n pulumi-language-java -v $(JAVA_GEN_VERSION) -r pulumi/pulumi-java)

.PHONY: development build build_sdks install_go_sdk install_java_sdk install_python_sdk install_sdks only_build build_dotnet build_go build_java build_nodejs build_python clean cleanup help install_dotnet_sdk install_nodejs_sdk install_plugins lint_provider provider test tfgen upstream upstream.finalize upstream.rebase
# To make an immediately observable change to .ci-mgmt.yaml:
#
# - Edit .ci-mgmt.yaml
# - Run make ci-mgmt to apply the change locally.
#
ci-mgmt: .ci-mgmt.yaml
rm .github/workflows/*.yml # Copied from update-workflows.yml
go run github.com/pulumi/ci-mgmt/provider-ci@master generate \
--name pulumi/pulumi-$(PACK) \
--out . \
--template bridged-provider \
--config $<

.pulumi/bin/pulumi: HOME := $(WORKING_DIR)
.pulumi/bin/pulumi: .pulumi/version
curl -fsSL https://get.pulumi.com | sh -s -- --version $(cat .pulumi/version)

# Compute the version of Pulumi to use by inspecting the Go dependencies of the provider.
.pulumi/version:
@mkdir -p .pulumi
@cd provider && go list -f "{{slice .Version 1}}" -m github.com/pulumi/pulumi/pkg/v3 | tee ../$@

.PHONY: development build build_sdks install_go_sdk install_java_sdk install_python_sdk install_sdks only_build build_dotnet build_go build_java build_nodejs build_python clean cleanup help install_dotnet_sdk install_nodejs_sdk install_plugins lint_provider provider test tfgen upstream upstream.finalize upstream.rebase ci-mgmt
Loading