# NOT RUN {
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)
# }
# NOT RUN {
# write from a Build object
build <- cr_build_make(system.file("cloudbuild/cloudbuild.yaml",
package = "googleCloudRunner"
))
# }
# NOT RUN {
cr_build_write(build)
# }
Run the code above in your browser using DataLab