From a318ca38cf70dd5b0c5cbad339a9e2c1dce8427d Mon Sep 17 00:00:00 2001 From: Daniel Nephin Date: Wed, 21 Jul 2021 18:39:07 -0400 Subject: [PATCH] Update CI config and Makefile for vendor removal Now that vendor is removed our CI can check that 'go mod tidy' makes no changes, instad of checking vendor/modules.txt --- .circleci/config.yml | 18 ++++++++---------- GNUmakefile | 8 -------- 2 files changed, 8 insertions(+), 18 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index ad47724587..8ea1d1a370 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -150,16 +150,14 @@ jobs: command: *lintcmd - run: *notify-slack-failure - # checks vendor directory is correct - check-vendor: + check-go-mod: docker: - image: *GOLANG_IMAGE environment: <<: *ENVIRONMENT steps: - checkout - - run: - command: make update-vendor + - run: go mod tidy - run: | if [[ -n $(git status -s) ]]; then echo "Git directory has changes" @@ -989,7 +987,7 @@ workflows: go-tests: unless: << pipeline.parameters.trigger-load-test >> jobs: - - check-vendor: &filter-ignore-non-go-branches + - check-go-mod: &filter-ignore-non-go-branches filters: branches: ignore: @@ -1032,12 +1030,12 @@ workflows: build-distros: unless: << pipeline.parameters.trigger-load-test >> jobs: - - check-vendor: *filter-ignore-non-go-branches - - build-386: &require-check-vendor + - check-go-mod: *filter-ignore-non-go-branches + - build-386: &require-check-go-mod requires: - - check-vendor - - build-amd64: *require-check-vendor - - build-arm: *require-check-vendor + - check-go-mod + - build-amd64: *require-check-go-mod + - build-arm: *require-check-go-mod # every commit on main will have a rebuilt UI - frontend-cache: filters: diff --git a/GNUmakefile b/GNUmakefile index ff7f003a18..f7200067d4 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -199,14 +199,6 @@ go-mod-tidy: @cd api && go mod tidy @go mod tidy -update-vendor: go-mod-tidy - @echo "--> Running go mod vendor" - @go mod vendor - @echo "--> Removing vendoring of our own nested modules" - @rm -rf vendor/github.com/hashicorp/consul - @grep -v "hashicorp/consul/" < vendor/modules.txt > vendor/modules.txt.new - @mv vendor/modules.txt.new vendor/modules.txt - test-internal: @echo "--> Running go test" @rm -f test.log exit-code