forked from tektoncd/plumbing
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpipeline-deploy-test-ppc64le-template.yaml
176 lines (176 loc) · 5.53 KB
/
pipeline-deploy-test-ppc64le-template.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
# Copyright 2021 The Tekton Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
apiVersion: triggers.tekton.dev/v1alpha1
kind: TriggerTemplate
metadata:
name: tekton-pipeline-nightly-test-ppc64le
spec:
params:
- name: containerRegistry
- name: targetArch
- name: namespace
- name: remoteHost
- name: remotePort
- name: remoteUser
- name: remoteSecret
resourcetemplates:
- apiVersion: tekton.dev/v1beta1
kind: PipelineRun
metadata:
generateName: tekton-pipeline-$(tt.params.targetArch)-nightly-run-
namespace: $(tt.params.namespace)
spec:
timeout: 2h
workspaces:
# this workspace will be used to share info between tasks
- name: shared-workspace
volumeClaimTemplate:
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 2Gi
# this workspace will be used to store ssh key
- name: ssh-secret
secret:
secretName: $(tt.params.remoteSecret)
items:
- key: privatekey
path: id_rsa
# yamllint disable rule:octal-values
mode: 0600
# yamllint enable
pipelineSpec:
workspaces:
- name: shared-workspace
- name: ssh-secret
params:
- name: container-registry
- name: target-arch
- name: remote-host
- name: remote-port
- name: remote-user
tasks:
- name: git-clone-plumbing
taskRef:
name: git-clone
bundle: gcr.io/tekton-releases/catalog/upstream/git-clone:0.3
params:
- name: url
value: https://github.com/tektoncd/plumbing
- name: revision
value: main
- name: subdirectory
value: src/github.com/tektoncd/plumbing
workspaces:
- name: output
workspace: shared-workspace
subPath: source-code
- name: git-clone-pipeline
runAfter: [git-clone-plumbing]
taskRef:
name: git-clone
bundle: gcr.io/tekton-releases/catalog/upstream/git-clone:0.3
params:
- name: url
value: https://github.com/tektoncd/pipeline
- name: revision
value: main
- name: subdirectory
value: src/github.com/tektoncd/pipeline
workspaces:
- name: output
workspace: shared-workspace
subPath: source-code
- name: create-k8s-cluster
runAfter: [git-clone-pipeline]
taskRef:
name: create-delete-k8s-cluster-$(tt.params.targetArch)
workspaces:
- name: k8s-shared
workspace: shared-workspace
subPath: k8s-shared
- name: registry-shared
workspace: shared-workspace
subPath: registry-shared
- name: ssh-secret
workspace: ssh-secret
params:
- name: remote-host
value: $(params.remote-host)
- name: remote-port
value: $(params.remote-port)
- name: remote-user
value: $(params.remote-user)
- name: deploy-pipeline
runAfter: [create-k8s-cluster]
taskRef:
name: deploy-tekton-component-nightly
workspaces:
- name: k8s-shared
workspace: shared-workspace
subPath: k8s-shared
params:
- name: package
value: pipeline
- name: e2e-test-pipeline
runAfter: [deploy-pipeline]
taskRef:
name: test-e2e-tekton-component
workspaces:
- name: k8s-shared
workspace: shared-workspace
subPath: k8s-shared
- name: registry-shared
workspace: shared-workspace
subPath: registry-shared
- name: source-code
workspace: shared-workspace
subPath: source-code
retries: 2
params:
- name: package
value: github.com/tektoncd/pipeline
- name: container-registry
value: $(params.container-registry)
- name: target-arch
value: $(params.target-arch)
finally:
- name: delete-k8s-cluster
taskRef:
name: create-delete-k8s-cluster-$(tt.params.targetArch)
workspaces:
- name: ssh-secret
workspace: ssh-secret
params:
- name: remote-host
value: $(params.remote-host)
- name: remote-port
value: $(params.remote-port)
- name: remote-user
value: $(params.remote-user)
- name: action
value: delete
params:
- name: container-registry
value: $(tt.params.containerRegistry)
- name: target-arch
value: $(tt.params.targetArch)
- name: remote-host
value: $(tt.params.remoteHost)
- name: remote-port
value: $(tt.params.remotePort)
- name: remote-user
value: $(tt.params.remoteUser)