[Dev] Check pipeline_sock_dir variable
This commit is contained in:
parent
d4c09e5c90
commit
75054cdaf2
|
@ -30,6 +30,9 @@ err_git_runner_groupname_empty=38
|
||||||
err_git_runner_group_not_exist=39
|
err_git_runner_group_not_exist=39
|
||||||
err_runner_deployer_groupname_empty=40
|
err_runner_deployer_groupname_empty=40
|
||||||
err_runner_deployer_group_not_exist=41
|
err_runner_deployer_group_not_exist=41
|
||||||
|
err_pipeline_sock_dir_empty=42
|
||||||
|
err_pipeline_sock_dir_not_directory=43
|
||||||
|
err_pipeline_sock_dir_not_writable=44
|
||||||
|
|
||||||
# JSON parsing errors
|
# JSON parsing errors
|
||||||
err_json_bad_format=51
|
err_json_bad_format=51
|
||||||
|
|
|
@ -171,6 +171,18 @@ main() (
|
||||||
"${err_git_runner_group_not_exist}"
|
"${err_git_runner_group_not_exist}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ -z "${pipeline_sock_dir}" ]; then
|
||||||
|
fail "Variable pipeline_sock_dir is empty." "${err_pipeline_sock_dir_empty}"
|
||||||
|
fi
|
||||||
|
if [ ! -d "${pipeline_sock_dir}" ]; then
|
||||||
|
fail "Directory pipeline_sock_dir='${pipeline_sock_dir}' does not exist." \
|
||||||
|
"${err_pipeline_sock_dir_not_directory}"
|
||||||
|
fi
|
||||||
|
if [ ! -w "${pipeline_sock_dir}" ]; then
|
||||||
|
fail "Directory pipeline_sock_dir='${pipeline_sock_dir}' is not writable." \
|
||||||
|
"${err_pipeline_sock_dir_not_writable}"
|
||||||
|
fi
|
||||||
|
|
||||||
# Generate pipeline tmp sock.
|
# Generate pipeline tmp sock.
|
||||||
tsp="$(date +%s)"
|
tsp="$(date +%s)"
|
||||||
random="$(echo "${RANDOM}" | md5sum | head --bytes 32)"
|
random="$(echo "${RANDOM}" | md5sum | head --bytes 32)"
|
||||||
|
|
Loading…
Reference in New Issue