forked from tektoncd/plumbing
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcatalog-deploy-test-s390x-template.yaml
189 lines (189 loc) · 6.09 KB
/
catalog-deploy-test-s390x-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
# Copyright 2020 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-catalog-nightly-test-s390x
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-catalog-$(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-catalog
taskRef:
name: git-clone
bundle: gcr.io/tekton-releases/catalog/upstream/git-clone:0.5
params:
- name: url
value: https://github.com/tektoncd/catalog
- name: revision
value: main
- name: subdirectory
value: src/github.com/tektoncd/catalog
workspaces:
- name: output
workspace: shared-workspace
subPath: source-code
- name: create-k8s-cluster
runAfter: [git-clone-catalog]
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-catalog
runAfter: [deploy-pipeline]
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: 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/catalog
env:
- name: KUBECONFIG
value: $(workspaces.k8s-shared.path)/config
- name: PLATFORM
value: linux/$(params.target-arch)
- name: KO_DOCKER_REPO
value: $(params.container-registry)
- name: TEST_RUN_ALL_TESTS
value: "true"
- name: LOCAL_CI_RUN
value: "true"
command:
- /bin/bash
args:
- -ce
- |
test/e2e-tests.sh
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: source-code
workspace: shared-workspace
subPath: source-code
finally:
- name: delete-k8s-cluster
taskRef:
name: create-delete-k8s-cluster-$(tt.params.targetArch)
workspaces:
- name: k8s-shared
workspace: shared-workspace
subPath: k8s-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: 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)