View source: R/buildtriggers.R
cr_buildtrigger_copy | R Documentation |
This lets you use the response from cr_buildtrigger_get for an existing buildtrigger to copy over settings to a new buildtrigger.
cr_buildtrigger_copy( buildTrigger, filename = NULL, name = NULL, tags = NULL, build = NULL, ignoredFiles = NULL, github = NULL, sourceToBuild = NULL, substitutions = NULL, includedFiles = NULL, disabled = NULL, triggerTemplate = NULL, projectId = cr_project_get() )
buildTrigger |
A |
filename |
Path, from the source root, to a file whose contents is used for the build |
name |
User assigned name of the trigger |
tags |
Tags for annotation of a 'BuildTrigger' |
build |
Contents of the build template |
ignoredFiles |
ignored_files and included_files are file glob matches extended with support for "**". |
github |
a GitHubEventsConfig object - mutually exclusive with |
sourceToBuild |
A cr_buildtrigger_repo object (but no regex allowed for branch or tag) This field is currently only used by Webhook, Pub/Sub, Manual, and Cron triggers and is the source of the build will execute upon. |
substitutions |
A named list of Build macro variables |
includedFiles |
If any of the files altered in the commit pass the ignored_files |
disabled |
If true, the trigger will never result in a build |
triggerTemplate |
a RepoSource object - mutually exclusive with |
projectId |
The projectId you are copying to |
Overwrite settings for the build trigger you are copying by supplying it as one of the other arguments from BuildTrigger.
Other BuildTrigger functions:
BuildTrigger()
,
GitHubEventsConfig()
,
cr_buildtrigger_delete()
,
cr_buildtrigger_edit()
,
cr_buildtrigger_get()
,
cr_buildtrigger_list()
,
cr_buildtrigger_pubsub()
,
cr_buildtrigger_repo()
,
cr_buildtrigger_run()
,
cr_buildtrigger_webhook()
,
cr_buildtrigger()
## Not run: # copying a GitHub buildtrigger across projects and git repos bt <- cr_buildtrigger_get("my-trigger", projectId = "my-project-1") # a new GitHub project gh <- GitHubEventsConfig("username/new-repo", event = "push", branch = "^master$" ) # give 'Cloud Build Editor' role to your service auth key in new project # then copy configuration across cr_buildtrigger_copy(bt, github = gh, projectId = "my-new-project") ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.