From 9d816b668ffbc3a56f4cd63f097a0b6adcf2fa66 Mon Sep 17 00:00:00 2001 From: samuel Date: Tue, 2 May 2023 12:55:07 +0200 Subject: [PATCH] [Fix] Reduce path names because ncat does not like large names --- src/pipeline.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/pipeline.sh b/src/pipeline.sh index 8db2282..0bb822b 100755 --- a/src/pipeline.sh +++ b/src/pipeline.sh @@ -216,12 +216,13 @@ main() ( fi # Generate random string. - random="$(echo "${RANDOM}" | md5sum | head --bytes 8)" + random="$(echo "${RANDOM}" | md5sum | head --bytes 7)" # Build runner request. case "${pipeline}" in newcommit) - rd_pipeline_sock_dir="${pipeline_sock_dir}/${pipeline}-${repo_hash}-${random}" + repo_id="$(echo "${repo_hash}" | head -c 7)" + rd_pipeline_sock_dir="${pipeline_sock_dir}/${pipeline}-${repo_id}-${random}" runner_request="$(jq --null-input --compact-output \ --arg s "${rd_pipeline_sock_dir}/pipeline.sock" \ --arg n "${repo_name}" \