Skip to content

Commit

Permalink
Add cloudbuild trigger to update guide (#2808)
Browse files Browse the repository at this point in the history
<!-- This change is generated by MagicModules. -->
/cc @rileykarson
  • Loading branch information
modular-magician authored and rileykarson committed Jan 4, 2019
1 parent 66d08da commit 505cb42
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions website/docs/version_2_upgrade.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ Upgrade topics:
- [Resource: `google_bigtable_instance`](#resource-google_bigtable_instance)
- [Resource: `google_binary_authorizaton_attestor`](#resource-google_binary_authorization_attestor)
- [Resource: `google_binary_authorizaton_policy`](#resource-google_binary_authorization_policy)
- [Resource: `google_cloudbuild_trigger`](#resource-google_cloudbuild_trigger)
- [Resource: `google_cloudfunctions_function`](#resource-google_cloudfunctions_function)
- [Resource: `google_compute_backend_service`](#resource-google_compute_backend_service)
- [Resource: `google_compute_disk`](#resource-google_compute_disk)
Expand Down Expand Up @@ -201,6 +202,45 @@ Use the [`google-beta` provider](#google-beta-provider) to use these resources.

Use the [`google-beta` provider](#google-beta-provider) to use these resources.

## Resource: `google_cloudbuild_trigger`

### `build.step.args` is now a list instead of space separated strings.

Example updated configuration:

```hcl
resource "google_cloudbuild_trigger" "build_trigger" {
trigger_template {
branch_name = "master-updated"
repo_name = "some-repo-updated"
}
build {
images = ["gcr.io/$PROJECT_ID/$REPO_NAME:$SHORT_SHA"]
tags = ["team-a", "service-b", "updated"]
step {
name = "gcr.io/cloud-builders/gsutil"
args = ["cp", "gs://mybucket/remotefile.zip", "localfile-updated.zip"]
}
step {
name = "gcr.io/cloud-builders/go"
args = ["build", "my_package_updated"]
}
step {
name = "gcr.io/cloud-builders/docker"
args = ["build", "-t", "gcr.io/$PROJECT_ID/$REPO_NAME:$SHORT_SHA", "-f", "Dockerfile", "."]
}
step {
name = "gcr.io/$PROJECT_ID/$REPO_NAME:$SHORT_SHA"
args = ["test"]
}
}
}
```

## Resource: `google_cloudfunctions_function`

### `trigger_bucket`, `trigger_topic`, and `retry_on_failure` have been removed
Expand Down

0 comments on commit 505cb42

Please sign in to comment.