Write out a Build object to cloudbuild.yaml
cr_build_write(x, file = "cloudbuild.yaml", footer = TRUE)A Build object perhaps created with cr_build_make or cr_build_yaml
Where to write the yaml file
should a comment footer with the time be added?
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")
#> ℹ 2022-03-26 19:55:47 > 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)
}