Skip to content

Commit

Permalink
[internal] Update GitHub Actions workflow files (#482)
Browse files Browse the repository at this point in the history
  • Loading branch information
pulumi-bot authored Feb 8, 2023
1 parent 0e19b79 commit c1c4cfb
Show file tree
Hide file tree
Showing 20 changed files with 528 additions and 91 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,9 @@ jobs:
with:
path: ci-scripts
repository: pulumi/scripts
- name: Mark repo as safe directory
run: git config --global --add safe.directory /__w/pulumi-${{ env.PROVIDER
}}/pulumi-${{ env.PROVIDER }}
- name: Unshallow clone for tags
run: git fetch --prune --unshallow --tags
- name: Install Go
Expand Down Expand Up @@ -217,6 +220,9 @@ jobs:
with:
path: ci-scripts
repository: pulumi/scripts
- name: Mark repo as safe directory
run: git config --global --add safe.directory /__w/pulumi-${{ env.PROVIDER
}}/pulumi-${{ env.PROVIDER }}
- name: Unshallow clone for tags
run: git fetch --prune --unshallow --tags
- name: Install Go
Expand Down
8 changes: 7 additions & 1 deletion .github/workflows/master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,9 @@ jobs:
with:
path: ci-scripts
repository: pulumi/scripts
- name: Mark repo as safe directory
run: git config --global --add safe.directory /__w/pulumi-${{ env.PROVIDER
}}/pulumi-${{ env.PROVIDER }}
- name: Unshallow clone for tags
run: git fetch --prune --unshallow --tags
- name: Install Go
Expand Down Expand Up @@ -217,6 +220,9 @@ jobs:
with:
path: ci-scripts
repository: pulumi/scripts
- name: Mark repo as safe directory
run: git config --global --add safe.directory /__w/pulumi-${{ env.PROVIDER
}}/pulumi-${{ env.PROVIDER }}
- name: Unshallow clone for tags
run: git fetch --prune --unshallow --tags
- name: Install Go
Expand Down Expand Up @@ -333,7 +339,7 @@ jobs:
run: echo "GORELEASER_CURRENT_TAG=v$(pulumictl get version --language generic)"
>> $GITHUB_ENV
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v4
uses: goreleaser/goreleaser-action@v2
with:
args: -p 3 -f .goreleaser.prerelease.yml --rm-dist --skip-validate --timeout
60m0s
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/prerelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,9 @@ jobs:
with:
path: ci-scripts
repository: pulumi/scripts
- name: Mark repo as safe directory
run: git config --global --add safe.directory /__w/pulumi-${{ env.PROVIDER
}}/pulumi-${{ env.PROVIDER }}
- name: Unshallow clone for tags
run: git fetch --prune --unshallow --tags
- name: Install Go
Expand Down Expand Up @@ -167,6 +170,9 @@ jobs:
with:
path: ci-scripts
repository: pulumi/scripts
- name: Mark repo as safe directory
run: git config --global --add safe.directory /__w/pulumi-${{ env.PROVIDER
}}/pulumi-${{ env.PROVIDER }}
- name: Unshallow clone for tags
run: git fetch --prune --unshallow --tags
- name: Install Go
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,9 @@ jobs:
with:
path: ci-scripts
repository: pulumi/scripts
- name: Mark repo as safe directory
run: git config --global --add safe.directory /__w/pulumi-${{ env.PROVIDER
}}/pulumi-${{ env.PROVIDER }}
- name: Unshallow clone for tags
run: git fetch --prune --unshallow --tags
- name: Install Go
Expand Down Expand Up @@ -180,6 +183,9 @@ jobs:
with:
path: ci-scripts
repository: pulumi/scripts
- name: Mark repo as safe directory
run: git config --global --add safe.directory /__w/pulumi-${{ env.PROVIDER
}}/pulumi-${{ env.PROVIDER }}
- name: Unshallow clone for tags
run: git fetch --prune --unshallow --tags
- name: Install Go
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/run-acceptance-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,9 @@ jobs:
with:
path: ci-scripts
repository: pulumi/scripts
- name: Mark repo as safe directory
run: git config --global --add safe.directory /__w/pulumi-${{ env.PROVIDER
}}/pulumi-${{ env.PROVIDER }}
- name: Unshallow clone for tags
run: git fetch --prune --unshallow --tags
- name: Install Go
Expand Down Expand Up @@ -195,6 +198,9 @@ jobs:
with:
path: ci-scripts
repository: pulumi/scripts
- name: Mark repo as safe directory
run: git config --global --add safe.directory /__w/pulumi-${{ env.PROVIDER
}}/pulumi-${{ env.PROVIDER }}
- name: Unshallow clone for tags
run: git fetch --prune --unshallow --tags
- name: Install Go
Expand Down
32 changes: 16 additions & 16 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,26 +19,26 @@ build: install_plugins provider build_sdks install_sdks

build_sdks: build_nodejs build_python build_go build_dotnet build_java

install_go_sdk:
install_go_sdk:

install_java_sdk:
install_java_sdk:

install_python_sdk:
install_python_sdk:

install_sdks: install_dotnet_sdk install_python_sdk install_nodejs_sdk install_java_sdk

only_build: build

build_dotnet: DOTNET_VERSION := $(shell pulumictl get version --language dotnet)
build_dotnet:
build_dotnet:
pulumictl get version --language dotnet
$(WORKING_DIR)/bin/$(TFGEN) dotnet --out sdk/dotnet/
cd sdk/dotnet/ && \
echo "module fake_dotnet_module // Exclude this directory from Go tools\n\ngo 1.17" > go.mod && \
echo "$(DOTNET_VERSION)" >version.txt && \
dotnet build /p:Version=$(DOTNET_VERSION)

build_go:
build_go:
$(WORKING_DIR)/bin/$(TFGEN) go --out sdk/go/
cd sdk && go list `grep -e "^module" go.mod | cut -d ' ' -f 2`/go/... | xargs go build

Expand All @@ -50,7 +50,7 @@ build_java: bin/pulumi-java-gen
gradle --console=plain build

build_nodejs: VERSION := $(shell pulumictl get version --language javascript)
build_nodejs:
build_nodejs:
$(WORKING_DIR)/bin/$(TFGEN) nodejs --out sdk/nodejs/
cd sdk/nodejs/ && \
echo "module fake_nodejs_module // Exclude this directory from Go tools\n\ngo 1.17" > go.mod && \
Expand All @@ -60,7 +60,7 @@ build_nodejs:
sed -i.bak -e "s/\$${VERSION}/$(VERSION)/g" ./bin/package.json

build_python: PYPI_VERSION := $(shell pulumictl get version --language python)
build_python:
build_python:
$(WORKING_DIR)/bin/$(TFGEN) python --out sdk/python/
cd sdk/python/ && \
echo "module fake_python_module // Exclude this directory from Go tools\n\ngo 1.17" > go.mod && \
Expand All @@ -71,29 +71,29 @@ build_python:
rm ./bin/setup.py.bak && rm ./bin/go.mod && \
cd ./bin && python3 setup.py build sdist

clean:
clean:
rm -rf sdk/{dotnet,nodejs,go,python}

cleanup:
cleanup:
rm -r $(WORKING_DIR)/bin
rm -f provider/cmd/$(PROVIDER)/schema.go

docs:
cd provider/pkg/docs-gen/examples/ && go run generate.go ./yaml ./

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

install_dotnet_sdk:
install_dotnet_sdk:
mkdir -p $(WORKING_DIR)/nuget
find . -name '*.nupkg' -print -exec cp -p {} $(WORKING_DIR)/nuget \;

install_nodejs_sdk:
install_nodejs_sdk:
yarn link --cwd $(WORKING_DIR)/sdk/nodejs/bin

install_plugins:
install_plugins:
[ -x $(shell which pulumi) ] || curl -fsSL https://get.pulumi.com | sh

lint_provider: provider
Expand All @@ -102,15 +102,15 @@ lint_provider: provider
provider: tfgen install_plugins
(cd provider && go build -p 1 -o $(WORKING_DIR)/bin/$(PROVIDER) -ldflags "-X $(PROJECT)/$(VERSION_PATH)=$(VERSION)" $(PROJECT)/$(PROVIDER_PATH)/cmd/$(PROVIDER))

test:
test:
cd examples && go test -v -tags=all -parallel $(TESTPARALLELISM) -timeout 2h

tfgen: install_plugins docs
(cd provider && go build -p 1 -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)

bin/pulumi-java-gen:
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 docs 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
.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 docs help install_dotnet_sdk install_nodejs_sdk install_plugins lint_provider provider test tfgen
49 changes: 48 additions & 1 deletion examples/container-registries/aws/go/go.mod
Original file line number Diff line number Diff line change
@@ -1,9 +1,56 @@
module github.com/pulumi/pulumi-docker/examples/container-registries/aws/go

go 1.15
go 1.19

require (
github.com/pulumi/pulumi-aws/sdk/v2 v2.13.1
github.com/pulumi/pulumi-docker/sdk/v2 v2.4.1
github.com/pulumi/pulumi/sdk/v2 v2.14.0
)

require (
github.com/Masterminds/semver v1.5.0 // indirect
github.com/blang/semver v3.5.1+incompatible // indirect
github.com/cheggaaa/pb v1.0.18 // indirect
github.com/djherbis/times v1.2.0 // indirect
github.com/emirpasic/gods v1.12.0 // indirect
github.com/gofrs/flock v0.7.1 // indirect
github.com/gofrs/uuid v3.3.0+incompatible // indirect
github.com/gogo/protobuf v1.3.1 // indirect
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b // indirect
github.com/golang/protobuf v1.3.5 // indirect
github.com/grpc-ecosystem/grpc-opentracing v0.0.0-20180507213350-8e809c8a8645 // indirect
github.com/hashicorp/errwrap v1.0.0 // indirect
github.com/hashicorp/go-multierror v1.0.0 // indirect
github.com/inconshreveable/mousetrap v1.0.0 // indirect
github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect
github.com/kevinburke/ssh_config v0.0.0-20190725054713-01f96b0aa0cd // indirect
github.com/mattn/go-runewidth v0.0.8 // indirect
github.com/mitchellh/go-homedir v1.1.0 // indirect
github.com/mitchellh/go-ps v1.0.0 // indirect
github.com/opentracing/basictracer-go v1.0.0 // indirect
github.com/opentracing/opentracing-go v1.1.0 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/sabhiram/go-gitignore v0.0.0-20180611051255-d3107576ba94 // indirect
github.com/sergi/go-diff v1.0.0 // indirect
github.com/spf13/cobra v1.0.0 // indirect
github.com/spf13/pflag v1.0.3 // indirect
github.com/src-d/gcfg v1.4.0 // indirect
github.com/texttheater/golang-levenshtein v0.0.0-20191208221605-eb6844b05fc6 // indirect
github.com/tweekmonster/luser v0.0.0-20161003172636-3fa38070dbd7 // indirect
github.com/uber/jaeger-client-go v2.22.1+incompatible // indirect
github.com/uber/jaeger-lib v2.2.0+incompatible // indirect
github.com/xanzy/ssh-agent v0.2.1 // indirect
go.uber.org/atomic v1.6.0 // indirect
golang.org/x/crypto v0.0.0-20200317142112-1b76d66859c6 // indirect
golang.org/x/net v0.0.0-20200301022130-244492dfa37a // indirect
golang.org/x/sys v0.0.0-20200317113312-5766fd39f98d // indirect
golang.org/x/text v0.3.2 // indirect
google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55 // indirect
google.golang.org/grpc v1.28.0 // indirect
gopkg.in/src-d/go-billy.v4 v4.3.2 // indirect
gopkg.in/src-d/go-git.v4 v4.13.1 // indirect
gopkg.in/warnings.v0 v0.1.2 // indirect
gopkg.in/yaml.v2 v2.2.8 // indirect
sourcegraph.com/sourcegraph/appdash v0.0.0-20190731080439-ebfcffb1b5c0 // indirect
)
Loading

0 comments on commit c1c4cfb

Please sign in to comment.