...
1label: Config Connector CloudBuildTrigger
2markdownDescription: Creates yaml for a CloudBuildTrigger resource
3insertText: |
4 apiVersion: cloudbuild.cnrm.cloud.google.com/v1beta1
5 kind: CloudBuildTrigger
6 metadata:
7 name: \${1:cloudbuildtrigger-name}
8 spec:
9 description: \${2:Cloud Build Trigger for building the master branch of the referenced
10 Cloud Source Repository.}
11 disabled: \${3:false}
12 triggerTemplate:
13 repoRef:
14 name: \${4:cloudbuildtrigger-dep-cloudsourcerepo}
15 dir: \${5:team-a/service-b}
16 branchName: \${6:master}
17 ignoredFiles:
18 - \${7:**/*.md}
19 includedFiles:
20 - \${8:src/**}
21 substitutions:
22 _SERVICE_NAME: \${9:service-name}
23 build:
24 images:
25 - \${10:gcr.io/PROJECT_ID/[_SERVICE_NAME]:COMMIT_SHA}
26 tags:
27 - \${11:team-a}
28 - \${12:service-b}
29 timeout: \${13:1800s}
30 step:
31 - id: \${14:download_zip}
32 name: \${15:gcr.io/cloud-builders/gsutil}
33 args:
34 - \${16:cp}
35 - \${17:gs://mybucket/remotefile.zip}
36 - \${18:localfile.zip}
37 timeout: \${19:300s}
38 - id: \${20:build_package}
39 name: \${21:gcr.io/cloud-builders/go}
40 args:
41 - \${22:build}
42 - \${23:my_package}
43 dir: \${24:directory}
44 env:
45 - \${25:ENV1=one}
46 - \${26:ENV2=two}
47 secretEnv:
48 - \${27:SECRET_ENV1}
49 timeout: \${28:300s}
50 - id: \${29:build_docker_image}
51 name: \${30:gcr.io/cloud-builders/docker}
52 args:
53 - \${31:build}
54 - \${32:-t}
55 - \${33:gcr.io/PROJECT_ID/[_SERVICE_NAME]:COMMIT_SHA}
56 - \${34:-f}
57 - \${35:Dockerfile}
58 - \${36:.}
59 timeout: \${37:300s}
60 availableSecrets:
61 secretManager:
62 - env: \${38:SECRET1}
63 versionRef:
64 name: \${39:cloudbuildtrigger-dep-cloudsourcerepo}
View as plain text