Skip to content

Commit

Permalink
Prepare to publish provider to the Terraform registry
Browse files Browse the repository at this point in the history
  • Loading branch information
jianyuan committed Jun 12, 2020
1 parent 046938b commit 81447b2
Show file tree
Hide file tree
Showing 16 changed files with 388 additions and 325 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
name: Run unit tests
command: |
trap "go-junit-report <${TEST_RESULTS}/go-test.out > ${TEST_RESULTS}/go-test-report.xml" EXIT
make test | tee ${TEST_RESULTS}/go-test.out
make testacc | tee ${TEST_RESULTS}/go-test.out
- save_cache:
key: v1-pkg-cache
Expand Down
54 changes: 32 additions & 22 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,25 +1,35 @@
# Compiled Object files, Static and Dynamic libs (Shared Objects)
*.o
*.a
*.so

# Folders
_obj
_test
vendor

# Architecture specific extensions/prefixes
*.[568vq]
[568vq].out
*.dll
*.exe
.DS_Store
example.tf
terraform.tfplan
terraform.tfstate
bin/
dist/
modules-dev/
/pkg/
website/.vagrant
website/.bundle
website/build
website/node_modules
.vagrant/
*.backup
./*.tfstate
.terraform/
*.log
*.bak
*~
.*.swp
.idea
*.iml
*.test
*.iml

*.cgo1.go
*.cgo2.c
_cgo_defun.c
_cgo_gotypes.go
_cgo_export.*
website/vendor

_testmain.go
# Test exclusions
!command/test-fixtures/**/*.tfstate
!command/test-fixtures/**/.terraform/

*.exe
*.test
*.prof
# Keep windows files with windows line endings
*.winfile eol=crlf
49 changes: 49 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# Visit https://goreleaser.com for documentation on how to customize this
# behavior.

before:
hooks:
- go mod tidy
builds:
- env:
- CGO_ENABLED=0
goos:
- freebsd
- openbsd
- solaris
- windows
- linux
- darwin
goarch:
- amd64
- "386"
- arm
- arm64
ignore:
- goos: darwin
goarch: "386"
- goos: openbsd
goarch: arm
- goos: openbsd
goarch: arm64
binary: "{{ .ProjectName }}_v{{ .Version }}"
archives:
- format: zip
name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}"
checksum:
name_template: "{{ .ProjectName }}_{{ .Version }}_SHA256SUMS"
algorithm: sha256
signs:
- artifacts: checksum
args:
- "--local-user"
- "28C93998EF68D65A"
- "--output"
- "${signature}"
- "--detach-sign"
- "${artifact}"
release:
# Visit your project's GitHub Releases page to publish this release.
draft: true
changelog:
skip: true
12 changes: 6 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
.PHONE: all
all: test
default: testacc

.PHONY: deps
deps:
@go mod download
go mod download

.PHONY: test
test:
@TF_ACC=1 go test -race -v ./...
# Run acceptance tests
.PHONY: testacc
testacc:
TF_ACC=1 go test ./... -v $(TESTARGS) -timeout 120m
Loading

0 comments on commit 81447b2

Please sign in to comment.