Skip to content

Instantly share code, notes, and snippets.

@kaneshin
Created December 1, 2018 06:21
Show Gist options
  • Save kaneshin/b2ba468febc10f82d57a91ff7e5877e3 to your computer and use it in GitHub Desktop.
Save kaneshin/b2ba468febc10f82d57a91ff7e5877e3 to your computer and use it in GitHub Desktop.
resource "google_cloudbuild_trigger" "build_trigger" {
trigger_template {
branch_name = "master"
repo_name = "github_kaneshin_foobar"
dir = "cmd/foobar"
}
build {
images = ["gcr.io/$PROJECT_ID/$REPO_NAME:$COMMIT_SHA"]
step {
name = "gcr.io/cloud-builders/docker"
args = "build -t gcr.io/$PROJECT_ID/$REPO_NAME:$COMMIT_SHA -f Dockerfile ."
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment