Useful if you have a step from an existing cloudbuild.yaml you want in another
cr_buildstep_extract(x, step = NULL)
A Build object
The numeric step number to extract
Other Cloud Buildsteps:
cr_buildstep_bash()
,
cr_buildstep_decrypt()
,
cr_buildstep_df()
,
cr_buildstep_docker()
,
cr_buildstep_edit()
,
cr_buildstep_gcloud()
,
cr_buildstep_gitsetup()
,
cr_buildstep_mailgun()
,
cr_buildstep_nginx_setup()
,
cr_buildstep_packagetests()
,
cr_buildstep_pkgdown()
,
cr_buildstep_run()
,
cr_buildstep_r()
,
cr_buildstep_secret()
,
cr_buildstep_slack()
,
cr_buildstep_targets()
,
cr_buildstep()
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
#>