From 29b38d61175a785f3638a5e17e4d47c715803085 Mon Sep 17 00:00:00 2001 From: BAK BYEONG JUN Date: Tue, 8 Apr 2025 23:43:26 +0000 Subject: [PATCH] init --- tasks/git-clone-checkout/task.yaml | 26 ++++++++++---------------- 1 file changed, 10 insertions(+), 16 deletions(-) diff --git a/tasks/git-clone-checkout/task.yaml b/tasks/git-clone-checkout/task.yaml index 8d9b6ef..ba4c75f 100644 --- a/tasks/git-clone-checkout/task.yaml +++ b/tasks/git-clone-checkout/task.yaml @@ -9,12 +9,6 @@ spec: These Tasks are Git tasks to work with repositories used by other tasks in your Pipeline. - The git-clone-checkout Task will clone a repo from the provided url into the - output Workspace. By default the repo will be cloned into the root of - your Workspace. You can clone into a subdirectory by setting this Task's - subdirectory param. This Task also supports sparse checkouts. To perform - a sparse checkout, pass a list of comma separated directory patterns to - this Task's sparseCheckoutDirectories param. workspaces: - name: output description: The git repo will be cloned onto the volume backing this Workspace. @@ -53,7 +47,7 @@ spec: - name: gitInitImage description: The image providing the git-init binary that this Task runs. type: string - default: "alpine/git:2.47.2" + default: "bitnami/git:2.48.1-debian-12-r6" - name: userHome description: | Absolute path to the user's home directory. @@ -131,15 +125,15 @@ spec: git clone "${PARAM_URL}" . git checkout "${PARAM_REVISION}" - # RESULT_SHA="$(git rev-parse HEAD)" - # EXIT_CODE="$?" - # if [ "${EXIT_CODE}" != 0 ] ; then - # exit "${EXIT_CODE}" - # fi - # RESULT_COMMITTER_DATE="$(git log -1 --pretty=%ct)" - # printf "%s" "${RESULT_COMMITTER_DATE}" > "$(results.committer-date.path)" - # printf "%s" "${RESULT_SHA}" > "$(results.commit.path)" - # printf "%s" "${PARAM_URL}" > "$(results.url.path)" + RESULT_SHA="$(git rev-parse HEAD)" + EXIT_CODE="$?" + if [ "${EXIT_CODE}" != 0 ] ; then + exit "${EXIT_CODE}" + fi + RESULT_COMMITTER_DATE="$(git log -1 --pretty=%ct)" + printf "%s" "${RESULT_COMMITTER_DATE}" > "$(results.committer-date.path)" + printf "%s" "${RESULT_SHA}" > "$(results.commit.path)" + printf "%s" "${PARAM_URL}" > "$(results.url.path)" # --- # apiVersion: tekton.dev/v1beta1