| cr_build_write | R Documentation |
Write out a Build object to cloudbuild.yaml
cr_build_write(x, file = "cloudbuild.yaml")
x |
A Build object perhaps created with cr_build_make or cr_build_yaml |
file |
Where to write the yaml file |
Other Cloud Build functions:
Build(),
RepoSource(),
Source(),
StorageSource(),
cr_build_artifacts(),
cr_build_list(),
cr_build_logs(),
cr_build_make(),
cr_build_status(),
cr_build_targets(),
cr_build_upload_gcs(),
cr_build_wait(),
cr_build_yaml_artifact(),
cr_build_yaml_secrets(),
cr_build_yaml(),
cr_build()
cr_project_set("my-project")
# write from creating a Yaml object
image <- "gcr.io/my-project/my-image$BUILD_ID"
run_yaml <- cr_build_yaml(
steps = c(
cr_buildstep("docker", c("build", "-t", image, ".")),
cr_buildstep("docker", c("push", image)),
cr_buildstep("gcloud", c("beta", "run", "deploy", "test1", "--image", image))
),
images = image
)
## Not run:
cr_build_write(run_yaml)
## End(Not run)
# write from a Build object
build <- cr_build_make(system.file("cloudbuild/cloudbuild.yaml",
package = "googleCloudRunner"
))
## Not run:
cr_build_write(build)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.