Skip to content

Commit 23f4490

Browse files
authored
[release-v1.16] Tekton 1.0.x fixes (#1349)
* fix: affinity/coschedule tekton issues Workspace set must be identical for all the tasks. Having strict subset of workspaces clearly does not work. Signed-off-by: Matej Vašek <[email protected]> Signed-off-by: Matej Vašek <[email protected]> * fix: quote a strings in yaml Tekton 1.0.x is less permissive. When the parameter is empty string it must be between quotation mark. Signed-off-by: Matej Vašek <[email protected]> --------- Signed-off-by: Matej Vašek <[email protected]> Signed-off-by: Matej Vašek <[email protected]>
1 parent 915a1a9 commit 23f4490

File tree

3 files changed

+37
-6
lines changed

3 files changed

+37
-6
lines changed

pkg/pipelines/tekton/tasks.go

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -406,6 +406,12 @@ spec:
406406
workspaces:
407407
- name: source
408408
description: The workspace containing the function project
409+
- name: cache
410+
optional: true
411+
- name: sslcertdir
412+
optional: true
413+
- name: dockerconfig
414+
optional: true
409415
steps:
410416
- name: func-deploy
411417
image: "%s"
@@ -431,6 +437,15 @@ spec:
431437
- name: path
432438
description: Path to the function project
433439
default: ""
440+
workspaces:
441+
- name: source
442+
description: The workspace containing the function project
443+
- name: cache
444+
optional: true
445+
- name: sslcertdir
446+
optional: true
447+
- name: dockerconfig
448+
optional: true
434449
steps:
435450
- name: func-scaffold
436451
image: %s

pkg/pipelines/tekton/templates_pack.go

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,10 @@ spec:
4949
workspaces:
5050
- name: source
5151
workspace: source-workspace
52+
- name: cache
53+
workspace: cache-workspace
54+
- name: dockerconfig
55+
workspace: dockerconfig-workspace
5256
{{.RunAfterFetchSources}}
5357
{{.FuncScaffoldTaskRef}}
5458
- name: build
@@ -86,6 +90,10 @@ spec:
8690
workspaces:
8791
- name: source
8892
workspace: source-workspace
93+
- name: cache
94+
workspace: cache-workspace
95+
- name: dockerconfig
96+
workspace: dockerconfig-workspace
8997
workspaces:
9098
- description: Directory where function source is located.
9199
name: source-workspace
@@ -115,11 +123,11 @@ metadata:
115123
spec:
116124
params:
117125
- name: gitRepository
118-
value: {{.RepoUrl}}
126+
value: "{{.RepoUrl}}"
119127
- name: gitRevision
120128
value: {{.Revision}}
121129
- name: contextDir
122-
value: {{.ContextDir}}
130+
value: "{{.ContextDir}}"
123131
- name: imageName
124132
value: {{.FunctionImage}}
125133
- name: registry
@@ -182,7 +190,7 @@ spec:
182190
- name: gitRevision
183191
value: {{.Revision}}
184192
- name: contextDir
185-
value: {{.ContextDir}}
193+
value: "{{.ContextDir}}"
186194
- name: imageName
187195
value: {{.FunctionImage}}
188196
- name: registry

pkg/pipelines/tekton/templates_s2i.go

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,10 @@ spec:
5353
workspaces:
5454
- name: source
5555
workspace: source-workspace
56+
- name: cache
57+
workspace: cache-workspace
58+
- name: dockerconfig
59+
workspace: dockerconfig-workspace
5660
{{.RunAfterFetchSources}}
5761
{{.FuncScaffoldTaskRef}}
5862
- name: build
@@ -92,6 +96,10 @@ spec:
9296
workspaces:
9397
- name: source
9498
workspace: source-workspace
99+
- name: cache
100+
workspace: cache-workspace
101+
- name: dockerconfig
102+
workspace: dockerconfig-workspace
95103
workspaces:
96104
- description: Directory where function source is located.
97105
name: source-workspace
@@ -120,11 +128,11 @@ metadata:
120128
spec:
121129
params:
122130
- name: gitRepository
123-
value: {{.RepoUrl}}
131+
value: "{{.RepoUrl}}"
124132
- name: gitRevision
125133
value: {{.Revision}}
126134
- name: contextDir
127-
value: {{.ContextDir}}
135+
value: "{{.ContextDir}}"
128136
- name: imageName
129137
value: {{.FunctionImage}}
130138
- name: registry
@@ -192,7 +200,7 @@ spec:
192200
- name: gitRevision
193201
value: {{.Revision}}
194202
- name: contextDir
195-
value: {{.ContextDir}}
203+
value: "{{.ContextDir}}"
196204
- name: imageName
197205
value: {{.FunctionImage}}
198206
- name: registry

0 commit comments

Comments
 (0)