cr_build_yaml {googleCloudRunner}R Documentation

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,
  availableSecrets = NULL,
  images = NULL,
  artifacts = NULL,
  serviceAccount = 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

availableSecrets

What environment arguments from Secret Manager are available to the build - create via cr_build_yaml_secrets

images

What images will be build from this cloudbuild

artifacts

What artifacts may be built from this cloudbuild - create via cr_build_yaml_artifact

serviceAccount

What service account should the build be run under?

See Also

Build configuration overview for cloudbuild.yaml

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_write(), cr_build_yaml_artifact(), cr_build_yaml_secrets(), cr_build()

Examples

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
)

[Package googleCloudRunner version 0.5.0 Index]