-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Upgrades dependencies, adds environment bootstrap (#65)
- Loading branch information
1 parent
cc5a459
commit 58b3caa
Showing
23 changed files
with
692 additions
and
481 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 |
---|---|---|
@@ -1,20 +1,15 @@ | ||
# Overview | ||
A high level description of the contribution, including: | ||
Who the change affects or is for (stakeholders)? | ||
What is the change? | ||
What is the change? | ||
Why is the change needed? | ||
How does this change affect the user experience (if at all)? | ||
|
||
# Design of Change | ||
How was this change implemented? | ||
|
||
# Related Issues/Pull Requests | ||
[ ] [Issue #1234](https://github.com/hashicorp/vault/issues/1234) | ||
[ ] [PR #1234](https://github.com/hashicorp/vault/pr/1234) | ||
- [ ] [Issue #1234](https://github.com/hashicorp/vault/issues/1234) | ||
- [ ] [PR #1234](https://github.com/hashicorp/vault/pr/1234) | ||
|
||
# Contributor Checklist | ||
[ ] Add relevant docs to upstream Vault repository, or sufficient reasoning why docs won’t be added yet | ||
[My Docs PR Link](link) | ||
[Example](https://github.com/hashicorp/vault/commit/2715f5cec982aabc7b7a6ae878c547f6f475bba6) | ||
[ ] Add output for any tests not ran in CI to the PR description (eg, acceptance tests) | ||
[ ] Backwards compatible | ||
- [ ] Add relevant docs to upstream Vault repository, or sufficient reasoning why docs won’t be added yet | ||
- [ ] Add output for any tests not ran in CI to the PR description (eg, acceptance tests) | ||
- [ ] Backwards compatible |
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,8 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: "gomod" | ||
directory: "/" # Location of package manifests | ||
schedule: | ||
interval: "monthly" | ||
reviewers: | ||
- "hashicorp/vault-ecosystem" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
1.17.12 | ||
1.19.2 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
## Unreleased | ||
|
||
FEATURES: | ||
|
||
* Adds support for Virtual Machine Scale Set Flex Authentication [GH-63](https://github.com/hashicorp/vault-plugin-auth-azure/pull/63) | ||
|
||
IMPROVEMENTS: | ||
|
||
* Updates dependencies [[GH-65](https://github.com/hashicorp/vault-plugin-auth-azure/pull/65)] | ||
* `github.com/Azure/azure-sdk-for-go v67.0.0+incompatible` | ||
* `github.com/Azure/go-autorest/autorest v0.11.28` | ||
* `github.com/hashicorp/go-hclog v1.3.1` | ||
* `github.com/hashicorp/vault/api v1.8.2` | ||
* `github.com/hashicorp/vault/api v1.8.2` | ||
* `github.com/hashicorp/vault/sdk v0.6.1` | ||
* `golang.org/x/oauth2 v0.1.0` | ||
* Upgrades to Go 1.19 [[GH-65](https://github.com/hashicorp/vault-plugin-auth-azure/pull/65)] |
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,54 +1,54 @@ | ||
TOOL?=vault-plugin-auth-azure | ||
TEST?=$$(go list ./...) | ||
EXTERNAL_TOOLS= | ||
BUILD_TAGS?=${TOOL} | ||
GOFMT_FILES?=$$(find . -name '*.go' | grep -v vendor) | ||
|
||
# bin generates the releaseable binaries for this plugin | ||
bin: generate | ||
REPO_DIR := $(shell basename $(CURDIR)) | ||
PLUGIN_NAME := $(shell command ls cmd/) | ||
PLUGIN_DIR ?= $$GOPATH/vault-plugins | ||
PLUGIN_PATH ?= local-auth-azure | ||
|
||
# bin generates the releasable binaries for this plugin | ||
.PHONY: bin | ||
bin: | ||
@CGO_ENABLED=0 BUILD_TAGS='$(BUILD_TAGS)' sh -c "'$(CURDIR)/scripts/build.sh'" | ||
|
||
.PHONY: default | ||
default: dev | ||
|
||
# dev creates binaries for testing Vault locally. These are put | ||
# into ./bin/ as well as $GOPATH/bin, except for quickdev which | ||
# is only put into /bin/ | ||
quickdev: generate | ||
@CGO_ENABLED=0 go build -i -tags='$(BUILD_TAGS)' -o bin/${TOOL} | ||
dev: generate | ||
.PHONY: dev | ||
dev: | ||
@CGO_ENABLED=0 BUILD_TAGS='$(BUILD_TAGS)' VAULT_DEV_BUILD=1 sh -c "'$(CURDIR)/scripts/build.sh'" | ||
|
||
testcompile: generate | ||
@for pkg in $(TEST) ; do \ | ||
go test -v -c -tags='$(BUILD_TAGS)' $$pkg -parallel=4 ; \ | ||
done | ||
|
||
# test runs all tests | ||
test: generate | ||
@if [ "$(TEST)" = "./..." ]; then \ | ||
echo "ERROR: Set TEST to a specific package"; \ | ||
exit 1; \ | ||
.PHONY: bootstrap | ||
bootstrap: | ||
@echo "Downloading tools ..." | ||
@go generate -tags tools tools/tools.go | ||
@if [ "$(PLUGIN_NAME)" != "$(REPO_DIR)" ]; then \ | ||
echo "Renaming cmd/$(PLUGIN_NAME) to cmd/$(REPO_DIR) ..."; \ | ||
mv cmd/$(PLUGIN_NAME) to cmd/$(REPO_DIR); \ | ||
echo "Renaming Go module to github.com/hashicorp/$(REPO_DIR) ..."; \ | ||
go mod edit -module github.com/hashicorp/$(REPO_DIR); \ | ||
fi | ||
VAULT_ACC=1 go test -tags='$(BUILD_TAGS)' $(TEST) -v $(TESTARGS) -timeout 10m | ||
|
||
# generate runs `go generate` to build the dynamically generated | ||
# source files. | ||
generate: | ||
@go generate $(go list ./...) | ||
.PHONY: test | ||
test: fmtcheck | ||
CGO_ENABLED=0 go test ./... $(TESTARGS) -timeout=20m | ||
|
||
# bootstrap the build by downloading additional tools | ||
bootstrap: | ||
@for tool in $(EXTERNAL_TOOLS) ; do \ | ||
echo "Installing/Updating $$tool" ; \ | ||
go install $$tool@latest; \ | ||
done | ||
.PHONY: fmtcheck | ||
fmtcheck: | ||
@sh -c "'$(CURDIR)/scripts/gofmtcheck.sh'" | ||
|
||
.PHONY: fmt | ||
fmt: | ||
gofmt -w $(GOFMT_FILES) | ||
|
||
# deps updates all dependencies for this project. | ||
deps: | ||
@echo "==> Updating deps for ${TOOL}" | ||
@dep ensure -update | ||
|
||
.PHONY: bin default generate test bootstrap fmt deps | ||
gofumpt -l -w . | ||
|
||
.PHONY: setup-env | ||
setup-env: | ||
cd bootstrap/terraform && terraform init && terraform apply -auto-approve | ||
|
||
.PHONY: teardown-env | ||
teardown-env: | ||
cd bootstrap/terraform && terraform init && terraform destroy -auto-approve | ||
|
||
.PHONY: configure | ||
configure: dev | ||
@./bootstrap/configure.sh \ | ||
$(PLUGIN_DIR) \ | ||
$(PLUGIN_NAME) \ | ||
$(PLUGIN_PATH) |
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
Oops, something went wrong.