Learn R Programming

googleCloudRunner (version 0.2.0)

cr_build_yaml: Create a cloudbuild Yaml object in R

Description

This can be written to disk or used directly with functions such as cr_build

Usage

cr_build_yaml(
  steps,
  timeout = NULL,
  logsBucket = NULL,
  options = NULL,
  substitutions = NULL,
  tags = NULL,
  secrets = NULL,
  images = NULL,
  artifacts = NULL
)

Arguments

steps

A vector of cr_buildstep

timeout

How long the entire build will run. If not set will be 10mins

logsBucket

Where logs are written. If you don't set this field, Cloud Build will use a default bucket to store your build logs.

options

A named list of options

substitutions

Build macros that will replace entries in other elements

tags

Tags for the build

secrets

A secrets object

images

What images will be build from this cloudbuild

artifacts

What artifacts may be built from this cloudbuild

See Also

Build configuration overview for cloudbuild.yaml

Other Cloud Build functions: Build(), RepoSource(), Source(), StorageSource(), cr_build_artifacts(), cr_build_make(), cr_build_status(), cr_build_upload_gcs(), cr_build_wait(), cr_build_write(), cr_build_yaml_artifact(), cr_build()

Examples

Run this code
# NOT RUN {
cr_project_set("my-project")
image <- "gcr.io/my-project/my-image"
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)
# }

Run the code above in your browser using DataLab