RepoSource: RepoSource Object

View source: R/build_sources.R

RepoSourceR Documentation

RepoSource Object

Description

RepoSource Object

Usage

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

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/

Value

RepoSource object

See Also

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()

Examples

cr_project_set("my-project")
cr_bucket_set("my-bucket")
## Not run: 

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
)

## End(Not run)

MarkEdmondson1234/googleCloudRunner documentation built on Feb. 5, 2023, 5:45 p.m.