OpenCut/apps/web/cloudbuild.yaml

49 lines
1.3 KiB
YAML

steps:
- name: gcr.io/cloud-builders/docker
id: Build image
args:
- build
- -f
- apps/web/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}
- apps/web
- name: gcr.io/cloud-builders/docker
id: Push latest
args:
- push
- ${_AR_HOSTNAME}/${_AR_PROJECT_ID}/${_AR_REPOSITORY}/${_SERVICE_NAME}:latest
- name: gcr.io/cloud-builders/docker
id: Push commit tag
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