From 9b540610e817f391ccbcf0b4673b8f65e833ff5c Mon Sep 17 00:00:00 2001 From: Philipp Pixel Date: Tue, 31 Mar 2020 08:26:27 +0200 Subject: [PATCH] #39 Configure nexus log verbosity --- Dockerfile | 2 +- dogu.json | 21 ++++++++++++++++--- .../resources/nexusConfParameters.json.tpl | 2 +- resources/startup.sh | 6 +++--- 4 files changed, 23 insertions(+), 8 deletions(-) diff --git a/Dockerfile b/Dockerfile index 61dc4e0..d3162ee 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ # registry.cloudogu.com/official/nexus -FROM registry.cloudogu.com/official/java:8u222-1 +FROM registry.cloudogu.com/official/java:8u242-1 LABEL maintainer="robert.auer@cloudogu.com" \ NAME="official/nexus" \ VERSION="3.19.1-1" diff --git a/dogu.json b/dogu.json index ec753ad..358c354 100644 --- a/dogu.json +++ b/dogu.json @@ -40,17 +40,32 @@ "Configuration": [ { "Name": "nexus.repository.sandbox.enable", - "Description": "Enable repository sandboxing", + "Description": "Enable repository sandboxing. This key is going to be deprecated. Please use 'enable_repository_sandbox' as direct replacement.", "Optional": true }, { "Name": "installDefaultDockerRegistry", - "Description": "If set to false, the default docker registry is not installed", + "Description": "If set to false, the default docker registry is not installed. This key is going to be deprecated. Please use 'install_default_docker_registry' as direct replacement.", "Optional": true }, { "Name": "disableOutreachManagement", - "Description": "Disable the outreach management capability", + "Description": "Disable the outreach management capability. This key is going to be deprecated. Please use 'disable_outreach_management' as direct replacement.", + "Optional": true + }, + { + "Name": "enable_repository_sandbox", + "Description": "Enable repository sandboxing.", + "Optional": true + }, + { + "Name": "install_default_docker_registry", + "Description": "If set to false, the default docker registry is not installed.", + "Optional": true + }, + { + "Name": "disable_outreach_management", + "Description": "Disable the outreach management capability.", "Optional": true } ], diff --git a/resources/opt/sonatype/nexus/resources/nexusConfParameters.json.tpl b/resources/opt/sonatype/nexus/resources/nexusConfParameters.json.tpl index 4d2dcce..8156627 100644 --- a/resources/opt/sonatype/nexus/resources/nexusConfParameters.json.tpl +++ b/resources/opt/sonatype/nexus/resources/nexusConfParameters.json.tpl @@ -4,7 +4,7 @@ "newAdminPassword": "{{ .Env.Get "NEWADMINPASSWORD" }}", "lastAdminGroup": "{{ .Config.GetOrDefault "admin_group_last" "" }}", "adminGroup": "{{ .GlobalConfig.Get "admin_group" }}", - "disableOutreachManagement": "{{ .Config.GetOrDefault "disableOutreachManagement" "false" }}", + "disableOutreachManagement": "{{ .Config.GetOrDefault "disable_outreach_management" "false" }}", {{ if .Config.Exists "proxyConfiguration/http/host" }} "proxyConfigurationHttpHost": "{{ .Config.Get "proxyConfiguration/http/host" }}"{{ end }}{{ if .Config.Exists "proxyConfiguration/http/port" }}, "proxyConfigurationHttpPort": {{ .Config.Get "proxyConfiguration/http/port" }}{{ end }}{{ if .Config.Exists "proxyConfiguration/http/authentication/username" }}, diff --git a/resources/startup.sh b/resources/startup.sh index 8105ea4..55f2d96 100755 --- a/resources/startup.sh +++ b/resources/startup.sh @@ -70,8 +70,8 @@ function setNexusProperties() { EOF echo "Checking if repository sandboxing should be enabled..." - if doguctl config nexus.repository.sandbox.enable >/dev/null; then - sandboxEnable=$(doguctl config nexus.repository.sandbox.enable) + if doguctl config enable_repository_sandbox >/dev/null; then + sandboxEnable=$(doguctl config enable_repository_sandbox) echo "Setting repository sandboxing to ${sandboxEnable}" echo "nexus.repository.sandbox.enable=${sandboxEnable}" >>${NEXUS_DATA_DIR}/etc/nexus.properties else @@ -217,7 +217,7 @@ if [ "$(doguctl config successfulInitialConfiguration)" != "true" ]; then exportNexusPasswordFromEtcd # Install default docker registry if not prohibited by etcd key - if "$(doguctl config --default true installDefaultDockerRegistry)" != "false"; then + if "$(doguctl config --default true install_default_docker_registry)" != "false"; then installDefaultDockerRegistry fi