MarkEdmondson1234 / googleCloudRunner

Easy R scripts on Google Cloud Platform via Cloud Run, Cloud Build and Cloud Scheduler
https://code.markedmondson.me/googleCloudRunner/
Other
80 stars 25 forks source link

feat: allow availableSecrets and build_args #205

Closed ramnathv closed 1 year ago

ramnathv commented 1 year ago

@MarkEdmondson1234 This PR allows availableSecrets and build_args to be used with cr_deploy_docker. This can be very useful when your docker image is trying to pull private packages and you dont want to hard code the secrets.

library(googleCloudRunner)
secret <- cr_build_yaml_secrets("BITBUCKET_PASSWORD", "BITBUCKET_PASSWORD")
cr_deploy_docker(
  local = ".", 
  remote = "my_docker_image",
  image_name = "my_docker_image",
  tag = tag,
  kaniko_cache = TRUE,
  build_args = c('--build-arg=BITBUCKET_PASSWORD'),
  timeout = 1500L,
  secretEnv = "BITBUCKET_PASSWORD",
  availableSecrets = list(secret)
)
MarkEdmondson1234 commented 1 year ago

Looks good, thanks!