-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add continuous deployment for backend service on cloud run.
- Loading branch information
Showing
3 changed files
with
51 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#!/usr/bin/env bash | ||
set -e | ||
|
||
# The purpose of this script is to deploy the docker images to Cloud Run when being built on the master branch. | ||
|
||
if [ "$BRANCH" = "master" ]; then | ||
echo "master branch detected. deploying commit ${SHORT_SHA} for project ${PROJECT_ID}" | ||
|
||
echo "deploying account service: gcr.io/${PROJECT_ID}/kript-account:${SHORT_SHA}" | ||
gcloud run deploy account --image "gcr.io/${PROJECT_ID}/kript-account:${SHORT_SHA}" --region 'us-east4' --platform managed | ||
|
||
echo "deploying data service: gcr.io/${PROJECT_ID}/kript-data:${SHORT_SHA}" | ||
gcloud run deploy data --image "gcr.io/${PROJECT_ID}/kript-data:${SHORT_SHA}" --region 'us-east4' --platform managed | ||
|
||
echo "deploying gateway service: gcr.io/${PROJECT_ID}/kript-gateway:${SHORT_SHA}" | ||
gcloud run deploy gateway --image "gcr.io/${PROJECT_ID}/kript-gateway:${SHORT_SHA}" --region 'us-east4' --platform managed | ||
|
||
echo "deploying grpc service: gcr.io/${PROJECT_ID}/kript-grpc:${SHORT_SHA}" | ||
gcloud run deploy grpc --image "gcr.io/${PROJECT_ID}/kript-grpc:${SHORT_SHA}" --region 'us-east4' --platform managed | ||
else | ||
echo "${BRANCH} branch detected; not deploying" | ||
fi |
Empty file.