This commit is contained in:
병준 박 2025-04-08 23:43:26 +00:00
parent 3a202dab98
commit 29b38d6117

View File

@ -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