Skip to content

Commit 4c4fd28

Browse files
authored
More granular image references (#2837)
Signed-off-by: Matej Vašek <[email protected]>
1 parent a062cd2 commit 4c4fd28

File tree

2 files changed

+21
-4
lines changed

2 files changed

+21
-4
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ LDFLAGS := -X knative.dev/func/pkg/app.vers=$(VERS) -X knative.dev/func/pkg
3333
FUNC_UTILS_IMG ?= ghcr.io/knative/func-utils:v2
3434
LDFLAGS += -X knative.dev/func/pkg/k8s.SocatImage=$(FUNC_UTILS_IMG)
3535
LDFLAGS += -X knative.dev/func/pkg/k8s.TarImage=$(FUNC_UTILS_IMG)
36-
LDFLAGS += -X knative.dev/func/pkg/pipelines/tekton.DeployerImage=$(FUNC_UTILS_IMG)
36+
LDFLAGS += -X knative.dev/func/pkg/pipelines/tekton.FuncUtilImage=$(FUNC_UTILS_IMG)
3737

3838
GOFLAGS := "-ldflags=$(LDFLAGS)"
3939
export GOFLAGS

pkg/pipelines/tekton/tasks.go

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,24 @@ import (
55
"strings"
66
)
77

8-
var DeployerImage = "ghcr.io/knative/func-utils:v2"
8+
var (
9+
FuncUtilImage = "ghcr.io/knative/func-utils:v2"
10+
DeployerImage string
11+
ScaffoldImage string
12+
S2IImage string
13+
)
14+
15+
func init() {
16+
if DeployerImage == "" {
17+
DeployerImage = FuncUtilImage
18+
}
19+
if ScaffoldImage == "" {
20+
ScaffoldImage = FuncUtilImage
21+
}
22+
if S2IImage == "" {
23+
S2IImage = FuncUtilImage
24+
}
25+
}
926

1027
func getBuildpackTask() string {
1128
return `apiVersion: tekton.dev/v1
@@ -371,7 +388,7 @@ spec:
371388
name: gen-source
372389
- emptyDir: {}
373390
name: env-vars
374-
`, DeployerImage)
391+
`, S2IImage)
375392
}
376393

377394
func getDeployTask() string {
@@ -430,7 +447,7 @@ spec:
430447
- name: func-scaffold
431448
image: %s
432449
command: ["scaffold", "$(params.path)"]
433-
`, DeployerImage)
450+
`, ScaffoldImage)
434451
}
435452

436453
// GetClusterTasks returns multi-document yaml containing tekton tasks used by func.

0 commit comments

Comments
 (0)