If a completed build includes artifact files this downloads them to local files
cr_build_artifacts( build, download_folder = getwd(), overwrite = FALSE, path_regex = NULL )
| build | A Build object that includes the artifact location |
|---|---|
| download_folder | Where to download the artifact files |
| overwrite | Whether to overwrite existing local data |
| path_regex | A regex of files to fetch from the artifact bucket location. This is due to not being able to support the path globs |
If your artifacts are using file glob (e.g. myfolder/**) to decide which workspace files are uploaded to Cloud Storage, you will need to create a path_regex of similar functionality ("^myfolder/"). This is not needed if you use absolute path names such as "myfile.csv"
Other Cloud Build functions:
Build(),
RepoSource(),
Source(),
StorageSource(),
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_yaml(),
cr_build()
if (FALSE) { #' r <- "write.csv(mtcars,file = 'artifact.csv')" ba <- cr_build_yaml( steps = cr_buildstep_r(r), artifacts = cr_build_yaml_artifact('artifact.csv', bucket = "my-bucket") ) ba build <- cr_build(ba) built <- cr_build_wait(build) cr_build_artifacts(built) }