bug fixed

This commit is contained in:
병준 박 2025-04-08 17:49:37 +00:00
parent f99f003570
commit 8485b33487

View File

@ -16,7 +16,7 @@ spec:
These Tasks are Git tasks to work with repositories used by other tasks These Tasks are Git tasks to work with repositories used by other tasks
in your Pipeline. in your Pipeline.
The git-clone Task will clone a repo from the provided url into the 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 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 your Workspace. You can clone into a subdirectory by setting this Task's
subdirectory param. This Task also supports sparse checkouts. To perform subdirectory param. This Task also supports sparse checkouts. To perform
@ -54,7 +54,7 @@ spec:
type: string type: string
default: "" default: ""
- name: verbose - name: verbose
description: Log the commands that are executed during `git-clone`'s operation. description: Log the commands that are executed during `git-clone-checkout`'s operation.
type: string type: string
default: "true" default: "true"
- name: gitInitImage - name: gitInitImage
@ -135,7 +135,7 @@ spec:
git config --global --add safe.directory "${WORKSPACE_OUTPUT_PATH}" git config --global --add safe.directory "${WORKSPACE_OUTPUT_PATH}"
cd "${WORKSPACE_OUTPUT_PATH}" cd "${WORKSPACE_OUTPUT_PATH}"
git clone "${PARAM_URL}" . git clone "$(params.url)" .
git checkout "${PARAM_REVISION}" git checkout "${PARAM_REVISION}"
RESULT_SHA="$(git rev-parse HEAD)" RESULT_SHA="$(git rev-parse HEAD)"
@ -146,4 +146,4 @@ spec:
RESULT_COMMITTER_DATE="$(git log -1 --pretty=%ct)" RESULT_COMMITTER_DATE="$(git log -1 --pretty=%ct)"
printf "%s" "${RESULT_COMMITTER_DATE}" > "$(results.committer-date.path)" printf "%s" "${RESULT_COMMITTER_DATE}" > "$(results.committer-date.path)"
printf "%s" "${RESULT_SHA}" > "$(results.commit.path)" printf "%s" "${RESULT_SHA}" > "$(results.commit.path)"
printf "%s" "${PARAM_URL}" > "$(results.url.path)" printf "%s" "$(params.url)" > "$(results.url.path)"