From 65ffb86bea368cbc693d0b75908bf9a0717ca3a2 Mon Sep 17 00:00:00 2001 From: ncabatoff Date: Wed, 22 Apr 2020 15:05:49 -0400 Subject: [PATCH] Use a more minimal bootstrap target when running in CI: just what we need to satisfy our job needs. Also remove govendor which we no longer use. (#8808) --- .circleci/config.yml | 4 ++-- .circleci/config/jobs/build-go-dev.yml | 2 +- Makefile | 21 ++++++++++++++------- 3 files changed, 17 insertions(+), 10 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index c160da9fc6..ecfc8f3952 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -86,7 +86,7 @@ jobs: mkdir ./pkg # Build dev binary - make bootstrap dev + make ci-bootstrap dev name: Build dev binary - persist_to_workspace: paths: @@ -517,7 +517,7 @@ workflows: # mkdir ./pkg # # # Build dev binary -# make bootstrap dev +# make ci-bootstrap dev # name: Build dev binary # - persist_to_workspace: # paths: diff --git a/.circleci/config/jobs/build-go-dev.yml b/.circleci/config/jobs/build-go-dev.yml index 3193d0be6d..5d956f8678 100644 --- a/.circleci/config/jobs/build-go-dev.yml +++ b/.circleci/config/jobs/build-go-dev.yml @@ -12,7 +12,7 @@ steps: mkdir ./pkg # Build dev binary - make bootstrap dev + make ci-bootstrap dev - persist_to_workspace: root: . paths: diff --git a/Makefile b/Makefile index 1304fc82f4..45e017dbee 100644 --- a/Makefile +++ b/Makefile @@ -9,12 +9,12 @@ TEST_TIMEOUT?=45m EXTENDED_TEST_TIMEOUT=60m INTEG_TEST_TIMEOUT=120m VETARGS?=-asmdecl -atomic -bool -buildtags -copylocks -methods -nilfunc -printf -rangeloops -shift -structtags -unsafeptr -EXTERNAL_TOOLS=\ - golang.org/x/tools/cmd/goimports \ +EXTERNAL_TOOLS_CI=\ github.com/elazarl/go-bindata-assetfs/... \ github.com/hashicorp/go-bindata/... \ - github.com/mitchellh/gox \ - github.com/kardianos/govendor \ + github.com/mitchellh/gox +EXTERNAL_TOOLS=\ + golang.org/x/tools/cmd/goimports \ github.com/client9/misspell/cmd/misspell \ github.com/golangci/golangci-lint/cmd/golangci-lint GOFMT_FILES?=$$(find . -name '*.go' | grep -v pb.go | grep -v vendor) @@ -126,8 +126,15 @@ ci-config: ci-verify: @$(MAKE) -C .circleci ci-verify -# bootstrap the build by downloading additional tools -bootstrap: +# bootstrap the build by downloading additional tools needed to build +ci-bootstrap: + @for tool in $(EXTERNAL_TOOLS_CI) ; do \ + echo "Installing/Updating $$tool" ; \ + GO111MODULE=off $(GO_CMD) get -u $$tool; \ + done + +# bootstrap the build by downloading additional tools that may be used by devs +bootstrap: ci-bootstrap @for tool in $(EXTERNAL_TOOLS) ; do \ echo "Installing/Updating $$tool" ; \ GO111MODULE=off $(GO_CMD) get -u $$tool; \ @@ -274,6 +281,6 @@ publish-commit: @[ -n "$(PUBLISH_VERSION)" ] || { echo "You must set PUBLISH_VERSION to the version in semver-like format."; exit 1; } set -x; $(GPG_KEY_VARS) && git commit --allow-empty --gpg-sign=$$GIT_GPG_KEY_ID -m 'release: publish v$(PUBLISH_VERSION)' -.PHONY: bin default prep test vet 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 static-assets ember-dist ember-dist-dev static-dist static-dist-dev assetcheck check-vault-in-path check-browserstack-creds test-ui-browserstack stage-commit publish-commit +.PHONY: bin default prep test vet ci-bootstrap 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 static-assets ember-dist ember-dist-dev static-dist static-dist-dev assetcheck check-vault-in-path check-browserstack-creds test-ui-browserstack stage-commit publish-commit .NOTPARALLEL: ember-dist ember-dist-dev static-assets