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

feat/sync_provider_1.81.100 #40

Merged
merged 5 commits into from
Jun 7, 2024
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
6 changes: 3 additions & 3 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ jobs:
uses: jaxxstorm/[email protected]
with:
repo: pulumi/pulumictl
tag: v0.0.32
tag: v0.0.46
- name: Install Pulumi CLI
uses: pulumi/[email protected]
with:
pulumi-version: 3.47.1
pulumi-version: 3.117.0
- name: Setup Node
uses: actions/setup-node@v1
with:
Expand Down Expand Up @@ -57,7 +57,7 @@ jobs:
dotnetversion:
- 6.0.408
goversion:
- 1.18.x
- 1.21.x
language:
- nodejs
- python
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
uses: jaxxstorm/[email protected]
with:
repo: pulumi/pulumictl
tag: v0.0.32
tag: v0.0.46
- name: Set PreRelease Version
run: echo "GORELEASER_CURRENT_TAG=v$(pulumictl get version --language generic)" >> $GITHUB_ENV
# - name: Run GoReleaser
Expand All @@ -48,7 +48,7 @@ jobs:
fail-fast: true
matrix:
goversion:
- 1.18.x
- 1.21.x
publish_sdk:
name: Publish SDKs
runs-on: ubuntu-20.04
Expand All @@ -66,11 +66,11 @@ jobs:
uses: jaxxstorm/[email protected]
with:
repo: pulumi/pulumictl
tag: v0.0.32
tag: v0.0.46
- name: Install Pulumi CLI
uses: pulumi/[email protected]
with:
pulumi-version: 3.47.1
pulumi-version: 3.117.0
- name: Setup Node
uses: actions/setup-node@v1
with:
Expand Down Expand Up @@ -119,7 +119,7 @@ jobs:
dotnetversion:
- 6.0.408
goversion:
- 1.18.x
- 1.21.x
language:
- nodejs
- python
Expand Down
7 changes: 2 additions & 5 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,18 @@
linters:
enable:
- deadcode
- errcheck
- goconst
- gofmt
- golint
- gosec
- govet
- ineffassign
- interfacer
- lll
- megacheck
- misspell
- nakedret
- structcheck
- revive
- unconvert
- varcheck
- unused
enable-all: false
run:
skip-files:
Expand Down
2 changes: 1 addition & 1 deletion COPYRIGHT
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ LICENSE or <http://www.apache.org/licenses/LICENSE-2.0>).
This project is a larger work that combines with software written
by third parties, licensed under their own terms.

