Skip to content

Commit

Permalink
Making sure the vendor and istio toml and lock stay in sync (#3697)
Browse files Browse the repository at this point in the history
* Making sure the vendor and istio toml and lock stay in sync

for #3679

* Update depupdate

To check consistency of master first, then attempt an update
  • Loading branch information
ldemailly committed Feb 22, 2018
1 parent 1a9b31a commit 2cb09cd
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 11 deletions.
17 changes: 7 additions & 10 deletions .circleci/config.yml
Expand Up @@ -266,26 +266,23 @@ jobs:
- store_artifacts:
path: /home/circleci/logs

# Run nightly, to verify 'dep update' works and prime the cache
# Run nightly, to verify 'dep update' works
depupdate:
<<: *defaults
steps:
- checkout
- run: make submodule-sync
- run: make depend.update init
- run: make build
- run: make depend.status # check before any change
- run: make depend.update
- run: ( cd vendor ; git status ) # just to see what changes
- run: make init build
- run:
name: Status and artifacts
command: |
mkdir -p $/go/out
make depend.status
tar cfz /go/out/istio-vendor.tgz vendor
- store_artifacts:
path: /go/out/istio-vendor.tgz
command: make depend.status
- store_artifacts:
path: vendor/Gopkg.lock
- store_artifacts:
path: vendor/dep.dot
path: /go/out/dep.dot
# TODO: auto-commit Gopkg.lock if test is successful

# Runs first, will download any dependencies - currently envoy, and do any work
Expand Down
10 changes: 9 additions & 1 deletion Makefile
Expand Up @@ -164,7 +164,7 @@ ${ISTIO_BIN}/have_go_$(GO_VERSION_REQUIRED):

# Downloads envoy, based on the SHA defined in the base pilot Dockerfile
# Will also check vendor, based on Gopkg.lock
init: submodule check-go-version $(ISTIO_OUT)/istio_is_init
init: submodule vendor.check check-go-version $(ISTIO_OUT)/istio_is_init

# Marker for whether vendor submodule is here or not already
GRPC_DIR:=./vendor/google.golang.org/grpc
Expand Down Expand Up @@ -231,6 +231,14 @@ depend.update:
cp Gopkg.* vendor/
@echo "now check the diff in vendor/ and make a PR"

vendor.check:
@echo "Checking that Gopkg.* are in sync with vendor/ submodule:"
@echo "if this fails, 'make pull' and/or seek on-call help"
diff Gopkg.toml vendor/
diff Gopkg.lock vendor/

.PHONY: vendor.check

${GEN_CERT}:
unset GOOS && unset GOARCH && CGO_ENABLED=1 bin/gobuild.sh $@ istio.io/istio/pkg/version ./security/cmd/generate_cert

Expand Down

0 comments on commit 2cb09cd

Please sign in to comment.