blob: d60c2a1f19742ac5156e2c832fd1468115af61bc [file] [log] [blame]
# Copyright 2023 The Go Authors. All rights reserved.
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
steps:
# Build the container image
- name: "gcr.io/cloud-builders/docker"
dir: 'godev'
args:
- "build"
- "-t"
- "gcr.io/$PROJECT_ID/telemetrygodev:$COMMIT_SHA"
- "-f"
- "cmd/telemetrygodev/Dockerfile"
- "."
# Push the container image to Container Registry
- name: "gcr.io/cloud-builders/docker"
args: ["push", "gcr.io/$PROJECT_ID/telemetrygodev:$COMMIT_SHA"]
# Deploy container image to Cloud Run
- name: "gcr.io/google.com/cloudsdktool/cloud-sdk"
entrypoint: gcloud
args:
- "run"
- "deploy"
- "$_SERVICE"
- "--image"
- "gcr.io/$PROJECT_ID/telemetrygodev:$COMMIT_SHA"
- "--region"
- "us-central1"
images:
- "gcr.io/$PROJECT_ID/telemetrygodev:$COMMIT_SHA"