Makefile 448 B

1234567891011
  1. version := v$(shell /bin/date "+%y%m%d%H%M%S")
  2. build:
  3. cd $(GOPATH)/src/zero && docker build -t registry.cn-hangzhou.aliyuncs.com/xapp/pub:$(version) . -f example/etcd/pub/Dockerfile
  4. docker image prune --filter label=stage=gobuilder -f
  5. push: build
  6. docker push registry.cn-hangzhou.aliyuncs.com/xapp/pub:$(version)
  7. deploy: push
  8. kubectl -n adhoc set image deployment/pub-deployment pub=registry-vpc.cn-hangzhou.aliyuncs.com/xapp/pub:$(version)