RepoSource Object
RepoSource(
repoName = NULL,
tagName = NULL,
commitSha = NULL,
branchName = NULL,
dir = NULL,
projectId = NULL
)
Name of the Cloud Source Repository
Regex matching tags to build
Explicit commit SHA to build
Regex matching branches to build e.g. ".*"
Directory, relative to the source root, in which to run the build
ID of the project that owns the Cloud Source Repository
RepoSource object
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/
Other Cloud Build functions:
Build()
,
Source()
,
StorageSource()
,
cr_build_artifacts()
,
cr_build_list()
,
cr_build_logs()
,
cr_build_make()
,
cr_build_status()
,
cr_build_targets()
,
cr_build_upload_gcs()
,
cr_build_wait()
,
cr_build_write()
,
cr_build_yaml_artifact()
,
cr_build_yaml_secrets()
,
cr_build_yaml()
,
cr_build()
cr_project_set("my-project")
#> ℹ 2022-03-26 19:55:41 > ProjectId set to my-project
#> [1] "my-project"
cr_bucket_set("my-bucket")
#> ℹ 2022-03-26 19:55:41 > 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
)
}