Notably, this larger work combines with the Terraform AWS Provider,
Notably, this larger work combines with the Terraform XYZ Provider,
which is licensed under the Mozilla Public License 2.0 (see
<https://www.mozilla.org/en-US/MPL/2.0/> or the project itself at
<https://github.com/terraform-providers/terraform-provider-aws>).
19 changes: 16 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,12 @@ REQ_CLIENT_LDFLAG := github.com/tencentcloudstack/terraform-provider-tencentclou
OS := $(shell uname)
EMPTY_TO_AVOID_SED := ""

PULUMI_SKIP_ERROR := true

prepare::
@if test -z "${NAME}"; then echo "NAME not set"; exit 1; fi
@if test -z "${REPOSITORY}"; then echo "REPOSITORY not set"; exit 1; fi
@if test -z "${ORG}"; then echo "ORG not set"; exit 1; fi
@if test ! -d "provider/cmd/pulumi-tfgen-x${EMPTY_TO_AVOID_SED}yz"; then "Project already prepared"; exit 1; fi

mv "provider/cmd/pulumi-tfgen-x${EMPTY_TO_AVOID_SED}yz" provider/cmd/pulumi-tfgen-${NAME}
Expand All @@ -33,12 +36,14 @@ prepare::
if [[ "${OS}" != "Darwin" ]]; then \
sed -i 's,github.com/tencentcloudstack/pulumi-tencentcloud,${REPOSITORY},g' provider/go.mod; \
find ./ ! -path './.git/*' -type f -exec sed -i 's/[x]yz/${NAME}/g' {} \; &> /dev/null; \
find ./ ! -path './.git/*' -type f -exec sed -i 's/[a]bc/${ORG}/g' {} \; &> /dev/null; \
fi

# In MacOS the -i parameter needs an empty string to execute in place.
if [[ "${OS}" == "Darwin" ]]; then \
sed -i '' 's,github.com/tencentcloudstack/pulumi-tencentcloud,${REPOSITORY},g' provider/go.mod; \
find ./ ! -path './.git/*' -type f -exec sed -i '' 's/[x]yz/${NAME}/g' {} \; &> /dev/null; \
find ./ ! -path './.git/*' -type f -exec sed -i '' 's/[a]bc/${ORG}/g' {} \; &> /dev/null; \
fi

.PHONY: development provider build_sdks build_nodejs build_dotnet build_go build_python cleanup
Expand All @@ -49,27 +54,32 @@ development:: install_plugins provider lint_provider build_sdks install_sdks cle
build:: install_plugins provider build_sdks install_sdks
only_build:: build

tfgen:: export PULUMI_SKIP_MISSING_MAPPING_ERROR := ${PULUMI_SKIP_ERROR}
tfgen:: install_plugins
(cd provider && go build -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}
(cd provider && VERSION=$(VERSION) go generate cmd/${PROVIDER}/main.go)

provider:: export PULUMI_SKIP_MISSING_MAPPING_ERROR := ${PULUMI_SKIP_ERROR}
provider:: tfgen install_plugins # build the provider binary
(cd provider && go build -o $(WORKING_DIR)/bin/${PROVIDER} -ldflags "-X ${PROJECT}/${VERSION_PATH}=${VERSION} -X ${REQ_CLIENT_LDFLAG}" ${PROJECT}/${PROVIDER_PATH}/cmd/${PROVIDER})

build_sdks:: export PULUMI_SKIP_MISSING_MAPPING_ERROR := ${PULUMI_SKIP_ERROR}
build_sdks:: install_plugins provider build_nodejs build_python build_go build_dotnet # build all the sdks

build_nodejs:: VERSION := $(shell pulumictl get version --language javascript)
build_nodejs:: export PULUMI_SKIP_MISSING_MAPPING_ERROR := ${PULUMI_SKIP_ERROR}
build_nodejs:: install_plugins tfgen # build the node sdk
rm -rf sdk/nodejs/node_modules # clean node_modules before building
$(WORKING_DIR)/bin/$(TFGEN) nodejs --overlays provider/overlays/nodejs --out sdk/nodejs/
cd sdk/nodejs/ && \
yarn install && \
yarn run tsc && \
cp -R scripts/ bin && \
cp ../../README.md ../../LICENSE package.json yarn.lock ./bin/ && \
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_SKIP_MISSING_MAPPING_ERROR := ${PULUMI_SKIP_ERROR}
build_python:: install_plugins tfgen # build the python sdk
$(WORKING_DIR)/bin/$(TFGEN) python --overlays provider/overlays/python --out sdk/python/
cd sdk/python/ && \
Expand All @@ -81,13 +91,16 @@ build_python:: install_plugins tfgen # build the python sdk
cd ./bin && python3 setup.py build sdist

build_dotnet:: DOTNET_VERSION := $(shell pulumictl get version --language dotnet)
build_dotnet:: export PULUMI_SKIP_MISSING_MAPPING_ERROR := ${PULUMI_SKIP_ERROR}
build_dotnet:: install_plugins tfgen # build the dotnet sdk
@echo "PULUMI_SKIP_MISSING_MAPPING_ERROR: ${PULUMI_SKIP_MISSING_MAPPING_ERROR}"
pulumictl get version --language dotnet
$(WORKING_DIR)/bin/$(TFGEN) dotnet --overlays provider/overlays/dotnet --out sdk/dotnet/
cd sdk/dotnet/ && \
echo "${DOTNET_VERSION}" >version.txt && \
dotnet build /p:Version=${DOTNET_VERSION}

build_go:: export PULUMI_SKIP_MISSING_MAPPING_ERROR := ${PULUMI_SKIP_ERROR}
build_go:: install_plugins tfgen # build the go sdk
$(WORKING_DIR)/bin/$(TFGEN) go --overlays provider/overlays/go --out sdk/go/

Expand All @@ -100,8 +113,8 @@ cleanup:: # cleans up the temporary directory

help::
@grep '^[^.#]\+:\s\+.*#' Makefile | \
sed "s/\(.\+\):\s*\(.*\) #\s*\(.*\)/`printf "\033[93m"`\1`printf "\033[0m"` \3 [\2]/" | \
expand -t20
sed "s/\(.\+\):\s*\(.*\) #\s*\(.*\)/`printf "\033[93m"`\1`printf "\033[0m"` \3 [\2]/" | \
expand -t20

clean::
rm -rf sdk/{dotnet,nodejs,go,python}
Expand Down
5 changes: 4 additions & 1 deletion provider/cmd/pulumi-info-tencentcloud/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,8 @@ package main
import "github.com/tencentcloudstack/pulumi-tencentcloud/provider/info"

func main() {
info.WriteInfos()
err := info.WriteInfos()
if err != nil {
panic(err)
}
}
Loading
Loading