forked from tektoncd/plumbing
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdashboard-deploy-test-ppc64le-template.yaml
226 lines (226 loc) · 7.61 KB
/
dashboard-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
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
# 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-dashboard-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-dashboard-$(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: 5Gi
# 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-dashboard
taskRef:
name: git-clone
bundle: gcr.io/tekton-releases/catalog/upstream/git-clone:0.3
params:
- name: url
value: https://github.com/tektoncd/dashboard
- name: revision
value: main
- name: subdirectory
value: src/github.com/tektoncd/dashboard
workspaces:
- name: output
workspace: shared-workspace
subPath: source-code
- name: create-k8s-cluster
runAfter: [git-clone-dashboard]
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: e2e-test-dashboard
runAfter: [create-k8s-cluster]
taskSpec:
params:
- name: container-registry
- name: target-arch
- name: remote-host
workspaces:
- name: k8s-shared
description: workspace for k8s config, configuration file is expected to have `config` name
mountPath: /root/.kube
- name: registry-shared
description: workspace for registry credentials & certificate, files are expected to have `config.json` & `cert.pem` name respectively
mountPath: /root/.docker
- name: source-code
description: workspace with source code for tekton component
steps:
- name: run-e2e-tests
image: gcr.io/tekton-releases/dogfooding/test-runner:latest
workingDir: $(workspaces.source-code.path)/src/github.com/tektoncd/dashboard
env:
# Connect to the sidecar over TCP, with TLS.
- name: DOCKER_HOST
value: tcp://localhost:2376
# Verify TLS.
- name: DOCKER_TLS_VERIFY
value: '1'
# Use the certs generated by the sidecar daemon.
- name: DOCKER_CERT_PATH
value: /certs/client
- name: GOPATH
value: /workspace
- name: KUBECONFIG
value: $(workspaces.k8s-shared.path)/config
- name: PLATFORM
value: linux/$(params.target-arch)
- name: KO_DOCKER_REPO
value: $(params.container-registry)
- name: REPO_ROOT_DIR
value: $(workspaces.source-code.path)/src/github.com/tektoncd/dashboard
- name: SKIP_INITIALIZE
value: "true"
- name: SKIP_BUILD_TEST
value: "true"
- name: E2E_VIDEO
value: "false"
- name: SSL_CERT_FILE
value: $(workspaces.registry-shared.path)/cert.pem
- name: USE_NIGHTLY_RELEASE
value: "true"
command:
- /bin/bash
args:
- -ce
- |
./test/presubmit-tests.sh --integration-tests
volumeMounts:
- mountPath: /certs/client
name: dind-certs
sidecars:
- image: docker:dind
name: server
args:
- --storage-driver=overlay2
- --userland-proxy=false
- --debug
securityContext:
privileged: true
env:
- name: DOCKER_TLS_CERTDIR
value: /certs
volumeMounts:
- mountPath: /certs/client
name: dind-certs
readinessProbe:
periodSeconds: 1
exec:
command: ['ls', '/certs/client/ca.pem']
volumes:
- name: dind-certs
emptyDir: {}
params:
- name: container-registry
value: $(params.container-registry)
- name: target-arch
value: $(params.target-arch)
- name: remote-host
value: $(params.remote-host)
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
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)