Commit 541736cf authored by Vesa Vertainen's avatar Vesa Vertainen

fixed htpasswd path in build.sh, when using non default path

parent 72a1dd4d
Pipeline #86566051 passed with stage
in 16 minutes and 40 seconds
......@@ -265,7 +265,7 @@ REGISTRY_HTTP_SECRET=$(head -c 9 /dev/urandom | openssl base64 -e)
REGISTRY_HTTP_TLS_CERTIFICATE=${BUILD_PATH}/certs/$COMMON_NAME_REGISTRY.crt
REGISTRY_HTTP_TLS_KEY=${BUILD_PATH}/certs/$COMMON_NAME_REGISTRY.key
REGISTRY_AUTH=htpasswd
REGISTRY_AUTH_HTPASSWD_PATH=/opt/cincan/auth/htpasswd
REGISTRY_AUTH_HTPASSWD_PATH=${BUILD_PATH}/auth/htpasswd
REGISTRY_AUTH_HTPASSWD_REALM=Registry Realm
EOL
......@@ -380,8 +380,8 @@ echo -e "$CHECK Added certificate for Docker private registry" "${BUILD_PATH}"/c
if [ ! -d /etc/docker/certs.d/"${EXTERNAL_URL_REGISTRY}":5000 ]; then mkdir -p /etc/docker/certs.d/"${EXTERNAL_URL_REGISTRY}":5000; fi
cp "${BUILD_PATH}"/certs/"${COMMON_NAME_REGISTRY}".crt /etc/docker/certs.d/"${EXTERNAL_URL_REGISTRY}":5000/ca.crt
if [ ! -d /opt/cincan/auth ]; then mkdir /opt/cincan/auth; fi
if htpasswd -Bbc /opt/cincan/auth/htpasswd "${USER_NAME}" "${PASSWORD}"; then
if [ ! -d "${BUILD_PATH}"/auth ]; then mkdir "${BUILD_PATH}"/auth; fi
if htpasswd -Bbc "${BUILD_PATH}"/auth/htpasswd "${USER_NAME}" "${PASSWORD}"; then
echo -e "$CHECK passwd file created for private registry"
else
echo -e "$ERROR Htpasswd failed, is it installed? (Install: apache2-utils for Debian based or httpd-tools for RedHat derived OS)"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment