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
This commit is contained in:
parent
9ad9112b8a
commit
c7b09499a6
|
@ -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:
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue