Port to GitHub actions & publish to Terraform registry (#39)

* Port to GitHub actions

* Fix

* Make docs terraform registry compatible
This commit is contained in:
Gavin Bunney
2021-07-14 17:47:45 -07:00
committed by GitHub
parent 4adaea3109
commit 0b0d03cda2
55 changed files with 265 additions and 7652 deletions

View File

@@ -25,11 +25,17 @@ testacc: fmtcheck
ulimit -n 1024; TF_ACC=1 go test $(TEST) -v $(TESTARGS) -timeout 120m -count=1
testacc-bitbucket: fmtcheck
@sh scripts/start-docker-compose.sh
@bash scripts/start-docker-compose.sh
#The ulimit command is required to allow the tests to open more than the default 256 files as set on MacOS. The tests will fail without this. It must be done as one
#command otherwise the setting is lost
ulimit -n 1024; TF_ACC=1 go test $(TEST) -v $(TESTARGS) -timeout 120m -count=1
@sh scripts/stop-docker-compose.sh
@bash scripts/stop-docker-compose.sh
bitbucket-start:
@bash scripts/start-docker-compose.sh
bitbucket-stop:
@bash scripts/stop-docker-compose.sh
vet:
@echo "go vet ."
@@ -44,13 +50,13 @@ fmt:
gofmt -w $(GOFMT_FILES)
fmtcheck:
@sh -c "'$(CURDIR)/scripts/gofmtcheck.sh'"
@bash -c "'$(CURDIR)/scripts/gofmtcheck.sh'"
errcheck:
@sh -c "'$(CURDIR)/scripts/errcheck.sh'"
@bash -c "'$(CURDIR)/scripts/errcheck.sh'"
build-binaries:
@sh -c "'$(CURDIR)/scripts/build.sh'"
@bash -c "'$(CURDIR)/scripts/build.sh'"
test-compile:
@if [ "$(TEST)" = "./..." ]; then \
@@ -60,11 +66,11 @@ test-compile:
fi
go test -c $(TEST) $(TESTARGS)
website-serve:
@cd docusaurus/website && npm start
ci-build-setup:
sudo rm /usr/local/bin/docker-compose
curl -L https://github.com/docker/compose/releases/download/1.25.4/docker-compose-`uname -s`-`uname -m` > docker-compose
chmod +x docker-compose
sudo mv docker-compose /usr/local/bin
bash scripts/gogetcookie.sh
website-publish:
@cd docusaurus/website && npm run build
@cd docusaurus/website && CURRENT_BRANCH=master USE_SSH=true npm run publish-gh-pages
.PHONY: build test testacc vet fmt fmtcheck errcheck test-compile build-binaries website-serve website-publish
.PHONY: build test testacc vet fmt fmtcheck errcheck test-compile build-binaries ci-build-setup bitbucket-start bitbucket-stop