[Fix] Reduce path names in runner

This commit is contained in:
samuel 2023-05-02 12:55:33 +02:00
parent 9d816b668f
commit f80cf827af
1 changed files with 4 additions and 2 deletions

View File

@ -199,8 +199,10 @@ process_request() (
fi fi
# Clone repo and move into it. # Clone repo and move into it.
rand="$(echo "${RANDOM}" | md5sum | head --bytes 32)" repo_id="$(echo "${repo_hash}" | head --bytes 7)"
repo_clone="${runner_cloning_dir}/${repo_name}-${repo_hash}-${rand}" [ "${repo_tag}" != "null" ] && repo_id="${repo_tag}"
rand="$(echo "${RANDOM}" | md5sum | head --bytes 7)"
repo_clone="${runner_cloning_dir}/${repo_name}-${repo_id}-${rand}"
log_info "Clone '$repo_name'." log_info "Clone '$repo_name'."
if ! output="$(git clone "$repo_dir" "$repo_clone" 2>&1)"; then if ! output="$(git clone "$repo_dir" "$repo_clone" 2>&1)"; then
reply "${err_clone_repo}" "Cannot clone repo '${repo_name}': ${output}." reply "${err_clone_repo}" "Cannot clone repo '${repo_name}': ${output}."