Useful if you have a step from an existing cloudbuild.yaml you want in another

cr_buildstep_extract(x, step = NULL)

Arguments

x

A Build object

step

The numeric step number to extract

See also

Examples

package_build <- system.file("cloudbuild/cloudbuild.yaml", package = "googleCloudRunner") build <- cr_build_make(package_build) build
#> ==CloudBuildObject== #> steps: #> - name: gcr.io/cloud-builders/docker #> id: Docker Version #> args: version #> - name: alpine #> id: Hello Cloud Build #> args: #> - echo #> - Hello Cloud Build #> - name: rocker/r-base #> id: Hello R #> args: #> - Rscript #> - -e #> - paste0('1 + 1 = ', 1+1)
cr_buildstep_extract(build, step = 1)
#> [[1]] #> ==cloudRunnerBuildStep== #> name: gcr.io/cloud-builders/docker #> args: #> - version #> id: Docker Version #>
cr_buildstep_extract(build, step = 2)
#> [[1]] #> ==cloudRunnerBuildStep== #> name: alpine #> args: #> - echo #> - Hello Cloud Build #> id: Hello Cloud Build #>