forked from cloudposse/terraform-github-repository-webhooks
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Additional TF 0.13 Fixes (cloudposse#23)
- Loading branch information
Showing
12 changed files
with
159 additions
and
209 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
name-template: 'v$RESOLVED_VERSION' | ||
tag-template: '$RESOLVED_VERSION' | ||
version-template: '$MAJOR.$MINOR.$PATCH' | ||
version-resolver: | ||
major: | ||
labels: | ||
- 'major' | ||
minor: | ||
labels: | ||
- 'minor' | ||
- 'enhancement' | ||
patch: | ||
labels: | ||
- 'patch' | ||
- 'fix' | ||
- 'bugfix' | ||
- 'bug' | ||
- 'hotfix' | ||
default: 'minor' | ||
|
||
categories: | ||
- title: '🚀 Enhancements' | ||
labels: | ||
- 'enhancement' | ||
- title: '🐛 Bug Fixes' | ||
labels: | ||
- 'fix' | ||
- 'bugfix' | ||
- 'bug' | ||
- 'hotfix' | ||
|
||
change-template: | | ||
<details> | ||
<summary>$TITLE @$AUTHOR (#$NUMBER)</summary> | ||
$BODY | ||
</details> | ||
template: | | ||
$CHANGES |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
name: auto-release | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
semver: | ||
runs-on: ubuntu-latest | ||
steps: | ||
# Drafts your next Release notes as Pull Requests are merged into "master" | ||
- uses: release-drafter/release-drafter@v5 | ||
with: | ||
publish: true | ||
prerelease: false | ||
config-name: auto-release.yml | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,50 +1,30 @@ | ||
PACKAGE = terraform-github-repository-webhooks | ||
GOEXE ?= /usr/bin/go | ||
GOPATH = $(CURDIR)/.gopath | ||
GOBIN = $(GOPATH)/bin | ||
BASE = $(GOPATH)/src/$(PACKAGE) | ||
PATH := $(PATH):$(GOBIN) | ||
|
||
export TF_DATA_DIR ?= $(CURDIR)/.terraform | ||
export TF_CLI_ARGS_init ?= -get-plugins=true | ||
export GOPATH | ||
export TERRAFORM_VERSION ?= $(shell curl -s https://checkpoint-api.hashicorp.com/v1/check/terraform | jq -r -M '.current_version' | cut -d. -f1-2) | ||
|
||
.DEFAULT_GOAL : all | ||
|
||
.PHONY: all | ||
## Default target | ||
all: test | ||
|
||
ifneq (,$(wildcard /sbin/apk)) | ||
## Install go, if not installed | ||
$(GOEXE): | ||
apk add --update go | ||
endif | ||
|
||
ifeq ($(shell uname -s),Linux) | ||
## Install all `dep`, if not installed | ||
$(GOBIN)/dep: | ||
@mkdir -p $(GOBIN) | ||
@curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh | ||
endif | ||
|
||
## Prepare the GOPATH | ||
$(BASE): $(GOEXE) | ||
@mkdir -p $(dir $@) | ||
@ln -sf $(CURDIR) $@ | ||
|
||
## Download vendor dependencies to vendor/ | ||
$(BASE)/vendor: $(BASE) $(GOBIN)/dep | ||
cd $(BASE) && dep ensure | ||
|
||
.PHONY : init | ||
## Initialize tests | ||
init: $(BASE)/vendor | ||
init: | ||
@exit 0 | ||
|
||
.PHONY : test | ||
## Run tests | ||
test: init | ||
cd $(BASE) && go test -v -timeout 30m -run TestExamplesComplete | ||
go mod download | ||
go test -v -timeout 60m -run TestExamplesComplete | ||
|
||
## Run tests in docker container | ||
docker/test: | ||
docker run --name terratest --rm -it -e AWS_ACCESS_KEY_ID -e AWS_SECRET_ACCESS_KEY -e AWS_SESSION_TOKEN -e GITHUB_TOKEN \ | ||
-e PATH="/usr/local/terraform/$(TERRAFORM_VERSION)/bin:/go/bin:/usr/local/go/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" \ | ||
-v $(CURDIR)/../../:/module/ cloudposse/test-harness:latest -C /module/test/src test | ||
|
||
.PHONY : clean | ||
## Clean up files | ||
clean: | ||
rm -rf .gopath/ vendor/ $(TF_DATA_DIR) | ||
rm -rf ../../examples/complete/*.tfstate* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
module github.com/cloudposse/terraform-github-repository-webhooks | ||
|
||
go 1.13 | ||
|
||
require ( | ||
github.com/aws/aws-sdk-go v1.34.7 // indirect | ||
github.com/davecgh/go-spew v1.1.1 // indirect | ||
github.com/google/uuid v1.1.1 // indirect | ||
github.com/gruntwork-io/terratest v0.16.0 | ||
github.com/pquerna/otp v1.2.0 // indirect | ||
github.com/stretchr/testify v1.5.1 | ||
golang.org/x/crypto v0.0.0-20190513172903-22d7a77e9e5f // indirect | ||
golang.org/x/sys v0.0.0-20190527104216-9cd6430ef91e // indirect | ||
) |
Oops, something went wrong.