Creates a new BuildTrigger
.
Scopes
You will need authorization for the https://www.googleapis.com/auth/cloud-platform scope to make a valid call.
If unset, the scope for this method defaults to https://www.googleapis.com/auth/cloud-platform.
You can set the scope for this method like this: cloudbuild1 --scope <scope> projects triggers-create ...
Required Scalar Argument
- <project-id> (string)
- Required. ID of the project for which to configure automatic builds.
Required Request Value
The request value is a data-structure with various fields. Each field may be a simple scalar or another data-structure. In the latter case it is advised to set the field-cursor to the data-structure's field to specify values more concisely.
For example, a structure like this:
BuildTrigger:
approval-config:
approval-required: boolean
autodetect: boolean
bitbucket-server-trigger-config:
bitbucket-server-config:
api-key: string
create-time: string
host-uri: string
name: string
peered-network: string
peered-network-ip-range: string
secrets:
admin-access-token-version-name: string
read-access-token-version-name: string
webhook-secret-version-name: string
ssl-ca: string
username: string
webhook-key: string
bitbucket-server-config-resource: string
project-key: string
pull-request:
branch: string
comment-control: string
invert-regex: boolean
push:
branch: string
invert-regex: boolean
tag: string
repo-slug: string
build:
approval:
config:
approval-required: boolean
result:
approval-time: string
approver-account: string
comment: string
decision: string
url: string
state: string
artifacts:
images: [string]
objects:
location: string
paths: [string]
timing:
end-time: string
start-time: string
build-trigger-id: string
create-time: string
failure-info:
detail: string
type: string
finish-time: string
id: string
images: [string]
log-url: string
logs-bucket: string
name: string
options:
automap-substitutions: boolean
default-logs-bucket-behavior: string
disk-size-gb: string
dynamic-substitutions: boolean
env: [string]
log-streaming-option: string
logging: string
machine-type: string
pool:
name: string
requested-verify-option: string
secret-env: [string]
source-provenance-hash: [string]
substitution-option: string
worker-pool: string
project-id: string
queue-ttl: string
results:
artifact-manifest: string
artifact-timing:
end-time: string
start-time: string
build-step-images: [string]
build-step-outputs: [string]
num-artifacts: string
service-account: string
source:
connected-repository:
dir: string
repository: string
revision: string
git-source:
dir: string
revision: string
url: string
repo-source:
branch-name: string
commit-sha: string
dir: string
invert-regex: boolean
project-id: string
repo-name: string
substitutions: { string: string }
tag-name: string
storage-source:
bucket: string
generation: string
object: string
source-fetcher: string
storage-source-manifest:
bucket: string
generation: string
object: string
source-provenance:
resolved-connected-repository:
dir: string
repository: string
revision: string
resolved-git-source:
dir: string
revision: string
url: string
resolved-repo-source:
branch-name: string
commit-sha: string
dir: string
invert-regex: boolean
project-id: string
repo-name: string
substitutions: { string: string }
tag-name: string
resolved-storage-source:
bucket: string
generation: string
object: string
source-fetcher: string
resolved-storage-source-manifest:
bucket: string
generation: string
object: string
start-time: string
status: string
status-detail: string
substitutions: { string: string }
tags: [string]
timeout: string
create-time: string
description: string
disabled: boolean
event-type: string
filename: string
filter: string
git-file-source:
bitbucket-server-config: string
github-enterprise-config: string
path: string
repo-type: string
repository: string
revision: string
uri: string
github:
enterprise-config-resource-name: string
installation-id: string
name: string
owner: string
pull-request:
branch: string
comment-control: string
invert-regex: boolean
push:
branch: string
invert-regex: boolean
tag: string
gitlab-enterprise-events-config:
gitlab-config:
create-time: string
enterprise-config:
host-uri: string
service-directory-config:
service: string
ssl-ca: string
name: string
secrets:
api-access-token-version: string
api-key-version: string
read-access-token-version: string
webhook-secret-version: string
username: string
webhook-key: string
gitlab-config-resource: string
project-namespace: string
pull-request:
branch: string
comment-control: string
invert-regex: boolean
push:
branch: string
invert-regex: boolean
tag: string
id: string
ignored-files: [string]
include-build-logs: string
included-files: [string]
name: string
pubsub-config:
service-account-email: string
state: string
subscription: string
topic: string
repository-event-config:
pull-request:
branch: string
comment-control: string
invert-regex: boolean
push:
branch: string
invert-regex: boolean
tag: string
repository: string
repository-type: string
resource-name: string
service-account: string
source-to-build:
bitbucket-server-config: string
github-enterprise-config: string
ref: string
repo-type: string
repository: string
uri: string
substitutions: { string: string }
tags: [string]
trigger-template:
branch-name: string
commit-sha: string
dir: string
invert-regex: boolean
project-id: string
repo-name: string
substitutions: { string: string }
tag-name: string
webhook-config:
secret: string
state: string
can be set completely with the following arguments which are assumed to be executed in the given order. Note how the cursor position is adjusted to the respective structures, allowing simple field names to be used most of the time.
-
-r .approval-config approval-required=true
- Whether or not approval is needed. If this is set on a build, it will become pending when created, and will need to be explicitly approved to start.
-
.. autodetect=true
- Autodetect build configuration. The following precedence is used (case insensitive): 1. cloudbuild.yaml 2. cloudbuild.yml 3. cloudbuild.json 4. Dockerfile Currently only available for GitHub App Triggers.
bitbucket-server-trigger-config.bitbucket-server-config api-key=sed
- Required. Immutable. API Key that will be attached to webhook. Once this field has been set, it cannot be changed. If you need to change it, please create another BitbucketServerConfig.
create-time=justo
- Time when the config was created.
host-uri=amet
- Required. Immutable. The URI of the Bitbucket Server host. Once this field has been set, it cannot be changed. If you need to change it, please create another BitbucketServerConfig.
name=sed
- The resource name for the config.
peered-network=ut
- Optional. The network to be used when reaching out to the Bitbucket Server instance. The VPC network must be enabled for private service connection. This should be set if the Bitbucket Server instance is hosted on-premises and not reachable by public internet. If this field is left empty, no network peering will occur and calls to the Bitbucket Server instance will be made over the public internet. Must be in the format
projects/{project}/global/networks/{network}
, where {project} is a project number or id and {network} is the name of a VPC network in the project.
- Optional. The network to be used when reaching out to the Bitbucket Server instance. The VPC network must be enabled for private service connection. This should be set if the Bitbucket Server instance is hosted on-premises and not reachable by public internet. If this field is left empty, no network peering will occur and calls to the Bitbucket Server instance will be made over the public internet. Must be in the format
peered-network-ip-range=et
- Immutable. IP range within the peered network. This is specified in CIDR notation with a slash and the subnet prefix size. You can optionally specify an IP address before the subnet prefix value. e.g.
192.168.0.0/29
would specify an IP range starting at 192.168.0.0 with a 29 bit prefix size./16
would specify a prefix size of 16 bits, with an automatically determined IP within the peered VPC. If unspecified, a value of/24
will be used. The field only has an effect if peered_network is set.
- Immutable. IP range within the peered network. This is specified in CIDR notation with a slash and the subnet prefix size. You can optionally specify an IP address before the subnet prefix value. e.g.
secrets admin-access-token-version-name=kasd
- Required. The resource name for the admin access token's secret version.
read-access-token-version-name=gubergren
- Required. The resource name for the read access token's secret version.
-
webhook-secret-version-name=et
- Required. Immutable. The resource name for the webhook secret's secret version. Once this field has been set, it cannot be changed. If you need to change it, please create another BitbucketServerConfig.
-
.. ssl-ca=at
- Optional. SSL certificate to use for requests to Bitbucket Server. The format should be PEM format but the extension can be one of .pem, .cer, or .crt.
username=ut
- Username of the account Cloud Build will use on Bitbucket Server.
-
webhook-key=consetetur
- Output only. UUID included in webhook requests. The UUID is used to look up the corresponding config.
-
.. bitbucket-server-config-resource=at
- Required. The Bitbucket server config resource that this trigger config maps to.
project-key=et
- Required. Key of the project that the repo is in. For example: The key for https://mybitbucket.server/projects/TEST/repos/test-repo is "TEST".
pull-request branch=dolor
- Regex of branches to match. The syntax of the regular expressions accepted is the syntax accepted by RE2 and described at https://github.com/google/re2/wiki/Syntax
comment-control=clita
- If CommentControl is enabled, depending on the setting, builds may not fire until a repository writer comments
/gcbrun
on a pull request or/gcbrun
is in the pull request description. Only PR comments that contain/gcbrun
will trigger builds. If CommentControl is set to disabled, comments with/gcbrun
from a user with repository write permission or above will still trigger builds to run.
- If CommentControl is enabled, depending on the setting, builds may not fire until a repository writer comments
-
invert-regex=false
- If true, branches that do NOT match the git_ref will trigger a build.
-
..push branch=amet
- Regexes matching branches to build. The syntax of the regular expressions accepted is the syntax accepted by RE2 and described at https://github.com/google/re2/wiki/Syntax
invert-regex=false
- When true, only trigger a build if the revision regex does NOT match the git_ref regex.
-
tag=dolore
- Regexes matching tags to build. The syntax of the regular expressions accepted is the syntax accepted by RE2 and described at https://github.com/google/re2/wiki/Syntax
-
.. repo-slug=clita
- Required. Slug of the repository. A repository slug is a URL-friendly version of a repository name, automatically generated by Bitbucket for use in the URL. For example, if the repository name is 'test repo', in the URL it would become 'test-repo' as in https://mybitbucket.server/projects/TEST/repos/test-repo.
-
..build.approval.config approval-required=false
- Whether or not approval is needed. If this is set on a build, it will become pending when created, and will need to be explicitly approved to start.
-
..result approval-time=diam
- Output only. The time when the approval decision was made.
approver-account=sanctus
- Output only. Email of the user that called the ApproveBuild API to approve or reject a build at the time that the API was called.
comment=ipsum
- Optional. An optional comment for this manual approval result.
decision=lorem
- Required. The decision of this manual approval.
-
url=sed
- Optional. An optional URL tied to this manual approval result. This field is essentially the same as comment, except that it will be rendered by the UI differently. An example use case is a link to an external job that approved this Build.
-
.. state=tempor
- Output only. The state of this build's approval.
-
..artifacts images=et
- A list of images to be pushed upon the successful completion of all build steps. The images will be pushed using the builder service account's credentials. The digests of the pushed images will be stored in the Build resource's results field. If any of the images fail to be pushed, the build is marked FAILURE.
- Each invocation of this argument appends the given value to the array.
objects location=et
- Cloud Storage bucket and optional object path, in the form "gs://bucket/path/to/somewhere/". (see Bucket Name Requirements). Files in the workspace matching any path pattern will be uploaded to Cloud Storage with this location as a prefix.
paths=sadipscing
- Path globs used to match files in the build's workspace.
- Each invocation of this argument appends the given value to the array.
timing end-time=vero
- End of time span.
-
start-time=sed
- Start of time span.
-
.... build-trigger-id=et
- Output only. The ID of the
BuildTrigger
that triggered this build, if it was triggered automatically.
- Output only. The ID of the
create-time=sea
- Output only. Time at which the request to create the build was received.
failure-info detail=ut
- Explains the failure issue in more detail using hard-coded text.
-
type=et
- The name of the failure.
-
.. finish-time=sanctus
- Output only. Time at which execution of the build was finished. The difference between finish_time and start_time is the duration of the build's execution.
id=magna
- Output only. Unique identifier of the build.
images=magna
- A list of images to be pushed upon the successful completion of all build steps. The images are pushed using the builder service account's credentials. The digests of the pushed images will be stored in the
Build
resource's results field. If any of the images fail to be pushed, the build status is markedFAILURE
. - Each invocation of this argument appends the given value to the array.
- A list of images to be pushed upon the successful completion of all build steps. The images are pushed using the builder service account's credentials. The digests of the pushed images will be stored in the
log-url=ea
- Output only. URL to logs for this build in Google Cloud Console.
logs-bucket=no
- Cloud Storage bucket where logs should be written (see Bucket Name Requirements). Logs file names will be of the format
${logs_bucket}/log-${build_id}.txt
.
- Cloud Storage bucket where logs should be written (see Bucket Name Requirements). Logs file names will be of the format
name=aliquyam
- Output only. The 'Build' name with format:
projects/{project}/locations/{location}/builds/{build}
, where {build} is a unique identifier generated by the service.
- Output only. The 'Build' name with format:
options automap-substitutions=true
- Option to include built-in and custom substitutions as env variables for all build steps.
default-logs-bucket-behavior=dolores
- Optional. Option to specify how default logs buckets are setup.
disk-size-gb=invidunt
- Requested disk size for the VM that runs the build. Note that this is NOT "disk free"; some of the space will be used by the operating system and build utilities. Also note that this is the minimum disk size that will be allocated for the build -- the build may run with a larger disk than requested. At present, the maximum disk size is 2000GB; builds that request more than the maximum are rejected with an error.
dynamic-substitutions=true
- Option to specify whether or not to apply bash style string operations to the substitutions. NOTE: this is always enabled for triggered builds and cannot be overridden in the build configuration file.
env=stet
- A list of global environment variable definitions that will exist for all build steps in this build. If a variable is defined in both globally and in a build step, the variable will use the build step value. The elements are of the form "KEY=VALUE" for the environment variable "KEY" being given the value "VALUE".
- Each invocation of this argument appends the given value to the array.
log-streaming-option=ut
- Option to define build log streaming behavior to Cloud Storage.
logging=consetetur
- Option to specify the logging mode, which determines if and where build logs are stored.
machine-type=amet
- Compute Engine machine type on which to run the build.
-
pool name=vero
- The
WorkerPool
resource to execute the build on. You must havecloudbuild.workerpools.use
on the project hosting the WorkerPool. Format projects/{project}/locations/{location}/workerPools/{workerPoolId}
- The
-
.. requested-verify-option=ipsum
- Requested verifiability options.
secret-env=no
- A list of global environment variables, which are encrypted using a Cloud Key Management Service crypto key. These values must be specified in the build's
Secret
. These variables will be available to all build steps in this build. - Each invocation of this argument appends the given value to the array.
- A list of global environment variables, which are encrypted using a Cloud Key Management Service crypto key. These values must be specified in the build's
source-provenance-hash=rebum.
- Requested hash for SourceProvenance.
- Each invocation of this argument appends the given value to the array.
substitution-option=est
- Option to specify behavior when there is an error in the substitution checks. NOTE: this is always set to ALLOW_LOOSE for triggered builds and cannot be overridden in the build configuration file.
-
worker-pool=rebum.
- This field deprecated; please use
pool.name
instead.
- This field deprecated; please use
-
.. project-id=nonumy
- Output only. ID of the project.
queue-ttl=rebum.
- TTL in queue for this build. If provided and the build is enqueued longer than this value, the build will expire and the build status will be
EXPIRED
. The TTL starts ticking from create_time.
- TTL in queue for this build. If provided and the build is enqueued longer than this value, the build will expire and the build status will be
results artifact-manifest=et
- Path to the artifact manifest for non-container artifacts uploaded to Cloud Storage. Only populated when artifacts are uploaded to Cloud Storage.
artifact-timing end-time=et
- End of time span.
-
start-time=aliquyam
- Start of time span.
-
.. build-step-images=sanctus
- List of build step digests, in the order corresponding to build step indices.
- Each invocation of this argument appends the given value to the array.
build-step-outputs=sed
- List of build step outputs, produced by builder images, in the order corresponding to build step indices. Cloud Builders can produce this output by writing to
$BUILDER_OUTPUT/output
. Only the first 50KB of data is stored. - Each invocation of this argument appends the given value to the array.
- List of build step outputs, produced by builder images, in the order corresponding to build step indices. Cloud Builders can produce this output by writing to
-
num-artifacts=tempor
- Number of non-container artifacts uploaded to Cloud Storage. Only populated when artifacts are uploaded to Cloud Storage.
-
.. service-account=dolore
- IAM service account whose credentials will be used at build runtime. Must be of the format
projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}
. ACCOUNT can be email address or uniqueId of the service account.
- IAM service account whose credentials will be used at build runtime. Must be of the format
source.connected-repository dir=dolore
- Directory, relative to the source root, in which to run the build.
repository=ipsum
- Required. Name of the Google Cloud Build repository, formatted as
projects/*/locations/*/connections/*/repositories/*
.
- Required. Name of the Google Cloud Build repository, formatted as
-
revision=takimata
- The revision to fetch from the Git repository such as a branch, a tag, a commit SHA, or any Git ref.
-
..git-source dir=justo
- Directory, relative to the source root, in which to run the build. This must be a relative path. If a step's
dir
is specified and is an absolute path, this value is ignored for that step's execution.
- Directory, relative to the source root, in which to run the build. This must be a relative path. If a step's
revision=ea
- The revision to fetch from the Git repository such as a branch, a tag, a commit SHA, or any Git ref. Cloud Build uses
git fetch
to fetch the revision from the Git repository; therefore make sure that the string you provide forrevision
is parsable by the command. For information on string values accepted bygit fetch
, see https://git-scm.com/docs/gitrevisions#_specifying_revisions. For information ongit fetch
, see https://git-scm.com/docs/git-fetch.
- The revision to fetch from the Git repository such as a branch, a tag, a commit SHA, or any Git ref. Cloud Build uses
-
url=ipsum
- Location of the Git repo to build. This will be used as a
git remote
, see https://git-scm.com/docs/git-remote.
- Location of the Git repo to build. This will be used as a
-
..repo-source branch-name=diam
- Regex matching branches to build. The syntax of the regular expressions accepted is the syntax accepted by RE2 and described at https://github.com/google/re2/wiki/Syntax
commit-sha=sed
- Explicit commit SHA to build.
dir=justo
- Directory, relative to the source root, in which to run the build. This must be a relative path. If a step's
dir
is specified and is an absolute path, this value is ignored for that step's execution.
- Directory, relative to the source root, in which to run the build. This must be a relative path. If a step's
invert-regex=true
- Only trigger a build if the revision regex does NOT match the revision regex.
project-id=et
- ID of the project that owns the Cloud Source Repository. If omitted, the project ID requesting the build is assumed.
repo-name=dolor
- Name of the Cloud Source Repository.
substitutions=key=dolores
- Substitutions to use in a triggered build. Should only be used with RunBuildTrigger
- the value will be associated with the given
key
-
tag-name=amet
- Regex matching tags to build. The syntax of the regular expressions accepted is the syntax accepted by RE2 and described at https://github.com/google/re2/wiki/Syntax
-
..storage-source bucket=sit
- Cloud Storage bucket containing the source (see Bucket Name Requirements).
generation=consetetur
- Cloud Storage generation for the object. If the generation is omitted, the latest generation will be used.
object=kasd
- Cloud Storage object containing the source. This object must be a zipped (
.zip
) or gzipped archive file (.tar.gz
) containing source to build.
- Cloud Storage object containing the source. This object must be a zipped (
-
source-fetcher=at
- Optional. Option to specify the tool to fetch the source file for the build.
-
..storage-source-manifest bucket=rebum.
- Cloud Storage bucket containing the source manifest (see Bucket Name Requirements).
generation=invidunt
- Cloud Storage generation for the object. If the generation is omitted, the latest generation will be used.
-
object=gubergren
- Cloud Storage object containing the source manifest. This object must be a JSON file.
-
...source-provenance.resolved-connected-repository dir=kasd
- Directory, relative to the source root, in which to run the build.
repository=et
- Required. Name of the Google Cloud Build repository, formatted as
projects/*/locations/*/connections/*/repositories/*
.
- Required. Name of the Google Cloud Build repository, formatted as
-
revision=kasd
- The revision to fetch from the Git repository such as a branch, a tag, a commit SHA, or any Git ref.
-
..resolved-git-source dir=sit
- Directory, relative to the source root, in which to run the build. This must be a relative path. If a step's
dir
is specified and is an absolute path, this value is ignored for that step's execution.
- Directory, relative to the source root, in which to run the build. This must be a relative path. If a step's
revision=labore
- The revision to fetch from the Git repository such as a branch, a tag, a commit SHA, or any Git ref. Cloud Build uses
git fetch
to fetch the revision from the Git repository; therefore make sure that the string you provide forrevision
is parsable by the command. For information on string values accepted bygit fetch
, see https://git-scm.com/docs/gitrevisions#_specifying_revisions. For information ongit fetch
, see https://git-scm.com/docs/git-fetch.
- The revision to fetch from the Git repository such as a branch, a tag, a commit SHA, or any Git ref. Cloud Build uses
-
url=et
- Location of the Git repo to build. This will be used as a
git remote
, see https://git-scm.com/docs/git-remote.
- Location of the Git repo to build. This will be used as a
-
..resolved-repo-source branch-name=sed
- Regex matching branches to build. The syntax of the regular expressions accepted is the syntax accepted by RE2 and described at https://github.com/google/re2/wiki/Syntax
commit-sha=dolore
- Explicit commit SHA to build.
dir=dolores
- Directory, relative to the source root, in which to run the build. This must be a relative path. If a step's
dir
is specified and is an absolute path, this value is ignored for that step's execution.
- Directory, relative to the source root, in which to run the build. This must be a relative path. If a step's
invert-regex=false
- Only trigger a build if the revision regex does NOT match the revision regex.
project-id=no
- ID of the project that owns the Cloud Source Repository. If omitted, the project ID requesting the build is assumed.
repo-name=ut
- Name of the Cloud Source Repository.
substitutions=key=dolore
- Substitutions to use in a triggered build. Should only be used with RunBuildTrigger
- the value will be associated with the given
key
-
tag-name=takimata
- Regex matching tags to build. The syntax of the regular expressions accepted is the syntax accepted by RE2 and described at https://github.com/google/re2/wiki/Syntax
-
..resolved-storage-source bucket=invidunt
- Cloud Storage bucket containing the source (see Bucket Name Requirements).
generation=sed
- Cloud Storage generation for the object. If the generation is omitted, the latest generation will be used.
object=et
- Cloud Storage object containing the source. This object must be a zipped (
.zip
) or gzipped archive file (.tar.gz
) containing source to build.
- Cloud Storage object containing the source. This object must be a zipped (
-
source-fetcher=consetetur
- Optional. Option to specify the tool to fetch the source file for the build.
-
..resolved-storage-source-manifest bucket=lorem
- Cloud Storage bucket containing the source manifest (see Bucket Name Requirements).
generation=rebum.
- Cloud Storage generation for the object. If the generation is omitted, the latest generation will be used.
-
object=sadipscing
- Cloud Storage object containing the source manifest. This object must be a JSON file.
-
... start-time=stet
- Output only. Time at which execution of the build was started.
status=et
- Output only. Status of the build.
status-detail=diam
- Output only. Customer-readable message about the current status.
substitutions=key=et
- Substitutions data for
Build
resource. - the value will be associated with the given
key
- Substitutions data for
tags=labore
- Tags for annotation of a
Build
. These are not docker tags. - Each invocation of this argument appends the given value to the array.
- Tags for annotation of a
-
timeout=stet
- Amount of time that this build should be allowed to run, to second granularity. If this amount of time elapses, work on the build will cease and the build status will be
TIMEOUT
.timeout
starts ticking fromstartTime
. Default time is 60 minutes.
- Amount of time that this build should be allowed to run, to second granularity. If this amount of time elapses, work on the build will cease and the build status will be
-
.. create-time=dolor
- Output only. Time when the trigger was created.
description=sadipscing
- Human-readable description of this trigger.
disabled=true
- If true, the trigger will never automatically execute a build.
event-type=tempor
- EventType allows the user to explicitly set the type of event to which this BuildTrigger should respond. This field will be validated against the rest of the configuration if it is set.
filename=ipsum
- Path, from the source root, to the build configuration file (i.e. cloudbuild.yaml).
filter=diam
- A Common Expression Language string.
git-file-source bitbucket-server-config=ea
- The full resource name of the bitbucket server config. Format:
projects/{project}/locations/{location}/bitbucketServerConfigs/{id}
.
- The full resource name of the bitbucket server config. Format:
github-enterprise-config=erat
- The full resource name of the github enterprise config. Format:
projects/{project}/locations/{location}/githubEnterpriseConfigs/{id}
.projects/{project}/githubEnterpriseConfigs/{id}
.
- The full resource name of the github enterprise config. Format:
path=accusam
- The path of the file, with the repo root as the root of the path.
repo-type=magna
- See RepoType above.
repository=ipsum
- The fully qualified resource name of the Repos API repository. Either URI or repository can be specified. If unspecified, the repo from which the trigger invocation originated is assumed to be the repo from which to read the specified path.
revision=gubergren
- The branch, tag, arbitrary ref, or SHA version of the repo to use when resolving the filename (optional). This field respects the same syntax/resolution as described here: https://git-scm.com/docs/gitrevisions If unspecified, the revision from which the trigger invocation originated is assumed to be the revision from which to read the specified path.
-
uri=kasd
- The URI of the repo. Either uri or repository can be specified. If unspecified, the repo from which the trigger invocation originated is assumed to be the repo from which to read the specified path.
-
..github enterprise-config-resource-name=sit
- Optional. The resource name of the github enterprise config that should be applied to this installation. For example: "projects/{$project_id}/locations/{$location_id}/githubEnterpriseConfigs/{$config_id}"
installation-id=sed
- The installationID that emits the GitHub event.
name=ea
- Name of the repository. For example: The name for https://github.com/googlecloudplatform/cloud-builders is "cloud-builders".
owner=sit
- Owner of the repository. For example: The owner for https://github.com/googlecloudplatform/cloud-builders is "googlecloudplatform".
pull-request branch=lorem
- Regex of branches to match. The syntax of the regular expressions accepted is the syntax accepted by RE2 and described at https://github.com/google/re2/wiki/Syntax
comment-control=sed
- If CommentControl is enabled, depending on the setting, builds may not fire until a repository writer comments
/gcbrun
on a pull request or/gcbrun
is in the pull request description. Only PR comments that contain/gcbrun
will trigger builds. If CommentControl is set to disabled, comments with/gcbrun
from a user with repository write permission or above will still trigger builds to run.
- If CommentControl is enabled, depending on the setting, builds may not fire until a repository writer comments
-
invert-regex=false
- If true, branches that do NOT match the git_ref will trigger a build.
-
..push branch=justo
- Regexes matching branches to build. The syntax of the regular expressions accepted is the syntax accepted by RE2 and described at https://github.com/google/re2/wiki/Syntax
invert-regex=true
- When true, only trigger a build if the revision regex does NOT match the git_ref regex.
-
tag=justo
- Regexes matching tags to build. The syntax of the regular expressions accepted is the syntax accepted by RE2 and described at https://github.com/google/re2/wiki/Syntax
-
...gitlab-enterprise-events-config.gitlab-config create-time=est
- Output only. Time when the config was created.
enterprise-config host-uri=sea
- Immutable. The URI of the GitlabEnterprise host.
-
service-directory-config service=magna
- The Service Directory service name. Format: projects/{project}/locations/{location}/namespaces/{namespace}/services/{service}.
-
.. ssl-ca=et
- The SSL certificate to use in requests to GitLab Enterprise instances.
-
.. name=ipsum
- The resource name for the config.
secrets api-access-token-version=ipsum
- Required. The resource name for the api access token’s secret version
api-key-version=dolor
- Required. Immutable. API Key that will be attached to webhook requests from GitLab to Cloud Build.
read-access-token-version=elitr
- Required. The resource name for the read access token’s secret version
-
webhook-secret-version=et
- Required. Immutable. The resource name for the webhook secret’s secret version. Once this field has been set, it cannot be changed. If you need to change it, please create another GitLabConfig.
-
.. username=amet.
- Username of the GitLab.com or GitLab Enterprise account Cloud Build will use.
-
webhook-key=duo
- Output only. UUID included in webhook requests. The UUID is used to look up the corresponding config.
-
.. gitlab-config-resource=dolore
- The GitLab config resource that this trigger config maps to.
project-namespace=takimata
- Namespace of the GitLab project.
pull-request branch=justo
- Regex of branches to match. The syntax of the regular expressions accepted is the syntax accepted by RE2 and described at https://github.com/google/re2/wiki/Syntax
comment-control=eirmod
- If CommentControl is enabled, depending on the setting, builds may not fire until a repository writer comments
/gcbrun
on a pull request or/gcbrun
is in the pull request description. Only PR comments that contain/gcbrun
will trigger builds. If CommentControl is set to disabled, comments with/gcbrun
from a user with repository write permission or above will still trigger builds to run.
- If CommentControl is enabled, depending on the setting, builds may not fire until a repository writer comments
-
invert-regex=true
- If true, branches that do NOT match the git_ref will trigger a build.
-
..push branch=et
- Regexes matching branches to build. The syntax of the regular expressions accepted is the syntax accepted by RE2 and described at https://github.com/google/re2/wiki/Syntax
invert-regex=false
- When true, only trigger a build if the revision regex does NOT match the git_ref regex.
-
tag=lorem
- Regexes matching tags to build. The syntax of the regular expressions accepted is the syntax accepted by RE2 and described at https://github.com/google/re2/wiki/Syntax
-
... id=et
- Output only. Unique identifier of the trigger.
ignored-files=lorem
- ignored_files and included_files are file glob matches using https://golang.org/pkg/path/filepath/#Match extended with support for "**". If ignored_files and changed files are both empty, then they are not used to determine whether or not to trigger a build. If ignored_files is not empty, then we ignore any files that match any of the ignored_file globs. If the change has no files that are outside of the ignored_files globs, then we do not trigger a build.
- Each invocation of this argument appends the given value to the array.
include-build-logs=dolores
- If set to INCLUDE_BUILD_LOGS_WITH_STATUS, log url will be shown on GitHub page when build status is final. Setting this field to INCLUDE_BUILD_LOGS_WITH_STATUS for non GitHub triggers results in INVALID_ARGUMENT error.
included-files=eos
- If any of the files altered in the commit pass the ignored_files filter and included_files is empty, then as far as this filter is concerned, we should trigger the build. If any of the files altered in the commit pass the ignored_files filter and included_files is not empty, then we make sure that at least one of those files matches a included_files glob. If not, then we do not trigger a build.
- Each invocation of this argument appends the given value to the array.
name=magna
- User-assigned name of the trigger. Must be unique within the project. Trigger names must meet the following requirements: + They must contain only alphanumeric characters and dashes. + They can be 1-64 characters long. + They must begin and end with an alphanumeric character.
pubsub-config service-account-email=stet
- Service account that will make the push request.
state=kasd
- Potential issues with the underlying Pub/Sub subscription configuration. Only populated on get requests.
subscription=stet
- Output only. Name of the subscription. Format is
projects/{project}/subscriptions/{subscription}
.
- Output only. Name of the subscription. Format is
-
topic=sed
- The name of the topic from which this subscription is receiving messages. Format is
projects/{project}/topics/{topic}
.
- The name of the topic from which this subscription is receiving messages. Format is
-
..repository-event-config.pull-request branch=eirmod
- Regex of branches to match. The syntax of the regular expressions accepted is the syntax accepted by RE2 and described at https://github.com/google/re2/wiki/Syntax
comment-control=ea
- If CommentControl is enabled, depending on the setting, builds may not fire until a repository writer comments
/gcbrun
on a pull request or/gcbrun
is in the pull request description. Only PR comments that contain/gcbrun
will trigger builds. If CommentControl is set to disabled, comments with/gcbrun
from a user with repository write permission or above will still trigger builds to run.
- If CommentControl is enabled, depending on the setting, builds may not fire until a repository writer comments
-
invert-regex=true
- If true, branches that do NOT match the git_ref will trigger a build.
-
..push branch=ea
- Regexes matching branches to build. The syntax of the regular expressions accepted is the syntax accepted by RE2 and described at https://github.com/google/re2/wiki/Syntax
invert-regex=false
- When true, only trigger a build if the revision regex does NOT match the git_ref regex.
-
tag=dolores
- Regexes matching tags to build. The syntax of the regular expressions accepted is the syntax accepted by RE2 and described at https://github.com/google/re2/wiki/Syntax
-
.. repository=justo
- The resource name of the Repo API resource.
-
repository-type=clita
- Output only. The type of the SCM vendor the repository points to.
-
.. resource-name=stet
- The
Trigger
name with format:projects/{project}/locations/{location}/triggers/{trigger}
, where {trigger} is a unique identifier generated by the service.
- The
service-account=sea
- The service account used for all user-controlled operations including UpdateBuildTrigger, RunBuildTrigger, CreateBuild, and CancelBuild. If no service account is set, then the standard Cloud Build service account ([PROJECT_NUM]@system.gserviceaccount.com) will be used instead. Format:
projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT_ID_OR_EMAIL}
- The service account used for all user-controlled operations including UpdateBuildTrigger, RunBuildTrigger, CreateBuild, and CancelBuild. If no service account is set, then the standard Cloud Build service account ([PROJECT_NUM]@system.gserviceaccount.com) will be used instead. Format:
source-to-build bitbucket-server-config=sit
- The full resource name of the bitbucket server config. Format:
projects/{project}/locations/{location}/bitbucketServerConfigs/{id}
.
- The full resource name of the bitbucket server config. Format:
github-enterprise-config=sed
- The full resource name of the github enterprise config. Format:
projects/{project}/locations/{location}/githubEnterpriseConfigs/{id}
.projects/{project}/githubEnterpriseConfigs/{id}
.
- The full resource name of the github enterprise config. Format:
ref=et
- The branch or tag to use. Must start with "refs/" (required).
repo-type=no
- See RepoType below.
repository=sit
- The connected repository resource name, in the format
projects/*/locations/*/connections/*/repositories/*
. Eitheruri
orrepository
can be specified and is required.
- The connected repository resource name, in the format
-
uri=labore
- The URI of the repo (e.g. https://github.com/user/repo.git). Either
uri
orrepository
can be specified and is required.
- The URI of the repo (e.g. https://github.com/user/repo.git). Either
-
.. substitutions=key=sea
- Substitutions for Build resource. The keys must match the following regular expression:
^_[A-Z0-9_]+$
. - the value will be associated with the given
key
- Substitutions for Build resource. The keys must match the following regular expression:
tags=sea
- Tags for annotation of a
BuildTrigger
- Each invocation of this argument appends the given value to the array.
- Tags for annotation of a
trigger-template branch-name=sadipscing
- Regex matching branches to build. The syntax of the regular expressions accepted is the syntax accepted by RE2 and described at https://github.com/google/re2/wiki/Syntax
commit-sha=justo
- Explicit commit SHA to build.
dir=aliquyam
- Directory, relative to the source root, in which to run the build. This must be a relative path. If a step's
dir
is specified and is an absolute path, this value is ignored for that step's execution.
- Directory, relative to the source root, in which to run the build. This must be a relative path. If a step's
invert-regex=false
- Only trigger a build if the revision regex does NOT match the revision regex.
project-id=duo
- ID of the project that owns the Cloud Source Repository. If omitted, the project ID requesting the build is assumed.
repo-name=labore
- Name of the Cloud Source Repository.
substitutions=key=eos
- Substitutions to use in a triggered build. Should only be used with RunBuildTrigger
- the value will be associated with the given
key
-
tag-name=invidunt
- Regex matching tags to build. The syntax of the regular expressions accepted is the syntax accepted by RE2 and described at https://github.com/google/re2/wiki/Syntax
-
..webhook-config secret=at
- Required. Resource name for the secret required as a URL parameter.
state=sea
- Potential issues with the underlying Pub/Sub subscription configuration. Only populated on get requests.
About Cursors
The cursor position is key to comfortably set complex nested structures. The following rules apply:
- The cursor position is always set relative to the current one, unless the field name starts with the
.
character. Fields can be nested such as in-r f.s.o
. - The cursor position is set relative to the top-level structure if it starts with
.
, e.g.-r .s.s
- You can also set nested fields without setting the cursor explicitly. For example, to set a value relative to the current cursor position, you would specify
-r struct.sub_struct=bar
. - You can move the cursor one level up by using
..
. Each additional.
moves it up one additional level. E.g....
would go three levels up.
Optional Output Flags
The method's return value a JSON encoded structure, which will be written to standard output by default.
- -o out
- out specifies the destination to which to write the server's result to.
It will be a JSON-encoded structure.
The destination may be
-
to indicate standard output, or a filepath that is to contain the received bytes. If unset, it defaults to standard output.
- out specifies the destination to which to write the server's result to.
It will be a JSON-encoded structure.
The destination may be
Optional Method Properties
You may set the following properties to further configure the call. Please note that -p
is followed by one
or more key-value-pairs, and is called like this -p k1=v1 k2=v2
even though the listing below repeats the
-p
for completeness.
- -p parent=string
- The parent resource where this trigger will be created. Format:
projects/{project}/locations/{location}
- The parent resource where this trigger will be created. Format:
Optional General Properties
The following properties can configure any call, and are not specific to this method.
-
-p $-xgafv=string
- V1 error format.
-
-p access-token=string
- OAuth access token.
-
-p alt=string
- Data format for response.
-
-p callback=string
- JSONP
-
-p fields=string
- Selector specifying which fields to include in a partial response.
-
-p key=string
- API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
-
-p oauth-token=string
- OAuth 2.0 token for the current user.
-
-p pretty-print=boolean
- Returns response with indentations and line breaks.
-
-p quota-user=string
- Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
-
-p upload-type=string
- Legacy upload protocol for media (e.g. "media", "multipart").
-
-p upload-protocol=string
- Upload protocol for media (e.g. "raw", "multipart").