Learn R Programming

googleCloudRunner (version 0.2.0)

cr_build_upload_gcs: Create a StorageSource

Description

This creates a StorageSource object after uploading to Google Cloud Storage

Usage

cr_build_upload_gcs(
  local,
  remote = paste0(local, format(Sys.time(), "%Y%m%d%H%M%S"), ".tar.gz"),
  bucket = cr_bucket_get(),
  predefinedAcl = "bucketOwnerFullControl",
  deploy_folder = "deploy"
)

Arguments

local

Local directory containing the Dockerfile etc. you wish to deploy

remote

The name of the folder in your bucket

bucket

The Google Cloud Storage bucket to upload to

predefinedAcl

The ACL rules for the object uploaded.

deploy_folder

Which folder to deploy from

Value

A Source object

Details

It copies the files into a folder call "deploy" in your working directory, then tars it for upload

See Also

Other Cloud Build functions: Build(), RepoSource(), Source(), StorageSource(), cr_build_artifacts(), cr_build_make(), cr_build_status(), cr_build_wait(), cr_build_write(), cr_build_yaml_artifact(), cr_build_yaml(), cr_build()

Examples

Run this code
# NOT RUN {
# }
# NOT RUN {
cr_project_set("my-project")
cr_bucket_set("my-bucket")
my_gcs_source <- cr_build_upload_gcs("my_folder")
build1 <- cr_build("cloudbuild.yaml", source = my_gcs_source)

# }

Run the code above in your browser using DataLab