golang.org/x/build@v0.0.0-20240506185731-218518f32b70/influx/Makefile (about) 1 # Copyright 2022 The Go Authors. All rights reserved. 2 # Use of this source code is governed by a BSD-style 3 # license that can be found in the LICENSE file. 4 5 MUTABLE_VERSION ?= latest 6 VERSION ?= $(shell git rev-parse --short HEAD) 7 8 IMAGE_STAGING := gcr.io/go-dashboard-dev/influx 9 IMAGE_PROD := gcr.io/symbolic-datum-552/influx 10 11 docker-prod: 12 docker build --force-rm -f Dockerfile --tag=$(IMAGE_PROD):$(VERSION) .. 13 docker tag $(IMAGE_PROD):$(VERSION) $(IMAGE_PROD):$(MUTABLE_VERSION) 14 docker-staging: 15 docker build --force-rm -f Dockerfile --tag=$(IMAGE_STAGING):$(VERSION) .. 16 docker tag $(IMAGE_STAGING):$(VERSION) $(IMAGE_STAGING):$(MUTABLE_VERSION) 17 18 push-prod: docker-prod 19 docker push $(IMAGE_PROD):$(MUTABLE_VERSION) 20 docker push $(IMAGE_PROD):$(VERSION) 21 push-staging: docker-staging 22 docker push $(IMAGE_STAGING):$(MUTABLE_VERSION) 23 docker push $(IMAGE_STAGING):$(VERSION) 24 25 deploy-prod: push-prod 26 go install golang.org/x/build/cmd/xb 27 xb --prod kubectl --namespace prod set image deployment/influx-deployment influx=$(IMAGE_PROD):$(VERSION) 28 deploy-staging: push-staging 29 go install golang.org/x/build/cmd/xb 30 xb --staging kubectl set image deployment/influx-deployment influx=$(IMAGE_STAGING):$(VERSION)