-
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.
Merge pull request #1 from joemiller/gcp-cloud-hsm-mvp
initial working implementation of Google Cloud KMS signing key support
- Loading branch information
Showing
20 changed files
with
1,467 additions
and
142 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,110 @@ | ||
version: 2 | ||
jobs: | ||
deps: | ||
docker: | ||
- image: circleci/golang:1.11 | ||
working_directory: ~/app | ||
steps: | ||
- checkout | ||
- restore_cache: | ||
keys: | ||
- v1-dependencies-{{ checksum "go.sum" }} | ||
- run: go get -v | ||
- save_cache: | ||
key: v1-dependencies-{{ checksum "go.sum" }} | ||
paths: | ||
- /go/pkg/mod | ||
- persist_to_workspace: | ||
root: . | ||
paths: | ||
- ./ | ||
|
||
test-unit: | ||
docker: | ||
- image: circleci/golang:1.11 | ||
working_directory: ~/app | ||
steps: | ||
- attach_workspace: | ||
at: . | ||
- restore_cache: | ||
keys: | ||
- v1-dependencies-{{ checksum "go.sum" }} | ||
- run: make test | ||
|
||
test-acceptance: | ||
docker: | ||
- image: circleci/golang:1.11 | ||
working_directory: ~/app | ||
steps: | ||
- attach_workspace: | ||
at: . | ||
- restore_cache: | ||
keys: | ||
- v1-dependencies-{{ checksum "go.sum" }} | ||
- run: echo "$GOOGLE_SERVICE_ACCOUNT_CREDS" | base64 --decode >/tmp/svc-account.json | ||
- run: | ||
command: make test | ||
environment: | ||
VAULT_ACC: "1" | ||
TEST_GOOGLE_CREDENTIALS_FILE: /tmp/svc-account.json | ||
|
||
build: | ||
docker: | ||
- image: circleci/golang:1.11 | ||
working_directory: ~/app | ||
steps: | ||
- attach_workspace: | ||
at: . | ||
- restore_cache: | ||
keys: | ||
- v1-dependencies-{{ checksum "go.sum" }} | ||
- run: make build | ||
- persist_to_workspace: | ||
root: . | ||
paths: | ||
- ./ | ||
|
||
release: | ||
docker: | ||
- image: circleci/golang:1.11 | ||
working_directory: ~/app | ||
steps: | ||
- attach_workspace: | ||
at: . | ||
- restore_cache: | ||
keys: | ||
- v1-dependencies-{{ checksum "go.sum" }} | ||
- run: | | ||
curl -s https://api.github.com/repos/pantheon-systems/autotag/releases/latest | \ | ||
grep browser_download | \ | ||
grep -i linux | \ | ||
cut -d '"' -f 4 | \ | ||
xargs curl -o ~/autotag -L \ | ||
&& chmod 755 ~/autotag | ||
- run: ~/autotag | ||
- run: curl -sL https://git.io/goreleaser | bash -s -- --parallelism=2 | ||
|
||
workflows: | ||
version: 2 | ||
primary: | ||
jobs: | ||
- deps | ||
- test-unit: | ||
requires: | ||
- deps | ||
- test-acceptance: | ||
requires: | ||
- deps | ||
- build: | ||
requires: | ||
- deps | ||
- release: | ||
requires: | ||
- test-unit | ||
- test-acceptance | ||
- build | ||
filters: | ||
branches: | ||
only: | ||
- master | ||
- gcp-cloud-hsm-mvp |
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,12 @@ | ||
bin/ | ||
*.pem | ||
*.crt | ||
*.key | ||
.envrc | ||
tmp-intermediate | ||
tmp-rootca | ||
Attic | ||
dist/ | ||
.vscode/ | ||
test-svcaccount.json | ||
.env |
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,43 @@ | ||
builds: | ||
- env: | ||
- CGO_ENABLED=0 | ||
ldflags: | ||
# Default is `-s -w -X main.version={{.Version}} -X main.commit={{.Commit}} -X main.date={{.Date}}`. | ||
- -s -w | ||
goos: | ||
- linux | ||
- darwin | ||
- windows | ||
# - freebsd | ||
# - openbsd | ||
# - dragonfly | ||
# - netbsd | ||
goarch: | ||
# - 386 | ||
- amd64 | ||
# - arm | ||
# - arm64 | ||
ignore: | ||
- goos: darwin | ||
goarch: 386 | ||
- goos: windows | ||
goarch: 386 | ||
archive: | ||
replacements: | ||
386: i386 | ||
format_overrides: | ||
- goos: windows | ||
format: zip | ||
|
||
checksum: | ||
name_template: 'checksums.txt' | ||
|
||
snapshot: | ||
name_template: "{{ .Tag }}-next" | ||
|
||
changelog: | ||
sort: asc | ||
filters: | ||
exclude: | ||
- '^docs:' | ||
- '^test:' |
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,14 +1,22 @@ | ||
APP := vault-cloud-kms-pki | ||
APP := vault-gcp-cloud-kms-pki | ||
|
||
test: | ||
@go test -v ./... | ||
|
||
build: | ||
@CGO_ENABLED=0 go build -o bin/$(APP) | ||
|
||
build-debug: | ||
@go build -a -gcflags='-N -l' -o bin/$(APP) | ||
|
||
build-linux: | ||
@GOOS=linux GOOARCH=amd64 CGO_ENABLED=0 go build -o bin/$(APP) | ||
|
||
release-snapshot: | ||
@rm -rf ./dist | ||
@goreleaser --snapshot | ||
|
||
run-dev: build | ||
sh ./run-dev.sh | ||
|
||
.PHONY: all test build build-linux | ||
.PHONY: all test build build-linux release-snapshot |
Oops, something went wrong.