Write out a Build object to cloudbuild.yaml

cr_build_write(x, file = "cloudbuild.yaml")

Arguments

x

A Build object perhaps created with cr_build_make or cr_build_yaml

file

Where to write the yaml file

See also

Examples

cr_project_set("my-project")
#> 2021-03-19 12:27:02 > ProjectId set to my-project
#> [1] "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) if (FALSE) { cr_build_write(run_yaml) } # write from a Build object build <- cr_build_make(system.file("cloudbuild/cloudbuild.yaml", package = "googleCloudRunner")) if (FALSE) { cr_build_write(build) }