2017-10-23 16:38:30 +00:00
# Determine this makefile's path.
# Be sure to place this BEFORE `include` directives, if any.
THIS_FILE := $( lastword $( MAKEFILE_LIST) )
2020-01-09 17:35:32 +00:00
TEST ?= $$ ( $( GO_CMD) list ./... | grep -v /vendor/ | grep -v /integ)
2019-07-22 17:11:00 +00:00
TEST_TIMEOUT ?= 45m
EXTENDED_TEST_TIMEOUT = 60m
INTEG_TEST_TIMEOUT = 120m
2015-03-04 07:14:18 +00:00
VETARGS ?= -asmdecl -atomic -bool -buildtags -copylocks -methods -nilfunc -printf -rangeloops -shift -structtags -unsafeptr
2020-04-22 19:05:49 +00:00
EXTERNAL_TOOLS_CI = \
2023-02-07 09:41:04 +00:00
golang.org/x/tools/cmd/goimports \
2023-07-10 15:05:20 +00:00
github.com/golangci/revgrep/cmd/revgrep \
mvdan.cc/gofumpt \
honnef.co/go/tools/cmd/staticcheck
2020-04-29 20:35:13 +00:00
EXTERNAL_TOOLS = \
2020-04-25 00:52:23 +00:00
github.com/client9/misspell/cmd/misspell
2019-12-08 02:01:11 +00:00
GOFMT_FILES ?= $$ ( find . -name '*.go' | grep -v pb.go | grep -v vendor)
Add plugin version to GRPC interface (#17088)
Add plugin version to GRPC interface
Added a version interface in the sdk/logical so that it can be shared between all plugin types, and then wired it up to RunningVersion in the mounts, auth list, and database systems.
I've tested that this works with auth, database, and secrets plugin types, with the following logic to populate RunningVersion:
If a plugin has a PluginVersion() method implemented, then that is used
If not, and the plugin is built into the Vault binary, then the go.mod version is used
Otherwise, the it will be the empty string.
My apologies for the length of this PR.
* Placeholder backend should be external
We use a placeholder backend (previously a framework.Backend) before a
GRPC plugin is lazy-loaded. This makes us later think the plugin is a
builtin plugin.
So we added a `placeholderBackend` type that overrides the
`IsExternal()` method so that later we know that the plugin is external,
and don't give it a default builtin version.
2022-09-15 23:37:59 +00:00
SED ?= $( shell command -v gsed || command -v sed)
2019-12-08 02:01:11 +00:00
2022-11-03 14:04:53 +00:00
GO_VERSION_MIN = $$ ( cat $( CURDIR) /.go-version)
2023-01-24 19:00:27 +00:00
PROTOC_VERSION_MIN = 3.21.12
2020-01-09 17:35:32 +00:00
GO_CMD ?= go
2019-05-22 12:17:55 +00:00
CGO_ENABLED ?= 0
2018-07-16 14:18:09 +00:00
i f n e q ( $( FDB_ENABLED ) , )
CGO_ENABLED = 1
BUILD_TAGS += foundationdb
e n d i f
2017-02-06 01:30:40 +00:00
default : dev
2015-03-04 07:14:18 +00:00
2018-03-20 18:54:10 +00:00
# bin generates the releasable binaries for Vault
2017-10-23 16:38:30 +00:00
bin : prep
2018-07-16 14:18:09 +00:00
@CGO_ENABLED= $( CGO_ENABLED) BUILD_TAGS = '$(BUILD_TAGS) ui' sh -c " ' $( CURDIR) /scripts/build.sh' "
2015-03-04 07:14:18 +00:00
# dev creates binaries for testing Vault locally. These are put
2018-04-09 21:36:05 +00:00
# into ./bin/ as well as $GOPATH/bin
2023-05-02 12:46:13 +00:00
dev : BUILD_TAGS +=testonly
dev : prep
2023-03-21 20:59:40 +00:00
@CGO_ENABLED= $( CGO_ENABLED) BUILD_TAGS = '$(BUILD_TAGS)' VAULT_DEV_BUILD = 1 sh -c " ' $( CURDIR) /scripts/build.sh' "
2023-05-02 12:46:13 +00:00
dev-ui : BUILD_TAGS +=testonly
dev-ui : assetcheck prep
2018-07-16 14:18:09 +00:00
@CGO_ENABLED= $( CGO_ENABLED) BUILD_TAGS = '$(BUILD_TAGS) ui' VAULT_DEV_BUILD = 1 sh -c " ' $( CURDIR) /scripts/build.sh' "
2023-05-02 12:46:13 +00:00
dev-dynamic : BUILD_TAGS +=testonly
dev-dynamic : prep
2016-05-10 03:17:38 +00:00
@CGO_ENABLED= 1 BUILD_TAGS = '$(BUILD_TAGS)' VAULT_DEV_BUILD = 1 sh -c " ' $( CURDIR) /scripts/build.sh' "
2018-10-31 18:11:45 +00:00
# *-mem variants will enable memory profiling which will write snapshots of heap usage
# to $TMP/vaultprof every 5 minutes. These can be analyzed using `$ go tool pprof <profile_file>`.
# Note that any build can have profiling added via: `$ BUILD_TAGS=memprofiler make ...`
dev-mem : BUILD_TAGS +=memprofiler
dev-mem : dev
dev-ui-mem : BUILD_TAGS +=memprofiler
2019-03-25 17:07:14 +00:00
dev-ui-mem : assetcheck dev -ui
2018-10-31 18:11:45 +00:00
dev-dynamic-mem : BUILD_TAGS +=memprofiler
dev-dynamic-mem : dev -dynamic
2020-07-20 18:11:34 +00:00
# Creates a Docker image by adding the compiled linux/amd64 binary found in ./bin.
2020-10-08 18:30:31 +00:00
# The resulting image is tagged "vault:dev".
2023-05-02 12:46:13 +00:00
docker-dev : BUILD_TAGS +=testonly
docker-dev : prep
2021-06-04 15:51:55 +00:00
docker build --build-arg VERSION = $( GO_VERSION_MIN) --build-arg BUILD_TAGS = " $( BUILD_TAGS) " -f scripts/docker/Dockerfile -t vault:dev .
2020-07-20 18:11:34 +00:00
2023-05-02 12:46:13 +00:00
docker-dev-ui : BUILD_TAGS +=testonly
docker-dev-ui : prep
2021-06-04 15:51:55 +00:00
docker build --build-arg VERSION = $( GO_VERSION_MIN) --build-arg BUILD_TAGS = " $( BUILD_TAGS) " -f scripts/docker/Dockerfile.ui -t vault:dev-ui .
2020-07-20 18:11:34 +00:00
2015-03-04 07:14:18 +00:00
# test runs the unit tests and vets the code
2023-05-02 12:46:13 +00:00
test : BUILD_TAGS +=testonly
test : prep
2018-07-16 14:18:09 +00:00
@CGO_ENABLED= $( CGO_ENABLED) \
2017-09-05 03:51:29 +00:00
VAULT_ADDR = \
VAULT_TOKEN = \
VAULT_DEV_ROOT_TOKEN_ID = \
VAULT_ACC = \
2020-01-09 17:35:32 +00:00
$( GO_CMD) test -tags= '$(BUILD_TAGS)' $( TEST) $( TESTARGS) -timeout= $( TEST_TIMEOUT) -parallel= 20
2015-03-04 07:14:18 +00:00
2023-05-02 12:46:13 +00:00
testcompile : BUILD_TAGS +=testonly
testcompile : prep
2017-02-16 20:15:02 +00:00
@for pkg in $( TEST) ; do \
2020-01-09 17:35:32 +00:00
$( GO_CMD) test -v -c -tags= '$(BUILD_TAGS)' $$ pkg -parallel= 4 ; \
2017-02-16 20:15:02 +00:00
done
2015-03-20 16:59:48 +00:00
# testacc runs acceptance tests
2023-05-02 12:46:13 +00:00
testacc : BUILD_TAGS +=testonly
testacc : prep
2015-03-20 16:59:48 +00:00
@if [ " $( TEST) " = "./..." ] ; then \
echo "ERROR: Set TEST to a specific package" ; \
exit 1; \
fi
2020-01-09 17:35:32 +00:00
VAULT_ACC = 1 $( GO_CMD) test -tags= '$(BUILD_TAGS)' $( TEST) -v $( TESTARGS) -timeout= $( EXTENDED_TEST_TIMEOUT)
2015-03-20 16:59:48 +00:00
2015-03-04 07:14:18 +00:00
# testrace runs the race checker
2023-05-02 12:46:13 +00:00
testrace : BUILD_TAGS +=testonly
testrace : prep
2017-09-05 03:51:29 +00:00
@CGO_ENABLED= 1 \
VAULT_ADDR = \
VAULT_TOKEN = \
VAULT_DEV_ROOT_TOKEN_ID = \
VAULT_ACC = \
2020-01-09 17:35:32 +00:00
$( GO_CMD) test -tags= '$(BUILD_TAGS)' -race $( TEST) $( TESTARGS) -timeout= $( EXTENDED_TEST_TIMEOUT) -parallel= 20
2015-03-04 07:14:18 +00:00
cover :
2015-04-29 02:02:46 +00:00
./scripts/coverage.sh --html
2015-03-04 07:14:18 +00:00
# vet runs the Go source code static analysis tool `vet` to find
# any common errors.
vet :
2020-01-09 17:35:32 +00:00
@$( GO_CMD) list -f '{{.Dir}}' ./... | grep -v /vendor/ \
2015-04-28 20:18:55 +00:00
| grep -v '.*github.com/hashicorp/vault$$' \
2020-01-09 17:35:32 +00:00
| xargs $( GO_CMD) vet ; if [ $$ ? -eq 1 ] ; then \
2015-04-28 20:18:55 +00:00
echo "" ; \
echo "Vet found suspicious constructs. Please check the reported constructs" ; \
echo "and fix them if necessary before submitting the code for reviewal." ; \
fi
2015-03-04 07:14:18 +00:00
2023-07-20 22:39:29 +00:00
# deprecations runs staticcheck tool to look for deprecations. Checks entire code to see if it
2023-03-28 05:50:58 +00:00
# has deprecated function, variable, constant or field
2023-07-20 13:07:20 +00:00
deprecations : bootstrap prep
2023-07-10 15:05:20 +00:00
@BUILD_TAGS= '$(BUILD_TAGS)' ./scripts/deprecations-checker.sh ""
2023-03-28 05:50:58 +00:00
# ci-deprecations runs staticcheck tool to look for deprecations. All output gets piped to revgrep
# which will only return an error if changes that is not on main has deprecated function, variable, constant or field
2023-07-20 13:07:20 +00:00
ci-deprecations : ci -bootstrap prep
2023-07-10 15:05:20 +00:00
@BUILD_TAGS= '$(BUILD_TAGS)' ./scripts/deprecations-checker.sh main
2023-03-28 05:50:58 +00:00
2023-07-10 15:05:20 +00:00
tools/codechecker/.bin/codechecker :
@cd tools/codechecker && $( GO_CMD) build -o .bin/codechecker .
2023-02-07 09:41:04 +00:00
2023-07-10 15:05:20 +00:00
# vet-codechecker runs our custom linters on the test functions. All output gets
# piped to revgrep which will only return an error if new piece of code violates
2023-07-20 22:39:29 +00:00
# the check
2023-07-20 13:07:20 +00:00
vet-codechecker : bootstrap tools /codechecker /.bin /codechecker prep
2023-07-10 15:05:20 +00:00
@$( GO_CMD) vet -vettool= ./tools/codechecker/.bin/codechecker -tags= $( BUILD_TAGS) ./... 2>& 1 | revgrep
2023-02-07 09:41:04 +00:00
2023-07-10 15:05:20 +00:00
# vet-codechecker runs our custom linters on the test functions. All output gets
2023-07-20 22:39:29 +00:00
# piped to revgrep which will only return an error if new piece of code that is
# not on main violates the check
2023-07-20 13:07:20 +00:00
ci-vet-codechecker : ci -bootstrap tools /codechecker /.bin /codechecker prep
2023-07-10 15:05:20 +00:00
@$( GO_CMD) vet -vettool= ./tools/codechecker/.bin/codechecker -tags= $( BUILD_TAGS) ./... 2>& 1 | revgrep origin/main
2023-02-07 09:41:04 +00:00
2019-07-22 17:11:00 +00:00
# lint runs vet plus a number of other checkers, it is more comprehensive, but louder
lint :
2020-01-09 17:35:32 +00:00
@$( GO_CMD) list -f '{{.Dir}}' ./... | grep -v /vendor/ \
2019-07-22 17:11:00 +00:00
| xargs golangci-lint run; if [ $$ ? -eq 1 ] ; then \
echo "" ; \
echo "Lint found suspicious constructs. Please check the reported constructs" ; \
echo "and fix them if necessary before submitting the code for reviewal." ; \
fi
# for ci jobs, runs lint against the changed packages in the commit
ci-lint :
@golangci-lint run --deadline 10m --new-from-rev= HEAD~
2017-09-04 23:16:11 +00:00
# prep runs `go generate` to build the dynamically generated
2015-03-04 07:14:18 +00:00
# source files.
2023-07-14 17:30:14 +00:00
#
# n.b.: prep used to depend on fmtcheck, but since fmtcheck is
# now run as a pre-commit hook (and there's little value in
# making every build run the formatter), we've removed that
# dependency.
prep :
2017-10-19 20:30:19 +00:00
@sh -c " ' $( CURDIR) /scripts/goversioncheck.sh' ' $( GO_VERSION_MIN) ' "
2023-07-20 22:39:29 +00:00
@$( GO_CMD) generate $$ ( $( GO_CMD) list ./... | grep -v /vendor/)
2017-10-27 17:11:02 +00:00
@if [ -d .git/hooks ] ; then cp .hooks/* .git/hooks/; fi
2015-03-04 07:14:18 +00:00
2020-04-22 19:05:49 +00:00
# bootstrap the build by downloading additional tools needed to build
2023-07-10 15:05:20 +00:00
ci-bootstrap : .ci -bootstrap
.ci-bootstrap :
2020-04-22 19:05:49 +00:00
@for tool in $( EXTERNAL_TOOLS_CI) ; do \
echo " Installing/Updating $$ tool " ; \
GO111MODULE = off $( GO_CMD) get -u $$ tool; \
done
2023-07-10 15:05:20 +00:00
@touch .ci-bootstrap
2020-04-22 19:05:49 +00:00
# bootstrap the build by downloading additional tools that may be used by devs
bootstrap : ci -bootstrap
2020-05-14 17:45:12 +00:00
go generate -tags tools tools/tools.go
2015-05-31 23:32:36 +00:00
2018-05-30 01:09:57 +00:00
# Note: if you have plugins in GOPATH you can update all of them via something like:
# for i in $(ls | grep vault-plugin-); do cd $i; git remote update; git reset --hard origin/master; dep ensure -update; git add .; git commit; git push; cd ..; done
2018-04-10 06:32:41 +00:00
update-plugins :
2021-06-11 11:49:50 +00:00
grep vault-plugin- go.mod | cut -d ' ' -f 1 | while read -r P; do echo " Updating $P ... " ; go get -v " $P " ; done
2018-04-10 06:32:41 +00:00
2019-12-06 18:58:40 +00:00
static-assets-dir :
2021-08-18 15:05:11 +00:00
@mkdir -p ./http/web_ui
2018-04-03 14:46:45 +00:00
2022-03-08 15:58:28 +00:00
install-ui-dependencies :
2018-04-03 14:46:45 +00:00
@echo "--> Installing JavaScript assets"
2023-05-03 01:36:15 +00:00
@cd ui && yarn
2022-03-08 15:58:28 +00:00
test-ember : install -ui -dependencies
2018-04-03 14:46:45 +00:00
@echo "--> Running ember tests"
2019-12-18 17:12:44 +00:00
@cd ui && yarn run test:oss
2018-04-03 14:46:45 +00:00
2022-03-08 15:58:28 +00:00
test-ember-enos : install -ui -dependencies
@echo "--> Running ember tests with a real backend"
@cd ui && yarn run test:enos
2019-05-24 12:02:51 +00:00
check-vault-in-path :
@VAULT_BIN= $$ ( command -v vault) || { echo "vault command not found" ; exit 1; } ; \
[ -x " $$ VAULT_BIN " ] || { echo " $$ VAULT_BIN not executable " ; exit 1; } ; \
printf " Using Vault at %s:\n\$ $ vault version\n%s\n " " $$ VAULT_BIN " " $$ (vault version) "
2022-03-08 15:58:28 +00:00
ember-dist : install -ui -dependencies
2018-04-03 14:46:45 +00:00
@cd ui && npm rebuild node-sass
@echo "--> Building Ember application"
2018-05-08 15:43:20 +00:00
@cd ui && yarn run build
2018-04-03 14:46:45 +00:00
@rm -rf ui/if-you-need-to-delete-this-open-an-issue-async-disk-cache
2022-03-08 15:58:28 +00:00
ember-dist-dev : install -ui -dependencies
2018-06-25 20:30:11 +00:00
@cd ui && npm rebuild node-sass
@echo "--> Building Ember application"
2021-06-11 15:36:44 +00:00
@cd ui && yarn run build:dev
2018-06-25 20:30:11 +00:00
2022-03-10 12:59:30 +00:00
static-dist : ember -dist
static-dist-dev : ember -dist -dev
2018-04-03 14:46:45 +00:00
2021-09-30 01:25:15 +00:00
proto : bootstrap
2022-09-14 02:46:35 +00:00
@sh -c " ' $( CURDIR) /scripts/protocversioncheck.sh' ' $( PROTOC_VERSION_MIN) ' "
2021-09-30 01:25:15 +00:00
protoc --go_out= . --go_opt= paths = source_relative --go-grpc_out= . --go-grpc_opt= paths = source_relative vault/*.proto
protoc --go_out= . --go_opt= paths = source_relative --go-grpc_out= . --go-grpc_opt= paths = source_relative vault/activity/activity_log.proto
2023-04-12 16:26:26 +00:00
protoc --go_out= . --go_opt= paths = source_relative --go-grpc_out= . --go-grpc_opt= paths = source_relative vault/activity/generation/generate_data.proto
2021-09-30 01:25:15 +00:00
protoc --go_out= . --go_opt= paths = source_relative --go-grpc_out= . --go-grpc_opt= paths = source_relative helper/storagepacker/types.proto
protoc --go_out= . --go_opt= paths = source_relative --go-grpc_out= . --go-grpc_opt= paths = source_relative helper/forwarding/types.proto
protoc --go_out= . --go_opt= paths = source_relative --go-grpc_out= . --go-grpc_opt= paths = source_relative sdk/logical/*.proto
protoc --go_out= . --go_opt= paths = source_relative --go-grpc_out= . --go-grpc_opt= paths = source_relative physical/raft/types.proto
protoc --go_out= . --go_opt= paths = source_relative --go-grpc_out= . --go-grpc_opt= paths = source_relative helper/identity/mfa/types.proto
protoc --go_out= . --go_opt= paths = source_relative --go-grpc_out= . --go-grpc_opt= paths = source_relative helper/identity/types.proto
protoc --go_out= . --go_opt= paths = source_relative --go-grpc_out= . --go-grpc_opt= paths = source_relative sdk/database/dbplugin/*.proto
protoc --go_out= . --go_opt= paths = source_relative --go-grpc_out= . --go-grpc_opt= paths = source_relative sdk/database/dbplugin/v5/proto/*.proto
protoc --go_out= . --go_opt= paths = source_relative --go-grpc_out= . --go-grpc_opt= paths = source_relative sdk/plugin/pb/*.proto
2022-02-17 19:43:07 +00:00
protoc --go_out= . --go_opt= paths = source_relative --go-grpc_out= . --go-grpc_opt= paths = source_relative vault/tokens/token.proto
2022-02-17 14:50:33 +00:00
protoc --go_out= . --go_opt= paths = source_relative --go-grpc_out= . --go-grpc_opt= paths = source_relative sdk/helper/pluginutil/*.proto
2022-12-09 16:57:35 +00:00
protoc --go_out= . --go_opt= paths = source_relative --go-grpc_out= . --go-grpc_opt= paths = source_relative vault/hcp_link/proto/*/*.proto
2021-09-30 01:25:15 +00:00
# No additional sed expressions should be added to this list. Going forward
# we should just use the variable names choosen by protobuf. These are left
# here for backwards compatability, namely for SDK compilation.
2023-03-15 16:00:52 +00:00
$( SED) -i -e 's/Id/ID/' -e 's/SPDX-License-IDentifier/SPDX-License-Identifier/' vault/request_forwarding_service.pb.go
$( SED) -i -e 's/Idp/IDP/' -e 's/Url/URL/' -e 's/Id/ID/' -e 's/IDentity/Identity/' -e 's/EntityId/EntityID/' -e 's/Api/API/' -e 's/Qr/QR/' -e 's/Totp/TOTP/' -e 's/Mfa/MFA/' -e 's/Pingid/PingID/' -e 's/namespaceId/namespaceID/' -e 's/Ttl/TTL/' -e 's/BoundCidrs/BoundCIDRs/' -e 's/SPDX-License-IDentifier/SPDX-License-Identifier/' helper/identity/types.pb.go helper/identity/mfa/types.pb.go helper/storagepacker/types.pb.go sdk/plugin/pb/backend.pb.go sdk/logical/identity.pb.go vault/activity/activity_log.pb.go
2021-09-30 01:25:15 +00:00
# This will inject the sentinel struct tags as decorated in the proto files.
protoc-go-inject-tag -input= ./helper/identity/types.pb.go
protoc-go-inject-tag -input= ./helper/identity/mfa/types.pb.go
2016-10-20 16:39:19 +00:00
2017-05-19 12:34:17 +00:00
fmtcheck :
2023-07-10 17:07:30 +00:00
@sh -c " ' $( CURDIR) /scripts/gofmtcheck.sh' "
2017-05-19 12:34:17 +00:00
2023-07-10 15:05:20 +00:00
fmt : ci -bootstrap
2023-03-09 18:46:54 +00:00
find . -name '*.go' | grep -v pb.go | grep -v vendor | xargs go run mvdan.cc/gofumpt -w
2017-05-19 12:34:17 +00:00
2022-07-20 17:44:41 +00:00
semgrep :
2022-03-18 18:14:03 +00:00
semgrep --include '*.go' --exclude 'vendor' -a -f tools/semgrep .
2022-07-20 17:44:41 +00:00
semgrep-ci :
2022-03-18 18:14:03 +00:00
semgrep --error --include '*.go' --exclude 'vendor' -f tools/semgrep/ci .
2019-03-25 17:07:14 +00:00
assetcheck :
@echo "==> Checking compiled UI assets..."
@sh -c " ' $( CURDIR) /scripts/assetcheck.sh' "
2017-10-19 16:55:39 +00:00
spellcheck :
@echo "==> Spell checking website..."
@misspell -error -source= text website/source
2017-08-11 01:28:18 +00:00
mysql-database-plugin :
2020-01-09 17:35:32 +00:00
@CGO_ENABLED= 0 $( GO_CMD) build -o bin/mysql-database-plugin ./plugins/database/mysql/mysql-database-plugin
2017-08-11 01:28:18 +00:00
mysql-legacy-database-plugin :
2020-01-09 17:35:32 +00:00
@CGO_ENABLED= 0 $( GO_CMD) build -o bin/mysql-legacy-database-plugin ./plugins/database/mysql/mysql-legacy-database-plugin
2017-08-11 01:28:18 +00:00
cassandra-database-plugin :
2020-01-09 17:35:32 +00:00
@CGO_ENABLED= 0 $( GO_CMD) build -o bin/cassandra-database-plugin ./plugins/database/cassandra/cassandra-database-plugin
2017-08-11 01:28:18 +00:00
2019-01-18 01:14:57 +00:00
influxdb-database-plugin :
2020-01-09 17:35:32 +00:00
@CGO_ENABLED= 0 $( GO_CMD) build -o bin/influxdb-database-plugin ./plugins/database/influxdb/influxdb-database-plugin
2019-01-18 01:14:57 +00:00
2017-08-11 01:28:18 +00:00
postgresql-database-plugin :
2020-01-09 17:35:32 +00:00
@CGO_ENABLED= 0 $( GO_CMD) build -o bin/postgresql-database-plugin ./plugins/database/postgresql/postgresql-database-plugin
2017-08-11 01:28:18 +00:00
mssql-database-plugin :
2020-01-09 17:35:32 +00:00
@CGO_ENABLED= 0 $( GO_CMD) build -o bin/mssql-database-plugin ./plugins/database/mssql/mssql-database-plugin
2017-08-11 01:28:18 +00:00
hana-database-plugin :
2020-01-09 17:35:32 +00:00
@CGO_ENABLED= 0 $( GO_CMD) build -o bin/hana-database-plugin ./plugins/database/hana/hana-database-plugin
2017-08-11 01:28:18 +00:00
mongodb-database-plugin :
2020-01-09 17:35:32 +00:00
@CGO_ENABLED= 0 $( GO_CMD) build -o bin/mongodb-database-plugin ./plugins/database/mongodb/mongodb-database-plugin
2017-08-11 01:28:18 +00:00
2023-02-07 09:41:04 +00:00
.PHONY : bin default prep test vet bootstrap ci -bootstrap fmt fmtcheck mysql -database -plugin mysql -legacy -database -plugin cassandra -database -plugin influxdb -database -plugin postgresql -database -plugin mssql -database -plugin hana -database -plugin mongodb -database -plugin ember -dist ember -dist -dev static -dist static -dist -dev assetcheck check -vault -in -path packages build build -ci semgrep semgrep -ci vet -godoctests ci -vet -godoctests
2019-01-17 23:19:54 +00:00
2021-08-18 15:05:11 +00:00
.NOTPARALLEL : ember -dist ember -dist -dev
2020-09-28 12:53:39 +00:00
2022-12-12 20:46:04 +00:00
# These ci targets are used for used for building and testing in Github Actions
# workflows and for Enos scenarios.
.PHONY : ci -build
ci-build :
@$( CURDIR) /scripts/ci-helper.sh build
.PHONY : ci -build -ui
ci-build-ui :
@$( CURDIR) /scripts/ci-helper.sh build-ui
.PHONY : ci -bundle
ci-bundle :
@$( CURDIR) /scripts/ci-helper.sh bundle
.PHONY : ci -filter -matrix
ci-filter-matrix :
@$( CURDIR) /scripts/ci-helper.sh matrix-filter-file
.PHONY : ci -get -artifact -basename
ci-get-artifact-basename :
@$( CURDIR) /scripts/ci-helper.sh artifact-basename
.PHONY : ci -get -date
ci-get-date :
@$( CURDIR) /scripts/ci-helper.sh date
.PHONY : ci -get -matrix -group -id
ci-get-matrix-group-id :
@$( CURDIR) /scripts/ci-helper.sh matrix-group-id
.PHONY : ci -get -revision
ci-get-revision :
@$( CURDIR) /scripts/ci-helper.sh revision
.PHONY : ci -get -version
ci-get-version :
@$( CURDIR) /scripts/ci-helper.sh version
.PHONY : ci -get -version -base
ci-get-version-base :
@$( CURDIR) /scripts/ci-helper.sh version-base
.PHONY : ci -get -version -major
ci-get-version-major :
@$( CURDIR) /scripts/ci-helper.sh version-major
.PHONY : ci -get -version -meta
ci-get-version-meta :
@$( CURDIR) /scripts/ci-helper.sh version-meta
.PHONY : ci -get -version -minor
ci-get-version-minor :
@$( CURDIR) /scripts/ci-helper.sh version-minor
.PHONY : ci -get -version -package
ci-get-version-package :
@$( CURDIR) /scripts/ci-helper.sh version-package
.PHONY : ci -get -version -patch
ci-get-version-patch :
@$( CURDIR) /scripts/ci-helper.sh version-patch
.PHONY : ci -get -version -pre
ci-get-version-pre :
@$( CURDIR) /scripts/ci-helper.sh version-pre
.PHONY : ci -prepare -legal
ci-prepare-legal :
@$( CURDIR) /scripts/ci-helper.sh prepare-legal