From c7b09499a6eb99d632d79edf6bce941200c0412f 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 ad4772458..8ea1d1a37 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 ff7f003a1..f7200067d 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