1apiVersion: apiextensions.k8s.io/v1
2kind: CustomResourceDefinition
3metadata:
4 annotations:
5 cnrm.cloud.google.com/version: 0.0.0-dev
6 creationTimestamp: null
7 labels:
8 cnrm.cloud.google.com/managed-by-kcc: "true"
9 cnrm.cloud.google.com/stability-level: stable
10 cnrm.cloud.google.com/system: "true"
11 cnrm.cloud.google.com/tf2crd: "true"
12 name: cloudbuildtriggers.cloudbuild.cnrm.cloud.google.com
13spec:
14 group: cloudbuild.cnrm.cloud.google.com
15 names:
16 categories:
17 - gcp
18 kind: CloudBuildTrigger
19 plural: cloudbuildtriggers
20 shortNames:
21 - gcpcloudbuildtrigger
22 - gcpcloudbuildtriggers
23 singular: cloudbuildtrigger
24 preserveUnknownFields: false
25 scope: Namespaced
26 versions:
27 - additionalPrinterColumns:
28 - jsonPath: .metadata.creationTimestamp
29 name: Age
30 type: date
31 - description: When 'True', the most recent reconcile of the resource succeeded
32 jsonPath: .status.conditions[?(@.type=='Ready')].status
33 name: Ready
34 type: string
35 - description: The reason for the value in 'Ready'
36 jsonPath: .status.conditions[?(@.type=='Ready')].reason
37 name: Status
38 type: string
39 - description: The last transition time for the value in 'Status'
40 jsonPath: .status.conditions[?(@.type=='Ready')].lastTransitionTime
41 name: Status Age
42 type: date
43 name: v1beta1
44 schema:
45 openAPIV3Schema:
46 properties:
47 apiVersion:
48 description: 'apiVersion defines the versioned schema of this representation
49 of an object. Servers should convert recognized schemas to the latest
50 internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources'
51 type: string
52 kind:
53 description: 'kind is a string value representing the REST resource this
54 object represents. Servers may infer this from the endpoint the client
55 submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds'
56 type: string
57 metadata:
58 type: object
59 spec:
60 properties:
61 approvalConfig:
62 description: |-
63 Configuration for manual approval to start a build invocation of this BuildTrigger.
64 Builds created by this trigger will require approval before they execute.
65 Any user with a Cloud Build Approver role for the project can approve a build.
66 properties:
67 approvalRequired:
68 description: |-
69 Whether or not approval is needed. If this is set on a build, it will become pending when run,
70 and will need to be explicitly approved to start.
71 type: boolean
72 type: object
73 bitbucketServerTriggerConfig:
74 description: BitbucketServerTriggerConfig describes the configuration
75 of a trigger that creates a build whenever a Bitbucket Server event
76 is received.
77 properties:
78 bitbucketServerConfigResourceRef:
79 description: |-
80 Only `external` field is supported to configure the reference.
81
82 The full resource name of the bitbucket server config. Format:
83 projects/{project}/locations/{location}/bitbucketServerConfigs/{id}.
84 oneOf:
85 - not:
86 required:
87 - external
88 required:
89 - name
90 - not:
91 anyOf:
92 - required:
93 - name
94 - required:
95 - namespace
96 required:
97 - external
98 properties:
99 external:
100 description: 'Allowed value: The `name` field of a `CloudBuildBitbucketServerConfig`
101 resource.'
102 type: string
103 name:
104 description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names'
105 type: string
106 namespace:
107 description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/'
108 type: string
109 type: object
110 projectKey:
111 description: 'Key of the project that the repo is in. For example:
112 The key for https://mybitbucket.server/projects/TEST/repos/test-repo
113 is "TEST".'
114 type: string
115 pullRequest:
116 description: Filter to match changes in pull requests.
117 properties:
118 branch:
119 description: |-
120 Regex of branches to match.
121 The syntax of the regular expressions accepted is the syntax accepted by RE2 and described at https://github.com/google/re2/wiki/Syntax.
122 type: string
123 commentControl:
124 description: 'Configure builds to run whether a repository
125 owner or collaborator need to comment /gcbrun. Possible
126 values: ["COMMENTS_DISABLED", "COMMENTS_ENABLED", "COMMENTS_ENABLED_FOR_EXTERNAL_CONTRIBUTORS_ONLY"].'
127 type: string
128 invertRegex:
129 description: If true, branches that do NOT match the git_ref
130 will trigger a build.
131 type: boolean
132 required:
133 - branch
134 type: object
135 push:
136 description: Filter to match changes in refs like branches, tags.
137 properties:
138 branch:
139 description: Regex of branches to match. Specify only one
140 of branch or tag.
141 type: string
142 invertRegex:
143 description: When true, only trigger a build if the revision
144 regex does NOT match the gitRef regex.
145 type: boolean
146 tag:
147 description: Regex of tags to match. Specify only one of
148 branch or tag.
149 type: string
150 type: object
151 repoSlug:
152 description: |-
153 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.
154 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.
155 type: string
156 required:
157 - bitbucketServerConfigResourceRef
158 - projectKey
159 - repoSlug
160 type: object
161 build:
162 description: Contents of the build template. Either a filename or
163 build template must be provided.
164 properties:
165 artifacts:
166 description: Artifacts produced by the build that should be uploaded
167 upon successful completion of all build steps.
168 properties:
169 images:
170 description: |-
171 A list of images to be pushed upon the successful completion of all build steps.
172
173 The images will be pushed using the builder service account's credentials.
174
175 The digests of the pushed images will be stored in the Build resource's results field.
176
177 If any of the images fail to be pushed, the build is marked FAILURE.
178 items:
179 type: string
180 type: array
181 objects:
182 description: |-
183 A list of objects to be uploaded to Cloud Storage upon successful completion of all build steps.
184
185 Files in the workspace matching specified paths globs will be uploaded to the
186 Cloud Storage location using the builder service account's credentials.
187
188 The location and generation of the uploaded objects will be stored in the Build resource's results field.
189
190 If any objects fail to be pushed, the build is marked FAILURE.
191 properties:
192 location:
193 description: |-
194 Cloud Storage bucket and optional object path, in the form "gs://bucket/path/to/somewhere/".
195
196 Files in the workspace matching any path pattern will be uploaded to Cloud Storage with
197 this location as a prefix.
198 type: string
199 paths:
200 description: Path globs used to match files in the build's
201 workspace.
202 items:
203 type: string
204 type: array
205 timing:
206 description: Output only. Stores timing information for
207 pushing all artifact objects.
208 items:
209 properties:
210 endTime:
211 description: |-
212 End of time span.
213
214 A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to
215 nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".
216 type: string
217 startTime:
218 description: |-
219 Start of time span.
220
221 A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to
222 nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".
223 type: string
224 type: object
225 type: array
226 type: object
227 type: object
228 availableSecrets:
229 description: Secrets and secret environment variables.
230 properties:
231 secretManager:
232 description: Pairs a secret environment variable with a SecretVersion
233 in Secret Manager.
234 items:
235 properties:
236 env:
237 description: |-
238 Environment variable name to associate with the secret. Secret environment
239 variables must be unique across all of a build's secrets, and must be used
240 by at least one build step.
241 type: string
242 versionRef:
243 oneOf:
244 - not:
245 required:
246 - external
247 required:
248 - name
249 - not:
250 anyOf:
251 - required:
252 - name
253 - required:
254 - namespace
255 required:
256 - external
257 properties:
258 external:
259 description: 'Allowed value: The `name` field of
260 a `SecretManagerSecretVersion` resource.'
261 type: string
262 name:
263 description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names'
264 type: string
265 namespace:
266 description: 'Namespace of the referent. More info:
267 https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/'
268 type: string
269 type: object
270 required:
271 - env
272 - versionRef
273 type: object
274 type: array
275 required:
276 - secretManager
277 type: object
278 images:
279 description: |-
280 A list of images to be pushed upon the successful completion of all build steps.
281 The images are pushed using the builder service account's credentials.
282 The digests of the pushed images will be stored in the Build resource's results field.
283 If any of the images fail to be pushed, the build status is marked FAILURE.
284 items:
285 type: string
286 type: array
287 logsBucketRef:
288 description: |-
289 Google Cloud Storage bucket where logs should be written. Logs file
290 names will be of the format ${logsBucket}/log-${build_id}.txt.
291 oneOf:
292 - not:
293 required:
294 - external
295 required:
296 - name
297 - not:
298 anyOf:
299 - required:
300 - name
301 - required:
302 - namespace
303 required:
304 - external
305 properties:
306 external:
307 description: 'Allowed value: The `url` field of a `StorageBucket`
308 resource.'
309 type: string
310 name:
311 description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names'
312 type: string
313 namespace:
314 description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/'
315 type: string
316 type: object
317 options:
318 description: Special options for this build.
319 properties:
320 diskSizeGb:
321 description: |-
322 Requested disk size for the VM that runs the build. Note that this is NOT "disk free";
323 some of the space will be used by the operating system and build utilities.
324 Also note that this is the minimum disk size that will be allocated for the build --
325 the build may run with a larger disk than requested. At present, the maximum disk size
326 is 1000GB; builds that request more than the maximum are rejected with an error.
327 type: integer
328 dynamicSubstitutions:
329 description: |-
330 Option to specify whether or not to apply bash style string operations to the substitutions.
331
332 NOTE this is always enabled for triggered builds and cannot be overridden in the build configuration file.
333 type: boolean
334 env:
335 description: |-
336 A list of global environment variable definitions that will exist for all build steps
337 in this build. If a variable is defined in both globally and in a build step,
338 the variable will use the build step value.
339
340 The elements are of the form "KEY=VALUE" for the environment variable "KEY" being given the value "VALUE".
341 items:
342 type: string
343 type: array
344 logStreamingOption:
345 description: 'Option to define build log streaming behavior
346 to Google Cloud Storage. Possible values: ["STREAM_DEFAULT",
347 "STREAM_ON", "STREAM_OFF"].'
348 type: string
349 logging:
350 description: 'Option to specify the logging mode, which determines
351 if and where build logs are stored. Possible values: ["LOGGING_UNSPECIFIED",
352 "LEGACY", "GCS_ONLY", "STACKDRIVER_ONLY", "CLOUD_LOGGING_ONLY",
353 "NONE"].'
354 type: string
355 machineType:
356 description: 'Compute Engine machine type on which to run
357 the build. Possible values: ["UNSPECIFIED", "N1_HIGHCPU_8",
358 "N1_HIGHCPU_32", "E2_HIGHCPU_8", "E2_HIGHCPU_32"].'
359 type: string
360 requestedVerifyOption:
361 description: 'Requested verifiability options. Possible values:
362 ["NOT_VERIFIED", "VERIFIED"].'
363 type: string
364 secretEnv:
365 description: |-
366 A list of global environment variables, which are encrypted using a Cloud Key Management
367 Service crypto key. These values must be specified in the build's Secret. These variables
368 will be available to all build steps in this build.
369 items:
370 type: string
371 type: array
372 sourceProvenanceHash:
373 description: 'Requested hash for SourceProvenance. Possible
374 values: ["NONE", "SHA256", "MD5"].'
375 items:
376 type: string
377 type: array
378 substitutionOption:
379 description: |-
380 Option to specify behavior when there is an error in the substitution checks.
381
382 NOTE this is always set to ALLOW_LOOSE for triggered builds and cannot be overridden
383 in the build configuration file. Possible values: ["MUST_MATCH", "ALLOW_LOOSE"].
384 type: string
385 volumes:
386 description: |-
387 Global list of volumes to mount for ALL build steps
388
389 Each volume is created as an empty volume prior to starting the build process.
390 Upon completion of the build, volumes and their contents are discarded. Global
391 volume names and paths cannot conflict with the volumes defined a build step.
392
393 Using a global volume in a build with only one step is not valid as it is indicative
394 of a build request with an incorrect configuration.
395 items:
396 properties:
397 name:
398 description: |-
399 Name of the volume to mount.
400
401 Volume names must be unique per build step and must be valid names for Docker volumes.
402 Each named volume must be used by at least two build steps.
403 type: string
404 path:
405 description: |-
406 Path at which to mount the volume.
407
408 Paths must be absolute and cannot conflict with other volume paths on the same
409 build step or with certain reserved volume paths.
410 type: string
411 type: object
412 type: array
413 workerPool:
414 description: |-
415 Option to specify a WorkerPool for the build. Format projects/{project}/workerPools/{workerPool}
416
417 This field is experimental.
418 type: string
419 type: object
420 queueTtl:
421 description: |-
422 TTL in queue for this build. If provided and the build is enqueued longer than this value,
423 the build will expire and the build status will be EXPIRED.
424 The TTL starts ticking from createTime.
425 A duration in seconds with up to nine fractional digits, terminated by 's'. Example: "3.5s".
426 type: string
427 secret:
428 description: Secrets to decrypt using Cloud Key Management Service.
429 items:
430 properties:
431 kmsKeyRef:
432 description: KMS crypto key to use to decrypt these envs.
433 oneOf:
434 - not:
435 required:
436 - external
437 required:
438 - name
439 - not:
440 anyOf:
441 - required:
442 - name
443 - required:
444 - namespace
445 required:
446 - external
447 properties:
448 external:
449 description: 'Allowed value: The `selfLink` field of
450 a `KMSCryptoKey` resource.'
451 type: string
452 name:
453 description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names'
454 type: string
455 namespace:
456 description: 'Namespace of the referent. More info:
457 https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/'
458 type: string
459 type: object
460 secretEnv:
461 additionalProperties:
462 type: string
463 description: |-
464 Map of environment variable name to its encrypted value.
465 Secret environment variables must be unique across all of a build's secrets,
466 and must be used by at least one build step. Values can be at most 64 KB in size.
467 There can be at most 100 secret values across all of a build's secrets.
468 type: object
469 required:
470 - kmsKeyRef
471 type: object
472 type: array
473 source:
474 description: |-
475 The location of the source files to build.
476
477 One of 'storageSource' or 'repoSource' must be provided.
478 properties:
479 repoSource:
480 description: Location of the source in a Google Cloud Source
481 Repository.
482 properties:
483 branchName:
484 description: |-
485 Regex matching branches to build. Exactly one a of branch name, tag, or commit SHA must be provided.
486 The syntax of the regular expressions accepted is the syntax accepted by RE2 and
487 described at https://github.com/google/re2/wiki/Syntax.
488 type: string
489 commitSha:
490 description: Explicit commit SHA to build. Exactly one
491 a of branch name, tag, or commit SHA must be provided.
492 type: string
493 dir:
494 description: |-
495 Directory, relative to the source root, in which to run the build.
496 This must be a relative path. If a step's dir is specified and is an absolute path,
497 this value is ignored for that step's execution.
498 type: string
499 invertRegex:
500 description: Only trigger a build if the revision regex
501 does NOT match the revision regex.
502 type: boolean
503 projectId:
504 description: |-
505 ID of the project that owns the Cloud Source Repository.
506 If omitted, the project ID requesting the build is assumed.
507 type: string
508 repoRef:
509 description: |-
510 The desired Cloud Source Repository. If omitted, "default" is
511 assumed.
512 oneOf:
513 - not:
514 required:
515 - external
516 required:
517 - name
518 - not:
519 anyOf:
520 - required:
521 - name
522 - required:
523 - namespace
524 required:
525 - external
526 properties:
527 external:
528 description: 'Allowed value: The `name` field of a
529 `SourceRepoRepository` resource.'
530 type: string
531 name:
532 description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names'
533 type: string
534 namespace:
535 description: 'Namespace of the referent. More info:
536 https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/'
537 type: string
538 type: object
539 substitutions:
540 additionalProperties:
541 type: string
542 description: Substitutions to use in a triggered build.
543 Should only be used with triggers.run.
544 type: object
545 tagName:
546 description: |-
547 Regex matching tags to build. Exactly one a of branch name, tag, or commit SHA must be provided.
548 The syntax of the regular expressions accepted is the syntax accepted by RE2 and
549 described at https://github.com/google/re2/wiki/Syntax.
550 type: string
551 required:
552 - repoRef
553 type: object
554 storageSource:
555 description: Location of the source in an archive file in
556 Google Cloud Storage.
557 properties:
558 bucketRef:
559 description: Google Cloud Storage bucket containing the
560 source.
561 oneOf:
562 - not:
563 required:
564 - external
565 required:
566 - name
567 - not:
568 anyOf:
569 - required:
570 - name
571 - required:
572 - namespace
573 required:
574 - external
575 properties:
576 external:
577 description: 'Allowed value: The `name` field of a
578 `StorageBucket` resource.'
579 type: string
580 name:
581 description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names'
582 type: string
583 namespace:
584 description: 'Namespace of the referent. More info:
585 https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/'
586 type: string
587 type: object
588 generation:
589 description: |-
590 Google Cloud Storage generation for the object.
591 If the generation is omitted, the latest generation will be used.
592 type: string
593 object:
594 description: |-
595 Google Cloud Storage object containing the source.
596 This object must be a gzipped archive file (.tar.gz) containing source to build.
597 type: string
598 required:
599 - bucketRef
600 - object
601 type: object
602 type: object
603 step:
604 description: The operations to be performed on the workspace.
605 items:
606 properties:
607 allowExitCodes:
608 description: |-
609 Allow this build step to fail without failing the entire build if and
610 only if the exit code is one of the specified codes.
611
612 If 'allowFailure' is also specified, this field will take precedence.
613 items:
614 type: integer
615 type: array
616 allowFailure:
617 description: |-
618 Allow this build step to fail without failing the entire build.
619 If false, the entire build will fail if this step fails. Otherwise, the
620 build will succeed, but this step will still have a failure status.
621 Error information will be reported in the 'failureDetail' field.
622
623 'allowExitCodes' takes precedence over this field.
624 type: boolean
625 args:
626 description: |-
627 A list of arguments that will be presented to the step when it is started.
628
629 If the image used to run the step's container has an entrypoint, the args
630 are used as arguments to that entrypoint. If the image does not define an
631 entrypoint, the first element in args is used as the entrypoint, and the
632 remainder will be used as arguments.
633 items:
634 type: string
635 type: array
636 dir:
637 description: |-
638 Working directory to use when running this step's container.
639
640 If this value is a relative path, it is relative to the build's working
641 directory. If this value is absolute, it may be outside the build's working
642 directory, in which case the contents of the path may not be persisted
643 across build step executions, unless a 'volume' for that path is specified.
644
645 If the build specifies a 'RepoSource' with 'dir' and a step with a
646 'dir',
647 which specifies an absolute path, the 'RepoSource' 'dir' is ignored
648 for the step's execution.
649 type: string
650 entrypoint:
651 description: |-
652 Entrypoint to be used instead of the build step image's
653 default entrypoint.
654 If unset, the image's default entrypoint is used.
655 type: string
656 env:
657 description: |-
658 A list of environment variable definitions to be used when
659 running a step.
660
661 The elements are of the form "KEY=VALUE" for the environment variable
662 "KEY" being given the value "VALUE".
663 items:
664 type: string
665 type: array
666 id:
667 description: |-
668 Unique identifier for this build step, used in 'wait_for' to
669 reference this build step as a dependency.
670 type: string
671 name:
672 description: |-
673 The name of the container image that will run this particular build step.
674
675 If the image is available in the host's Docker daemon's cache, it will be
676 run directly. If not, the host will attempt to pull the image first, using
677 the builder service account's credentials if necessary.
678
679 The Docker daemon's cache will already have the latest versions of all of
680 the officially supported build steps (see https://github.com/GoogleCloudPlatform/cloud-builders
681 for images and examples).
682 The Docker daemon will also have cached many of the layers for some popular
683 images, like "ubuntu", "debian", but they will be refreshed at the time
684 you attempt to use them.
685
686 If you built an image in a previous build step, it will be stored in the
687 host's Docker daemon's cache and is available to use as the name for a
688 later build step.
689 type: string
690 script:
691 description: |-
692 A shell script to be executed in the step.
693 When script is provided, the user cannot specify the entrypoint or args.
694 type: string
695 secretEnv:
696 description: |-
697 A list of environment variables which are encrypted using
698 a Cloud Key
699 Management Service crypto key. These values must be specified in
700 the build's 'Secret'.
701 items:
702 type: string
703 type: array
704 timeout:
705 description: |-
706 Time limit for executing this build step. If not defined,
707 the step has no
708 time limit and will be allowed to continue to run until either it
709 completes or the build itself times out.
710 type: string
711 timing:
712 description: |-
713 Output only. Stores timing information for executing this
714 build step.
715 type: string
716 volumes:
717 description: |-
718 List of volumes to mount into the build step.
719
720 Each volume is created as an empty volume prior to execution of the
721 build step. Upon completion of the build, volumes and their contents
722 are discarded.
723
724 Using a named volume in only one step is not valid as it is
725 indicative of a build request with an incorrect configuration.
726 items:
727 properties:
728 name:
729 description: |-
730 Name of the volume to mount.
731
732 Volume names must be unique per build step and must be valid names for
733 Docker volumes. Each named volume must be used by at least two build steps.
734 type: string
735 path:
736 description: |-
737 Path at which to mount the volume.
738
739 Paths must be absolute and cannot conflict with other volume paths on
740 the same build step or with certain reserved volume paths.
741 type: string
742 required:
743 - name
744 - path
745 type: object
746 type: array
747 waitFor:
748 description: |-
749 The ID(s) of the step(s) that this build step depends on.
750
751 This build step will not start until all the build steps in 'wait_for'
752 have completed successfully. If 'wait_for' is empty, this build step
753 will start when all previous build steps in the 'Build.Steps' list
754 have completed successfully.
755 items:
756 type: string
757 type: array
758 required:
759 - name
760 type: object
761 type: array
762 substitutions:
763 additionalProperties:
764 type: string
765 description: Substitutions data for Build resource.
766 type: object
767 tags:
768 description: Tags for annotation of a Build. These are not docker
769 tags.
770 items:
771 type: string
772 type: array
773 timeout:
774 description: |-
775 Amount of time that this build should be allowed to run, to second granularity.
776 If this amount of time elapses, work on the build will cease and the build status will be TIMEOUT.
777 This timeout must be equal to or greater than the sum of the timeouts for build steps within the build.
778 The expected format is the number of seconds followed by s.
779 Default time is ten minutes (600s).
780 type: string
781 required:
782 - step
783 type: object
784 description:
785 description: Human-readable description of the trigger.
786 type: string
787 disabled:
788 description: Whether the trigger is disabled or not. If true, the
789 trigger will never result in a build.
790 type: boolean
791 filename:
792 description: |-
793 Path, from the source root, to a file whose contents is used for the template.
794 Either a filename or build template must be provided. Set this only when using trigger_template or github.
795 When using Pub/Sub, Webhook or Manual set the file name using git_file_source instead.
796 type: string
797 filter:
798 description: A Common Expression Language string. Used only with Pub/Sub
799 and Webhook.
800 type: string
801 gitFileSource:
802 description: The file source describing the local or remote Build
803 template.
804 properties:
805 githubEnterpriseConfigRef:
806 description: |-
807 Only `external` field is supported to configure the reference.
808
809 The full resource name of the github enterprise config. Format:
810 projects/{project}/locations/{location}/githubEnterpriseConfigs/{id}.
811 oneOf:
812 - not:
813 required:
814 - external
815 required:
816 - name
817 - not:
818 anyOf:
819 - required:
820 - name
821 - required:
822 - namespace
823 required:
824 - external
825 properties:
826 external:
827 description: 'Allowed value: The `name` field of a `CloudBuildGithubEnterpriseConfig`
828 resource.'
829 type: string
830 name:
831 description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names'
832 type: string
833 namespace:
834 description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/'
835 type: string
836 type: object
837 path:
838 description: The path of the file, with the repo root as the root
839 of the path.
840 type: string
841 repoType:
842 description: |-
843 The type of the repo, since it may not be explicit from the repo field (e.g from a URL).
844 Values can be UNKNOWN, CLOUD_SOURCE_REPOSITORIES, GITHUB, BITBUCKET_SERVER Possible values: ["UNKNOWN", "CLOUD_SOURCE_REPOSITORIES", "GITHUB", "BITBUCKET_SERVER"].
845 type: string
846 repositoryRef:
847 description: |-
848 Only `external` field is supported to configure the reference.
849
850 The fully qualified resource name of the Repo API repository. The fully qualified resource name of the Repo API repository.
851 If unspecified, the repo from which the trigger invocation originated is assumed to be the repo from which to read the specified path.
852 oneOf:
853 - not:
854 required:
855 - external
856 required:
857 - name
858 - not:
859 anyOf:
860 - required:
861 - name
862 - required:
863 - namespace
864 required:
865 - external
866 properties:
867 external:
868 description: 'Allowed value: The `name` field of a `CloudBuildV2Repository`
869 resource.'
870 type: string
871 name:
872 description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names'
873 type: string
874 namespace:
875 description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/'
876 type: string
877 type: object
878 revision:
879 description: |-
880 The branch, tag, arbitrary ref, or SHA version of the repo to use when resolving the
881 filename (optional). This field respects the same syntax/resolution as described here: https://git-scm.com/docs/gitrevisions
882 If unspecified, the revision from which the trigger invocation originated is assumed to be the revision from which to read the specified path.
883 type: string
884 uri:
885 description: |-
886 The URI of the repo (optional). If unspecified, the repo from which the trigger
887 invocation originated is assumed to be the repo from which to read the specified path.
888 type: string
889 required:
890 - path
891 - repoType
892 type: object
893 github:
894 description: |-
895 Describes the configuration of a trigger that creates a build whenever a GitHub event is received.
896
897 One of 'trigger_template', 'github', 'pubsub_config' or 'webhook_config' must be provided.
898 properties:
899 enterpriseConfigResourceNameRef:
900 description: |-
901 Only `external` field is supported to configure the reference.
902
903 The full resource name of the github enterprise config. Format:
904 projects/{project}/locations/{location}/githubEnterpriseConfigs/{id}.
905 oneOf:
906 - not:
907 required:
908 - external
909 required:
910 - name
911 - not:
912 anyOf:
913 - required:
914 - name
915 - required:
916 - namespace
917 required:
918 - external
919 properties:
920 external:
921 description: 'Allowed value: The `name` field of a `CloudBuildGithubEnterpriseConfig`
922 resource.'
923 type: string
924 name:
925 description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names'
926 type: string
927 namespace:
928 description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/'
929 type: string
930 type: object
931 name:
932 description: |-
933 Name of the repository. For example: The name for
934 https://github.com/googlecloudplatform/cloud-builders is "cloud-builders".
935 type: string
936 owner:
937 description: |-
938 Owner of the repository. For example: The owner for
939 https://github.com/googlecloudplatform/cloud-builders is "googlecloudplatform".
940 type: string
941 pullRequest:
942 description: filter to match changes in pull requests. Specify
943 only one of 'pull_request' or 'push'.
944 properties:
945 branch:
946 description: Regex of branches to match.
947 type: string
948 commentControl:
949 description: 'Whether to block builds on a "/gcbrun" comment
950 from a repository owner or collaborator. Possible values:
951 ["COMMENTS_DISABLED", "COMMENTS_ENABLED", "COMMENTS_ENABLED_FOR_EXTERNAL_CONTRIBUTORS_ONLY"].'
952 type: string
953 invertRegex:
954 description: If true, branches that do NOT match the git_ref
955 will trigger a build.
956 type: boolean
957 required:
958 - branch
959 type: object
960 push:
961 description: filter to match changes in refs, like branches or
962 tags. Specify only one of 'pull_request' or 'push'.
963 properties:
964 branch:
965 description: Regex of branches to match. Specify only one
966 of branch or tag.
967 type: string
968 invertRegex:
969 description: When true, only trigger a build if the revision
970 regex does NOT match the git_ref regex.
971 type: boolean
972 tag:
973 description: Regex of tags to match. Specify only one of
974 branch or tag.
975 type: string
976 type: object
977 type: object
978 ignoredFiles:
979 description: |-
980 ignoredFiles and includedFiles are file glob matches using https://golang.org/pkg/path/filepath/#Match
981 extended with support for '**'.
982
983 If ignoredFiles and changed files are both empty, then they are not
984 used to determine whether or not to trigger a build.
985
986 If ignoredFiles is not empty, then we ignore any files that match any
987 of the ignored_file globs. If the change has no files that are outside
988 of the ignoredFiles globs, then we do not trigger a build.
989 items:
990 type: string
991 type: array
992 includeBuildLogs:
993 description: |-
994 Build logs will be sent back to GitHub as part of the checkrun
995 result. Values can be INCLUDE_BUILD_LOGS_UNSPECIFIED or
996 INCLUDE_BUILD_LOGS_WITH_STATUS Possible values: ["INCLUDE_BUILD_LOGS_UNSPECIFIED", "INCLUDE_BUILD_LOGS_WITH_STATUS"].
997 type: string
998 includedFiles:
999 description: |-
1000 ignoredFiles and includedFiles are file glob matches using https://golang.org/pkg/path/filepath/#Match
1001 extended with support for '**'.
1002
1003 If any of the files altered in the commit pass the ignoredFiles filter
1004 and includedFiles is empty, then as far as this filter is concerned, we
1005 should trigger the build.
1006
1007 If any of the files altered in the commit pass the ignoredFiles filter
1008 and includedFiles is not empty, then we make sure that at least one of
1009 those files matches a includedFiles glob. If not, then we do not trigger
1010 a build.
1011 items:
1012 type: string
1013 type: array
1014 location:
1015 description: |-
1016 Immutable. The [Cloud Build location](https://cloud.google.com/build/docs/locations) for the trigger.
1017 If not specified, "global" is used.
1018 type: string
1019 pubsubConfig:
1020 description: |-
1021 PubsubConfig describes the configuration of a trigger that creates
1022 a build whenever a Pub/Sub message is published.
1023
1024 One of 'trigger_template', 'github', 'pubsub_config' 'webhook_config' or 'source_to_build' must be provided.
1025 properties:
1026 serviceAccountRef:
1027 description: Service account that will make the push request.
1028 oneOf:
1029 - not:
1030 required:
1031 - external
1032 required:
1033 - name
1034 - not:
1035 anyOf:
1036 - required:
1037 - name
1038 - required:
1039 - namespace
1040 required:
1041 - external
1042 properties:
1043 external:
1044 description: 'Allowed value: The `email` field of an `IAMServiceAccount`
1045 resource.'
1046 type: string
1047 name:
1048 description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names'
1049 type: string
1050 namespace:
1051 description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/'
1052 type: string
1053 type: object
1054 state:
1055 description: |-
1056 Potential issues with the underlying Pub/Sub subscription configuration.
1057 Only populated on get requests.
1058 type: string
1059 subscription:
1060 description: Output only. Name of the subscription.
1061 type: string
1062 topicRef:
1063 description: |-
1064 The name of the topic from which this subscription
1065 is receiving messages.
1066 oneOf:
1067 - not:
1068 required:
1069 - external
1070 required:
1071 - name
1072 - not:
1073 anyOf:
1074 - required:
1075 - name
1076 - required:
1077 - namespace
1078 required:
1079 - external
1080 properties:
1081 external:
1082 description: 'Allowed value: string of the format `projects/{{project}}/topics/{{value}}`,
1083 where {{value}} is the `name` field of a `PubSubTopic` resource.'
1084 type: string
1085 name:
1086 description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names'
1087 type: string
1088 namespace:
1089 description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/'
1090 type: string
1091 type: object
1092 required:
1093 - topicRef
1094 type: object
1095 repositoryEventConfig:
1096 description: The configuration of a trigger that creates a build whenever
1097 an event from Repo API is received.
1098 properties:
1099 pullRequest:
1100 description: Contains filter properties for matching Pull Requests.
1101 properties:
1102 branch:
1103 description: |-
1104 Regex of branches to match.
1105
1106 The syntax of the regular expressions accepted is the syntax accepted by
1107 RE2 and described at https://github.com/google/re2/wiki/Syntax.
1108 type: string
1109 commentControl:
1110 description: 'Configure builds to run whether a repository
1111 owner or collaborator need to comment ''/gcbrun''. Possible
1112 values: ["COMMENTS_DISABLED", "COMMENTS_ENABLED", "COMMENTS_ENABLED_FOR_EXTERNAL_CONTRIBUTORS_ONLY"].'
1113 type: string
1114 invertRegex:
1115 description: If true, branches that do NOT match the git_ref
1116 will trigger a build.
1117 type: boolean
1118 type: object
1119 push:
1120 description: Contains filter properties for matching git pushes.
1121 properties:
1122 branch:
1123 description: |-
1124 Regex of branches to match.
1125
1126 The syntax of the regular expressions accepted is the syntax accepted by
1127 RE2 and described at https://github.com/google/re2/wiki/Syntax.
1128 type: string
1129 invertRegex:
1130 description: If true, only trigger a build if the revision
1131 regex does NOT match the git_ref regex.
1132 type: boolean
1133 tag:
1134 description: |-
1135 Regex of tags to match.
1136
1137 The syntax of the regular expressions accepted is the syntax accepted by
1138 RE2 and described at https://github.com/google/re2/wiki/Syntax.
1139 type: string
1140 type: object
1141 repository:
1142 description: The resource name of the Repo API resource.
1143 type: string
1144 type: object
1145 serviceAccountRef:
1146 description: |-
1147 The service account used for all user-controlled operations including
1148 triggers.patch, triggers.run, builds.create, and builds.cancel.
1149
1150 If no service account is set, then the standard Cloud Build service account
1151 ([PROJECT_NUM]@system.gserviceaccount.com) will be used instead.
1152
1153 When populating via the external field, the following format is supported:
1154 projects/{PROJECT_ID}/serviceAccounts/{SERVICE_ACCOUNT_EMAIL}
1155 oneOf:
1156 - not:
1157 required:
1158 - external
1159 required:
1160 - name
1161 - not:
1162 anyOf:
1163 - required:
1164 - name
1165 - required:
1166 - namespace
1167 required:
1168 - external
1169 properties:
1170 external:
1171 description: 'Allowed value: string of the format `projects/{{project}}/serviceAccounts/{{value}}`,
1172 where {{value}} is the `email` field of an `IAMServiceAccount`
1173 resource.'
1174 type: string
1175 name:
1176 description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names'
1177 type: string
1178 namespace:
1179 description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/'
1180 type: string
1181 type: object
1182 sourceToBuild:
1183 description: |-
1184 The repo and ref of the repository from which to build.
1185 This field is used only for those triggers that do not respond to SCM events.
1186 Triggers that respond to such events build source at whatever commit caused the event.
1187 This field is currently only used by Webhook, Pub/Sub, Manual, and Cron triggers.
1188
1189 One of 'trigger_template', 'github', 'pubsub_config' 'webhook_config' or 'source_to_build' must be provided.
1190 properties:
1191 githubEnterpriseConfigRef:
1192 description: |-
1193 Only `external` field is supported to configure the reference.
1194
1195 The full resource name of the github enterprise config. Format:
1196 projects/{project}/locations/{location}/githubEnterpriseConfigs/{id}.
1197 oneOf:
1198 - not:
1199 required:
1200 - external
1201 required:
1202 - name
1203 - not:
1204 anyOf:
1205 - required:
1206 - name
1207 - required:
1208 - namespace
1209 required:
1210 - external
1211 properties:
1212 external:
1213 description: 'Allowed value: The `name` field of a `CloudBuildGithubEnterpriseConfig`
1214 resource.'
1215 type: string
1216 name:
1217 description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names'
1218 type: string
1219 namespace:
1220 description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/'
1221 type: string
1222 type: object
1223 ref:
1224 description: The branch or tag to use. Must start with "refs/"
1225 (required).
1226 type: string
1227 repoType:
1228 description: |-
1229 The type of the repo, since it may not be explicit from the repo field (e.g from a URL).
1230 Values can be UNKNOWN, CLOUD_SOURCE_REPOSITORIES, GITHUB, BITBUCKET_SERVER Possible values: ["UNKNOWN", "CLOUD_SOURCE_REPOSITORIES", "GITHUB", "BITBUCKET_SERVER"].
1231 type: string
1232 repositoryRef:
1233 description: |-
1234 Only `external` field is supported to configure the reference.
1235
1236 The qualified resource name of the Repo API repository.
1237 Either uri or repository can be specified and is required.
1238 oneOf:
1239 - not:
1240 required:
1241 - external
1242 required:
1243 - name
1244 - not:
1245 anyOf:
1246 - required:
1247 - name
1248 - required:
1249 - namespace
1250 required:
1251 - external
1252 properties:
1253 external:
1254 description: 'Allowed value: The `name` field of a `CloudBuildV2Repository`
1255 resource.'
1256 type: string
1257 name:
1258 description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names'
1259 type: string
1260 namespace:
1261 description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/'
1262 type: string
1263 type: object
1264 uri:
1265 description: The URI of the repo.
1266 type: string
1267 required:
1268 - ref
1269 - repoType
1270 type: object
1271 substitutions:
1272 additionalProperties:
1273 type: string
1274 description: Substitutions data for Build resource.
1275 type: object
1276 tags:
1277 description: Tags for annotation of a BuildTrigger.
1278 items:
1279 type: string
1280 type: array
1281 triggerTemplate:
1282 description: |-
1283 Template describing the types of source changes to trigger a build.
1284
1285 Branch and tag names in trigger templates are interpreted as regular
1286 expressions. Any branch or tag change that matches that regular
1287 expression will trigger a build.
1288
1289 One of 'trigger_template', 'github', 'pubsub_config', 'webhook_config' or 'source_to_build' must be provided.
1290 properties:
1291 branchName:
1292 description: |-
1293 Name of the branch to build. Exactly one a of branch name, tag, or commit SHA must be provided.
1294 This field is a regular expression.
1295 type: string
1296 commitSha:
1297 description: Explicit commit SHA to build. Exactly one of a branch
1298 name, tag, or commit SHA must be provided.
1299 type: string
1300 dir:
1301 description: |-
1302 Directory, relative to the source root, in which to run the build.
1303
1304 This must be a relative path. If a step's dir is specified and
1305 is an absolute path, this value is ignored for that step's
1306 execution.
1307 type: string
1308 invertRegex:
1309 description: Only trigger a build if the revision regex does NOT
1310 match the revision regex.
1311 type: boolean
1312 repoRef:
1313 description: |-
1314 The Cloud Source Repository to build. If omitted, the repo with
1315 name "default" is assumed.
1316 oneOf:
1317 - not:
1318 required:
1319 - external
1320 required:
1321 - name
1322 - not:
1323 anyOf:
1324 - required:
1325 - name
1326 - required:
1327 - namespace
1328 required:
1329 - external
1330 properties:
1331 external:
1332 description: 'Allowed value: The `name` field of a `SourceRepoRepository`
1333 resource.'
1334 type: string
1335 name:
1336 description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names'
1337 type: string
1338 namespace:
1339 description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/'
1340 type: string
1341 type: object
1342 tagName:
1343 description: |-
1344 Name of the tag to build. Exactly one of a branch name, tag, or commit SHA must be provided.
1345 This field is a regular expression.
1346 type: string
1347 type: object
1348 webhookConfig:
1349 description: |-
1350 WebhookConfig describes the configuration of a trigger that creates
1351 a build whenever a webhook is sent to a trigger's webhook URL.
1352
1353 One of 'trigger_template', 'github', 'pubsub_config' 'webhook_config' or 'source_to_build' must be provided.
1354 properties:
1355 secretRef:
1356 description: The secret required
1357 oneOf:
1358 - not:
1359 required:
1360 - external
1361 required:
1362 - name
1363 - not:
1364 anyOf:
1365 - required:
1366 - name
1367 - required:
1368 - namespace
1369 required:
1370 - external
1371 properties:
1372 external:
1373 description: 'Allowed value: The `name` field of a `SecretManagerSecret`
1374 resource.'
1375 type: string
1376 name:
1377 description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names'
1378 type: string
1379 namespace:
1380 description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/'
1381 type: string
1382 type: object
1383 state:
1384 description: |-
1385 Potential issues with the underlying Pub/Sub subscription configuration.
1386 Only populated on get requests.
1387 type: string
1388 required:
1389 - secretRef
1390 type: object
1391 type: object
1392 status:
1393 properties:
1394 conditions:
1395 description: Conditions represent the latest available observation
1396 of the resource's current state.
1397 items:
1398 properties:
1399 lastTransitionTime:
1400 description: Last time the condition transitioned from one status
1401 to another.
1402 type: string
1403 message:
1404 description: Human-readable message indicating details about
1405 last transition.
1406 type: string
1407 reason:
1408 description: Unique, one-word, CamelCase reason for the condition's
1409 last transition.
1410 type: string
1411 status:
1412 description: Status is the status of the condition. Can be True,
1413 False, Unknown.
1414 type: string
1415 type:
1416 description: Type is the type of the condition.
1417 type: string
1418 type: object
1419 type: array
1420 createTime:
1421 description: Time when the trigger was created.
1422 type: string
1423 observedGeneration:
1424 description: ObservedGeneration is the generation of the resource
1425 that was most recently observed by the Config Connector controller.
1426 If this is equal to metadata.generation, then that means that the
1427 current reported status reflects the most recent desired state of
1428 the resource.
1429 type: integer
1430 triggerId:
1431 description: The unique identifier for the trigger.
1432 type: string
1433 type: object
1434 type: object
1435 served: true
1436 storage: true
1437 subresources:
1438 status: {}
1439status:
1440 acceptedNames:
1441 kind: ""
1442 plural: ""
1443 conditions: []
1444 storedVersions: []
View as plain text