2022-04-08 21:52:41 +03:00
|
|
|
# Copyright 2022 The Go Authors. All rights reserved.
|
|
|
|
# Use of this source code is governed by a BSD-style
|
|
|
|
# license that can be found in the LICENSE file.
|
|
|
|
|
|
|
|
MUTABLE_VERSION ?= latest
|
|
|
|
VERSION ?= $(shell git rev-parse --short HEAD)
|
|
|
|
|
|
|
|
IMAGE_STAGING := gcr.io/go-dashboard-dev/perf
|
|
|
|
IMAGE_PROD := gcr.io/symbolic-datum-552/perf
|
|
|
|
|
|
|
|
docker-prod:
|
|
|
|
docker build --force-rm -f Dockerfile --tag=$(IMAGE_PROD):$(VERSION) ..
|
|
|
|
docker tag $(IMAGE_PROD):$(VERSION) $(IMAGE_PROD):$(MUTABLE_VERSION)
|
|
|
|
docker-staging:
|
|
|
|
docker build --force-rm -f Dockerfile --tag=$(IMAGE_STAGING):$(VERSION) ..
|
|
|
|
docker tag $(IMAGE_STAGING):$(VERSION) $(IMAGE_STAGING):$(MUTABLE_VERSION)
|
|
|
|
|
|
|
|
push-prod: docker-prod
|
|
|
|
docker push $(IMAGE_PROD):$(MUTABLE_VERSION)
|
|
|
|
docker push $(IMAGE_PROD):$(VERSION)
|
|
|
|
push-staging: docker-staging
|
|
|
|
docker push $(IMAGE_STAGING):$(MUTABLE_VERSION)
|
|
|
|
docker push $(IMAGE_STAGING):$(VERSION)
|
|
|
|
|
|
|
|
deploy-prod: push-prod
|
|
|
|
go install golang.org/x/build/cmd/xb
|
2022-04-12 20:33:24 +03:00
|
|
|
xb --prod kubectl --namespace prod set image deployment/perf-deployment perf=$(IMAGE_PROD):$(VERSION)
|
2022-04-08 21:52:41 +03:00
|
|
|
deploy-staging: push-staging
|
|
|
|
go install golang.org/x/build/cmd/xb
|
2022-04-12 20:33:24 +03:00
|
|
|
xb --staging kubectl set image deployment/perf-deployment perf=$(IMAGE_STAGING):$(VERSION)
|