From 273fb0e2523f454689762dbf0678264c841f52e1 Mon Sep 17 00:00:00 2001 From: Udo Waechter Date: Thu, 8 Dec 2022 17:09:38 +0100 Subject: [PATCH] more updates --- _CI-CD/tektoncd-kaniko-pipeline.yaml | 2 ++ _CI-CD/tektoncd-kaniko-task.yaml | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/_CI-CD/tektoncd-kaniko-pipeline.yaml b/_CI-CD/tektoncd-kaniko-pipeline.yaml index c5e0a33..cc9c8b7 100644 --- a/_CI-CD/tektoncd-kaniko-pipeline.yaml +++ b/_CI-CD/tektoncd-kaniko-pipeline.yaml @@ -22,6 +22,8 @@ spec: value: $(params.git-revision) - name: submodules value: false + - subdirectory: + value: "source" workspaces: - name: source workspace: git-source diff --git a/_CI-CD/tektoncd-kaniko-task.yaml b/_CI-CD/tektoncd-kaniko-task.yaml index 47ed0f9..4c81477 100644 --- a/_CI-CD/tektoncd-kaniko-task.yaml +++ b/_CI-CD/tektoncd-kaniko-task.yaml @@ -52,7 +52,7 @@ spec: image: $(params.BUILDER_IMAGE) args: - $(params.EXTRA_ARGS[*]) - - --dockerfile=$(workspaces.source.path)/$(params.DOCKERFILE) + - --dockerfile=$(params.DOCKERFILE) - --context=$(params.CONTEXT) # The user does not need to care the workspace and the source. - --destination=$(params.IMAGE) - --digest-file=/tekton/results/IMAGE-DIGEST @@ -60,6 +60,7 @@ spec: - --single-snapshot - --use-new-run - --skip-tls-verify + - --cache-dir /workspace/cache # kaniko assumes it is running as root, which means this example fails on platforms # that default to run containers as random uid (like OpenShift). Adding this securityContext # makes it explicit that it needs to run as root.