RepoSource Object

RepoSource(
  repoName = NULL,
  tagName = NULL,
  commitSha = NULL,
  branchName = NULL,
  dir = NULL,
  projectId = NULL
)

Arguments

repoName

Name of the Cloud Source Repository

tagName

Regex matching tags to build

commitSha

Explicit commit SHA to build

branchName

Regex matching branches to build e.g. ".*"

dir

Directory, relative to the source root, in which to run the build

projectId

ID of the project that owns the Cloud Source Repository

Value

RepoSource object

Details

Location of the source in a Google Cloud Source Repository.

Only one of commitSha, branchName or tagName are allowed.

If you want to use GitHub or BitBucket repos, you need to setup mirroring them via Cloud Source Repositories https://source.cloud.google.com/

See also

Examples

cr_project_set("my-project")
#> 2021-09-20 15:58:52 > ProjectId set to my-project
#> [1] "my-project"
cr_bucket_set("my-bucket")
#> 2021-09-20 15:58:53 > Bucket set to my-bucket
#> [1] "my-bucket"
if (FALSE) { my_repo <- cr_build_source( RepoSource("github_markedmondson1234_googlecloudrunner", branchName="master")) build <- cr_build( cr_build_yaml(steps = cr_buildstep("gcloud", c("-c","ls -la"), entrypoint = "bash", dir = "")), source = my_repo) }