From 051848e9d4a6f312f0486e79c6fe5bc093c41bfa Mon Sep 17 00:00:00 2001 From: Bitnami Bot Date: Wed, 18 Jan 2023 06:51:59 +0100 Subject: [PATCH] [bitnami/sonarqube] Release 8.9.10-debian-11-r30 (#20860) Signed-off-by: Bitnami Containers Signed-off-by: Bitnami Containers --- bitnami/sonarqube/8/debian-11/Dockerfile | 10 ++++---- .../opt/bitnami/.bitnami_components.json | 16 ++++++------- .../opt/bitnami/scripts/libsonarqube.sh | 24 +++++++++++++++++++ .../opt/bitnami/scripts/sonarqube-env.sh | 2 ++ .../bitnami/scripts/sonarqube/postunpack.sh | 2 +- 5 files changed, 40 insertions(+), 14 deletions(-) diff --git a/bitnami/sonarqube/8/debian-11/Dockerfile b/bitnami/sonarqube/8/debian-11/Dockerfile index e5f43abe8925..ccd28b734a6d 100644 --- a/bitnami/sonarqube/8/debian-11/Dockerfile +++ b/bitnami/sonarqube/8/debian-11/Dockerfile @@ -6,7 +6,7 @@ ARG TARGETARCH LABEL org.opencontainers.image.authors="https://bitnami.com/contact" \ org.opencontainers.image.description="Application packaged by Bitnami" \ org.opencontainers.image.licenses="Apache-2.0" \ - org.opencontainers.image.ref.name="8.9.10-debian-11-r29" \ + org.opencontainers.image.ref.name="8.9.10-debian-11-r30" \ org.opencontainers.image.source="https://github.com/bitnami/containers/tree/main/bitnami/sonarqube" \ org.opencontainers.image.title="sonarqube" \ org.opencontainers.image.vendor="VMware, Inc." \ @@ -23,10 +23,10 @@ SHELL ["/bin/bash", "-o", "pipefail", "-c"] RUN install_packages acl ca-certificates curl libbsd0 libedit2 libffi7 libgcc-s1 libgmp10 libgnutls30 libhogweed6 libicu67 libidn2-0 libldap-2.4-2 liblzma5 libmd0 libnettle8 libp11-kit0 libsasl2-2 libssl1.1 libstdc++6 libtasn1-6 libtinfo6 libunistring2 libuuid1 libxml2 libxslt1.1 procps zlib1g RUN mkdir -p /tmp/bitnami/pkg/cache/ && cd /tmp/bitnami/pkg/cache/ && \ COMPONENTS=( \ - "postgresql-client-15.1.0-0-linux-${OS_ARCH}-debian-11" \ - "java-11.0.17-7-2-linux-${OS_ARCH}-debian-11" \ - "sonarqube-8.9.10-1-linux-${OS_ARCH}-debian-11" \ - "gosu-1.16.0-0-linux-${OS_ARCH}-debian-11" \ + "postgresql-client-15.1.0-1-linux-${OS_ARCH}-debian-11" \ + "java-11.0.17-7-3-linux-${OS_ARCH}-debian-11" \ + "sonarqube-8.9.10-2-linux-${OS_ARCH}-debian-11" \ + "gosu-1.16.0-1-linux-${OS_ARCH}-debian-11" \ ) && \ for COMPONENT in "${COMPONENTS[@]}"; do \ if [ ! -f "${COMPONENT}.tar.gz" ]; then \ diff --git a/bitnami/sonarqube/8/debian-11/prebuildfs/opt/bitnami/.bitnami_components.json b/bitnami/sonarqube/8/debian-11/prebuildfs/opt/bitnami/.bitnami_components.json index badf5d9c88eb..a7d5e0d7f9a4 100644 --- a/bitnami/sonarqube/8/debian-11/prebuildfs/opt/bitnami/.bitnami_components.json +++ b/bitnami/sonarqube/8/debian-11/prebuildfs/opt/bitnami/.bitnami_components.json @@ -1,30 +1,30 @@ { "gosu": { "arch": "amd64", - "digest": "c42abbc5d57ba4c33c89e4daf46c33b0173565fbf533ef7a60281cf3283f611f", + "digest": "9ab9654690d90d3c49ff66fb1eb286487e318adc899d036bc45922f6b176865b", "distro": "debian-11", "type": "NAMI", - "version": "1.16.0-0" + "version": "1.16.0-1" }, "java": { "arch": "amd64", - "digest": "e2e6c8abc916f52a57d4af507b87da59ac3ae5cc0b1e8ea0f12756ebc90be8f5", + "digest": "1cc60ee01228bd4598f390da7e1729c084deeb8a2922a619c13c166a61657748", "distro": "debian-11", "type": "NAMI", - "version": "11.0.17-7-2" + "version": "11.0.17-7-3" }, "postgresql-client": { "arch": "amd64", - "digest": "b52b264c1ed3c900d650d320317d66287e15a734ab6e94de10270c939cc6ab75", + "digest": "cc4ffded73d67d6a9b9b69f351a58b249086f4171c11c95164fd36715af5b810", "distro": "debian-11", "type": "NAMI", - "version": "15.1.0-0" + "version": "15.1.0-1" }, "sonarqube": { "arch": "amd64", - "digest": "e2c4eb7596db708e6a78eaeeb6c563ed01698b01a2fcfb870fd14789c51ba5ad", + "digest": "dc1aac366e3536d01c769ebc8cf8c00c814618407fedc6e8eb9c9d1c5b13dbde", "distro": "debian-11", "type": "NAMI", - "version": "8.9.10-1" + "version": "8.9.10-2" } } \ No newline at end of file diff --git a/bitnami/sonarqube/8/debian-11/rootfs/opt/bitnami/scripts/libsonarqube.sh b/bitnami/sonarqube/8/debian-11/rootfs/opt/bitnami/scripts/libsonarqube.sh index 61fef7f70c15..77492c807fbd 100644 --- a/bitnami/sonarqube/8/debian-11/rootfs/opt/bitnami/scripts/libsonarqube.sh +++ b/bitnami/sonarqube/8/debian-11/rootfs/opt/bitnami/scripts/libsonarqube.sh @@ -204,6 +204,12 @@ EOF restore_persisted_app "$app_name" "$SONARQUBE_DATA_TO_PERSIST" fi + # Check and move provisioned extensions from mounted provisioning directory to application extensions directory + if ! is_mounted_dir_empty "$SONARQUBE_MOUNTED_PROVISIONING_DIR"; then + info "Found mounted extensions provisioning directory" + sonarqube_copy_mounted_config + fi + # At this point it is safe to expose SonarQube publicly sonarqube_conf_set "sonar.web.host" "0.0.0.0" sonarqube_conf_set "sonar.web.context" "$SONARQUBE_WEB_CONTEXT" @@ -377,3 +383,21 @@ sonarqube_stop() { debug_execute "${SONARQUBE_BIN_DIR}/sonar.sh" "stop" fi } + +######################## +# Copy mounted configuration files +# Globals: +# SONARQUBE_* +# Arguments: +# None +# Returns: +# None +######################### +sonarqube_copy_mounted_config() { + if ! is_dir_empty "$SONARQUBE_MOUNTED_PROVISIONING_DIR"; then + if ! cp -Lr "${SONARQUBE_MOUNTED_PROVISIONING_DIR}"/* "${SONARQUBE_EXTENSIONS_DIR}"; then + error "Issue copying mounted configuration files from $SONARQUBE_MOUNTED_PROVISIONING_DIR to $SONARQUBE_EXTENSIONS_DIR. Make sure you are not mounting configuration files in $SONARQUBE_MOUNTED_PROVISIONING_DIR and $SONARQUBE_EXTENSIONS_DIR at the same time" + exit 1 + fi + fi +} diff --git a/bitnami/sonarqube/8/debian-11/rootfs/opt/bitnami/scripts/sonarqube-env.sh b/bitnami/sonarqube/8/debian-11/rootfs/opt/bitnami/scripts/sonarqube-env.sh index bc4fba819ca8..82e54b5a2223 100644 --- a/bitnami/sonarqube/8/debian-11/rootfs/opt/bitnami/scripts/sonarqube-env.sh +++ b/bitnami/sonarqube/8/debian-11/rootfs/opt/bitnami/scripts/sonarqube-env.sh @@ -22,6 +22,7 @@ export BITNAMI_DEBUG="${BITNAMI_DEBUG:-false}" # By setting an environment variable matching *_FILE to a file path, the prefixed environment # variable will be overridden with the value specified in that file sonarqube_env_vars=( + SONARQUBE_MOUNTED_PROVISIONING_DIR SONARQUBE_DATA_TO_PERSIST SONARQUBE_PORT_NUMBER SONARQUBE_ELASTICSEARCH_PORT_NUMBER @@ -78,6 +79,7 @@ unset sonarqube_env_vars export SONARQUBE_BASE_DIR="${BITNAMI_ROOT_DIR}/sonarqube" export SONARQUBE_DATA_DIR="${SONARQUBE_BASE_DIR}/data" export SONARQUBE_EXTENSIONS_DIR="${SONARQUBE_BASE_DIR}/extensions" +export SONARQUBE_MOUNTED_PROVISIONING_DIR="${SONARQUBE_MOUNTED_PROVISIONING_DIR:-/bitnami/sonarqube-extensions}" export SONARQUBE_CONF_DIR="${SONARQUBE_BASE_DIR}/conf" export SONARQUBE_CONF_FILE="${SONARQUBE_CONF_DIR}/sonar.properties" export SONARQUBE_LOGS_DIR="${SONARQUBE_BASE_DIR}/logs" diff --git a/bitnami/sonarqube/8/debian-11/rootfs/opt/bitnami/scripts/sonarqube/postunpack.sh b/bitnami/sonarqube/8/debian-11/rootfs/opt/bitnami/scripts/sonarqube/postunpack.sh index 4e05d934bafd..389d53a71148 100755 --- a/bitnami/sonarqube/8/debian-11/rootfs/opt/bitnami/scripts/sonarqube/postunpack.sh +++ b/bitnami/sonarqube/8/debian-11/rootfs/opt/bitnami/scripts/sonarqube/postunpack.sh @@ -40,7 +40,7 @@ info "Configuring file permissions for SonarQube" ensure_group_exists "$SONARQUBE_DAEMON_GROUP" --gid "$SONARQUBE_DAEMON_GROUP_ID" ensure_user_exists "$SONARQUBE_DAEMON_USER" --system --uid "$SONARQUBE_DAEMON_USER_ID" --group "$SONARQUBE_DAEMON_GROUP" --append-groups "root" -for dir in "$SONARQUBE_DATA_DIR" "$SONARQUBE_EXTENSIONS_DIR" "$SONARQUBE_LOGS_DIR" "$SONARQUBE_TMP_DIR" "${SONARQUBE_BASE_DIR}/pids" "$SONARQUBE_VOLUME_DIR"; do +for dir in "$SONARQUBE_DATA_DIR" "$SONARQUBE_EXTENSIONS_DIR" "$SONARQUBE_LOGS_DIR" "$SONARQUBE_TMP_DIR" "$SONARQUBE_MOUNTED_PROVISIONING_DIR" "${SONARQUBE_BASE_DIR}/pids" "$SONARQUBE_VOLUME_DIR"; do ensure_dir_exists "$dir" # Use daemon:root ownership for compatibility when running as a non-root user configure_permissions_ownership "$dir" -d "775" -f "664" -u "$SONARQUBE_DAEMON_USER" -g "root"