From b3eacbdd9d45c534abc216b3947e5ecc866295fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebasti=C3=A1n=20Ram=C3=ADrez?= Date: Tue, 26 May 2020 19:54:07 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Fix=20running=20generate=5Fregis?= =?UTF-8?q?try=5Fcertificates=20by=20default=20and=20returning=20to=20dire?= =?UTF-8?q?ctory?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- assets/runtime/functions | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/assets/runtime/functions b/assets/runtime/functions index ee1d3f95..449acd32 100644 --- a/assets/runtime/functions +++ b/assets/runtime/functions @@ -1651,6 +1651,7 @@ configure_gitlab() { gitlab_configure_cron_jobs gitlab_configure_analytics gitlab_configure_backups + generate_registry_certificates gitlab_configure_registry gitlab_configure_pages gitlab_configure_sentry @@ -1867,6 +1868,7 @@ execute_raketask() { generate_registry_certificates() { if [[ ${GITLAB_REGISTRY_GENERATE_INTERNAL_CERTIFICATES} == true ]]; then echo 'Generating GitLab Registry internal certificates for communication between Gitlab and a Docker Registry' + PREVIOUS_DIRECTORY=$(pwd) # Get directory from cert file path if [[ -z $GITLAB_REGISTRY_KEY_PATH ]]; then echo "\$GITLAB_REGISTRY_KEY_PATH is empty" @@ -1912,5 +1914,7 @@ generate_registry_certificates() { else openssl x509 -in registry.csr -out "$CERT_FILENAME" -req -signkey "$KEY_FILENAME" -days 10000 fi + chown -R ${GITLAB_USER}: ${DIRECTORY} + cd ${PREVIOUS_DIRECTORY} fi }