Skip to content

Commit 81447b2

Browse files
committed
Prepare to publish provider to the Terraform registry
1 parent 046938b commit 81447b2

File tree

16 files changed

+388
-325
lines changed

16 files changed

+388
-325
lines changed

.circleci/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
name: Run unit tests
2424
command: |
2525
trap "go-junit-report <${TEST_RESULTS}/go-test.out > ${TEST_RESULTS}/go-test-report.xml" EXIT
26-
make test | tee ${TEST_RESULTS}/go-test.out
26+
make testacc | tee ${TEST_RESULTS}/go-test.out
2727
2828
- save_cache:
2929
key: v1-pkg-cache

.gitignore

Lines changed: 32 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,35 @@
1-
# Compiled Object files, Static and Dynamic libs (Shared Objects)
2-
*.o
3-
*.a
4-
*.so
5-
6-
# Folders
7-
_obj
8-
_test
9-
vendor
10-
11-
# Architecture specific extensions/prefixes
12-
*.[568vq]
13-
[568vq].out
1+
*.dll
2+
*.exe
3+
.DS_Store
4+
example.tf
5+
terraform.tfplan
6+
terraform.tfstate
7+
bin/
8+
dist/
9+
modules-dev/
10+
/pkg/
11+
website/.vagrant
12+
website/.bundle
13+
website/build
14+
website/node_modules
15+
.vagrant/
16+
*.backup
17+
./*.tfstate
18+
.terraform/
19+
*.log
20+
*.bak
21+
*~
22+
.*.swp
23+
.idea
24+
*.iml
25+
*.test
26+
*.iml
1427

15-
*.cgo1.go
16-
*.cgo2.c
17-
_cgo_defun.c
18-
_cgo_gotypes.go
19-
_cgo_export.*
28+
website/vendor
2029

21-
_testmain.go
30+
# Test exclusions
31+
!command/test-fixtures/**/*.tfstate
32+
!command/test-fixtures/**/.terraform/
2233

23-
*.exe
24-
*.test
25-
*.prof
34+
# Keep windows files with windows line endings
35+
*.winfile eol=crlf

.goreleaser.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# Visit https://goreleaser.com for documentation on how to customize this
2+
# behavior.
3+
4+
before:
5+
hooks:
6+
- go mod tidy
7+
builds:
8+
- env:
9+
- CGO_ENABLED=0
10+
goos:
11+
- freebsd
12+
- openbsd
13+
- solaris
14+
- windows
15+
- linux
16+
- darwin
17+
goarch:
18+
- amd64
19+
- "386"
20+
- arm
21+
- arm64
22+
ignore:
23+
- goos: darwin
24+
goarch: "386"
25+
- goos: openbsd
26+
goarch: arm
27+
- goos: openbsd
28+
goarch: arm64
29+
binary: "{{ .ProjectName }}_v{{ .Version }}"
30+
archives:
31+
- format: zip
32+
name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}"
33+
checksum:
34+
name_template: "{{ .ProjectName }}_{{ .Version }}_SHA256SUMS"
35+
algorithm: sha256
36+
signs:
37+
- artifacts: checksum
38+
args:
39+
- "--local-user"
40+
- "28C93998EF68D65A"
41+
- "--output"
42+
- "${signature}"
43+
- "--detach-sign"
44+
- "${artifact}"
45+
release:
46+
# Visit your project's GitHub Releases page to publish this release.
47+
draft: true
48+
changelog:
49+
skip: true

Makefile

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
.PHONE: all
2-
all: test
1+
default: testacc
32

43
.PHONY: deps
54
deps:
6-
@go mod download
5+
go mod download
76

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

0 commit comments

Comments
 (0)