52 lines
1.4 KiB
YAML
52 lines
1.4 KiB
YAML
steps:
|
|
- name: gcr.io/cloud-builders/docker
|
|
id: Build image
|
|
dir: apps/web
|
|
args:
|
|
- build
|
|
- -f
|
|
- Dockerfile
|
|
- --build-arg
|
|
- NEXT_PUBLIC_API_URL=${_NEXT_PUBLIC_API_URL}
|
|
- -t
|
|
- ${_AR_HOSTNAME}/${_AR_PROJECT_ID}/${_AR_REPOSITORY}/${_SERVICE_NAME}:latest
|
|
- -t
|
|
- ${_AR_HOSTNAME}/${_AR_PROJECT_ID}/${_AR_REPOSITORY}/${_SERVICE_NAME}:${SHORT_SHA}
|
|
- .
|
|
|
|
- name: gcr.io/cloud-builders/docker
|
|
id: Push latest
|
|
dir: apps/web
|
|
args:
|
|
- push
|
|
- ${_AR_HOSTNAME}/${_AR_PROJECT_ID}/${_AR_REPOSITORY}/${_SERVICE_NAME}:latest
|
|
|
|
- name: gcr.io/cloud-builders/docker
|
|
id: Push commit tag
|
|
dir: apps/web
|
|
args:
|
|
- push
|
|
- ${_AR_HOSTNAME}/${_AR_PROJECT_ID}/${_AR_REPOSITORY}/${_SERVICE_NAME}:${SHORT_SHA}
|
|
|
|
- name: gcr.io/google.com/cloudsdktool/cloud-sdk:slim
|
|
id: Deploy to Cloud Run
|
|
entrypoint: gcloud
|
|
args:
|
|
- run
|
|
- deploy
|
|
- ${_SERVICE_NAME}
|
|
- --image
|
|
- ${_AR_HOSTNAME}/${_AR_PROJECT_ID}/${_AR_REPOSITORY}/${_SERVICE_NAME}:${SHORT_SHA}
|
|
- --region
|
|
- ${_DEPLOY_REGION}
|
|
- --platform
|
|
- ${_PLATFORM}
|
|
- --quiet
|
|
|
|
images:
|
|
- ${_AR_HOSTNAME}/${_AR_PROJECT_ID}/${_AR_REPOSITORY}/${_SERVICE_NAME}:latest
|
|
- ${_AR_HOSTNAME}/${_AR_PROJECT_ID}/${_AR_REPOSITORY}/${_SERVICE_NAME}:${SHORT_SHA}
|
|
|
|
options:
|
|
logging: CLOUD_LOGGING_ONLY
|