This can be written to disk or used directly with functions such as cr_build
cr_build_yaml( steps, timeout = NULL, logsBucket = NULL, options = NULL, substitutions = NULL, tags = NULL, secrets = NULL, availableSecrets = NULL, images = NULL, artifacts = NULL )
| 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 |
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_upload_gcs(),
cr_build_wait(),
cr_build_write(),
cr_build_yaml_artifact(),
cr_build_yaml_secrets(),
cr_build()
#>#> [1] "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)#> ==cloudRunnerYaml== #> steps: #> - name: gcr.io/cloud-builders/docker #> args: #> - build #> - -t #> - gcr.io/my-project/my-image #> - '.' #> - name: gcr.io/cloud-builders/docker #> args: #> - push #> - gcr.io/my-project/my-image #> - name: gcr.io/cloud-builders/gcloud #> args: #> - beta #> - run #> - deploy #> - test1 #> - --image #> - gcr.io/my-project/my-image #> images: #> - gcr.io/my-project/my-image