golang.org/x/build@v0.0.0-20240506185731-218518f32b70/cmd/gitmirror/Makefile (about) 1 # Copyright 2014 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/gitmirror 9 IMAGE_PROD := gcr.io/symbolic-datum-552/gitmirror 10 11 docker-prod: 12 docker build -f Dockerfile --force-rm --tag=$(IMAGE_PROD):$(VERSION) ../.. 13 docker tag $(IMAGE_PROD):$(VERSION) $(IMAGE_PROD):$(MUTABLE_VERSION) 14 docker-staging: 15 docker build -f Dockerfile --force-rm --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 kubectl set image --namespace=prod deployment/gitmirror-serving-deployment gitmirror=$(IMAGE_PROD):$(VERSION) 27 kubectl set image --namespace=prod deployment/gitmirror-mirroring-deployment gitmirror=$(IMAGE_PROD):$(VERSION) 28 29 deploy-staging: push-staging 30 echo "no staging configuration" 31 exit 1