File tree Expand file tree Collapse file tree 2 files changed +30
-21
lines changed
Expand file tree Collapse file tree 2 files changed +30
-21
lines changed Original file line number Diff line number Diff line change 33# license that can be found in the LICENSE file.
44
55MUTABLE_VERSION ?= latest
6- VERSION ? = $(shell git rev-parse --short HEAD )
6+ VERSION : = $(shell ../coordinator/version.sh )
77
8- IMAGE_STAGING := gcr.io/go-dashboard-dev/gitmirror
98IMAGE_PROD := gcr.io/symbolic-datum-552/gitmirror
109
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 )
10+ push-prod :
11+ gcloud builds submit --project=symbolic-datum-552 --config=cloudbuild.yaml --substitutions=TAG_NAME=" $( VERSION) " ../..
2412
2513deploy-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
14+ go install golang.org/x/build/cmd/xb
15+ xb --prod kubectl --namespace prod set image deployment/gitmirror-serving-deployment gitmirror=$(IMAGE_PROD ) :$(VERSION )
16+ xb --prod kubectl --namespace prod set image deployment/gitmirror-mirroring-deployment gitmirror=$(IMAGE_PROD ) :$(VERSION )
Original file line number Diff line number Diff line change 1+ # Copyright 2024 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+ steps :
6+ - name : ' gcr.io/cloud-builders/docker'
7+ args :
8+ - ' build'
9+ - ' -f'
10+ - ' cmd/gitmirror/Dockerfile'
11+ - ' --build-arg'
12+ - ' version=${TAG_NAME}'
13+ - ' -t'
14+ - ' gcr.io/symbolic-datum-552/gitmirror:${TAG_NAME}'
15+ - ' -t'
16+ - ' gcr.io/symbolic-datum-552/gitmirror:latest'
17+ - ' .'
18+ - name : ' gcr.io/cloud-builders/docker'
19+ args : ['push', 'gcr.io/symbolic-datum-552/gitmirror:${TAG_NAME}']
20+ images :
21+ - ' gcr.io/symbolic-datum-552/gitmirror:${TAG_NAME}'
22+ - ' gcr.io/symbolic-datum-552/gitmirror:latest'
23+ options :
24+ logging : CLOUD_LOGGING_ONLY
You can’t perform that action at this time.
0 commit comments