This commit is contained in:
병준 박 2025-04-16 01:07:02 +00:00
parent bee81a6b96
commit 4148ee5288

View File

@ -90,32 +90,10 @@ spec:
default: "gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init:v0.40.2"
description: The image providing the git-init binary that this Task runs.
# - name: userHome
# type: string
# default: "/home/git"
# description: Absolute path to the user's home directory.
workspaces:
- name: shared
description: The workspace where the repository will be cloned.
# - name: ssh-directory
# optional: true
# description: |
# A .ssh directory with private key, known_hosts, config, etc.
# Copied to the user's home before git commands are executed.
# - name: basic-auth
# optional: true
# description: |
# A Workspace containing a .gitconfig and .git-credentials file.
# - name: ssl-ca-directory
# optional: true
# description: |
# A workspace containing CA certificates, used by Git for SSL verification.
results:
- name: commit
description: The precise commit SHA that was fetched by this Task.
@ -128,8 +106,6 @@ spec:
- name: clone
image: $(params.gitInitImage)
env:
# - name: HOME
# value: $(params.userHome)
- name: HOME
value: /workspace/shared/$(params.home)
- name: SSL_CERT_FILE
@ -144,20 +120,6 @@ spec:
#!/bin/sh
set -eu
# echo "[INFO] Preparing home and auth setup..."
# mkdir -p $(params.userHome)/.ssh
# if [ -d "/workspace/ssh-directory" ]; then
# cp -R /workspace/ssh-directory/* $(params.userHome)/.ssh/
# chmod 700 $(params.userHome)/.ssh
# chmod 600 $(params.userHome)/.ssh/*
# fi
# if [ -d "/workspace/basic-auth" ]; then
# cp /workspace/basic-auth/.gitconfig $(params.userHome)/.gitconfig || true
# cp /workspace/basic-auth/.git-credentials $(params.userHome)/.git-credentials || true
# fi
if [ "$(params.sslVerify)" = "false" ]; then
echo "[INFO] Disabling SSL verification"
git config --global http.sslVerify false