File tree Expand file tree Collapse file tree 3 files changed +7
-6
lines changed Expand file tree Collapse file tree 3 files changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -14,12 +14,14 @@ This document walks through the process of creating a new release of Online Bout
1414
1515 - ` TAG ` - This is the new version (e.g., ` v0.3.5 ` ).
1616 - ` REPO_PREFIX ` - This is the Docker repository.
17+ - ` PROJECT_ID ` - This is the Google Cloud project in which Google Cloud Build will be used to remotely build microservice Docker images.
1718
1819 ** Example:**
19-
20+
2021 ```
2122 export TAG=v0.3.5
2223 export REPO_PREFIX=gcr.io/google-samples/microservices-demo
24+ export PROJECT_ID=google-samples
2325 ```
2426
25275 . Run ` ./docs/releasing/make-release.sh ` .
Original file line number Diff line number Diff line change @@ -24,6 +24,7 @@ log() { echo "$1" >&2; }
2424
2525TAG=" ${TAG:? TAG env variable must be specified} "
2626REPO_PREFIX=" ${REPO_PREFIX:? REPO_PREFIX env variable must be specified} "
27+ PROJECT_ID=" ${PROJECT_ID:? PROJECT_ID env variable must be specified e.g. google-samples} "
2728
2829while IFS= read -d $' \0' -r dir; do
2930 # build image
@@ -37,11 +38,8 @@ while IFS= read -d $'\0' -r dir; do
3738 image=" ${REPO_PREFIX} /$svcname :$TAG "
3839 (
3940 cd " ${builddir} "
40- log " Building: ${image} "
41- docker build --pull -t " ${image} " .
42-
43- log " Pushing: ${image} "
44- docker push " ${image} "
41+ log " Building (and pushing) image on Google Cloud Build: ${image} "
42+ gcloud builds submit --project=${PROJECT_ID} --tag=${image}
4543 )
4644done < <( find " ${REPO_ROOT} /src" -mindepth 1 -maxdepth 1 -type d -print0)
4745
Original file line number Diff line number Diff line change @@ -30,6 +30,7 @@ fail() { log "$1"; exit 1; }
3030
3131TAG=" ${TAG:? TAG env variable must be specified} "
3232REPO_PREFIX=" ${REPO_PREFIX:? REPO_PREFIX env variable must be specified e.g. gcr.io\/ google-samples\/ microservices-demo} "
33+ PROJECT_ID=" ${PROJECT_ID:? PROJECT_ID env variable must be specified e.g. google-samples} "
3334
3435if [[ " $TAG " != v* ]]; then
3536 fail " \$ TAG must start with 'v', e.g. v0.1.0 (got: $TAG )"
You can’t perform that action at this time.
0 commit comments