2.332.2-debian-10-r25 release

This commit is contained in:
Bitnami Bot
2022-05-11 01:55:38 +00:00
committed by Bitnami Containers
parent 03192b8bc8
commit 83329f4931
4 changed files with 20 additions and 13 deletions

View File

@@ -31,7 +31,7 @@ jenkins_env_vars=(
JENKINS_EXTERNAL_HTTP_PORT_NUMBER
JENKINS_EXTERNAL_HTTPS_PORT_NUMBER
JENKINS_HOST
JENKINS_ENABLE_HTTPS
JENKINS_FORCE_HTTPS
JENKINS_SKIP_BOOTSTRAP
JENKINS_ENABLE_SWARM
JENKINS_USERNAME
@@ -87,7 +87,7 @@ export JENKINS_JNLP_PORT_NUMBER="${JENKINS_JNLP_PORT_NUMBER:-}"
export JENKINS_EXTERNAL_HTTP_PORT_NUMBER="${JENKINS_EXTERNAL_HTTP_PORT_NUMBER:-80}"
export JENKINS_EXTERNAL_HTTPS_PORT_NUMBER="${JENKINS_EXTERNAL_HTTPS_PORT_NUMBER:-443}"
export JENKINS_HOST="${JENKINS_HOST:-}"
export JENKINS_ENABLE_HTTPS="${JENKINS_ENABLE_HTTPS:-no}"
export JENKINS_FORCE_HTTPS="${JENKINS_FORCE_HTTPS:-no}"
JENKINS_SKIP_BOOTSTRAP="${JENKINS_SKIP_BOOTSTRAP:-"${DISABLE_JENKINS_INITIALIZATION:-}"}"
export JENKINS_SKIP_BOOTSTRAP="${JENKINS_SKIP_BOOTSTRAP:-no}" # only used during the first initialization
export JENKINS_ENABLE_SWARM="${JENKINS_ENABLE_SWARM:-no}"

View File

@@ -16,21 +16,23 @@ set -o pipefail
declare -a args
if [[ -n "${JAVA_OPTS:-}" ]]; then
read -r -a java_opts <<< "$JAVA_OPTS"
read -r -a java_opts <<<"$JAVA_OPTS"
args+=("${java_opts[@]}")
fi
args+=("-Duser.home=${JENKINS_HOME}" "-jar" "${JENKINS_BASE_DIR}/jenkins.war")
if is_boolean_yes "$JENKINS_ENABLE_HTTPS"; then
if is_boolean_yes "$JENKINS_FORCE_HTTPS"; then
args+=(
"--httpPort=-1"
"--httpsPort=${JENKINS_HTTPS_PORT_NUMBER:-"$JENKINS_DEFAULT_HTTPS_PORT_NUMBER"}"
"--httpsListenAddress=${JENKINS_HTTPS_LISTEN_ADDRESS:-"$JENKINS_DEFAULT_HTTPS_LISTEN_ADDRESS"}"
)
else
args+=(
"--httpPort=${JENKINS_HTTP_PORT_NUMBER:-"$JENKINS_DEFAULT_HTTP_PORT_NUMBER"}"
"--httpListenAddress=${JENKINS_HTTP_LISTEN_ADDRESS:-"$JENKINS_DEFAULT_HTTP_LISTEN_ADDRESS"}"
)
args+=(
"--httpPort=${JENKINS_HTTP_PORT_NUMBER:-"$JENKINS_DEFAULT_HTTP_PORT_NUMBER"}"
"--httpListenAddress=${JENKINS_HTTP_LISTEN_ADDRESS:-"$JENKINS_DEFAULT_HTTP_LISTEN_ADDRESS"}"
"--httpsPort=${JENKINS_HTTPS_PORT_NUMBER:-"$JENKINS_DEFAULT_HTTPS_PORT_NUMBER"}"
"--httpsListenAddress=${JENKINS_HTTPS_LISTEN_ADDRESS:-"$JENKINS_DEFAULT_HTTPS_LISTEN_ADDRESS"}"
)
fi
args+=("$@")

View File

@@ -168,7 +168,7 @@ jenkins_validate() {
check_conflicting_ports "JENKINS_HTTP_PORT_NUMBER" "JENKINS_HTTPS_PORT_NUMBER" "JENKINS_JNLP_PORT_NUMBER"
# Validate host
check_yes_no_value "JENKINS_ENABLE_HTTPS"
check_yes_no_value "JENKINS_FORCE_HTTPS"
if ! is_empty_value "$JENKINS_HOST"; then
check_resolved_hostname "$JENKINS_HOST"
[[ "$JENKINS_HOST" =~ localhost ]] && print_validation_error "JENKINS_HOST must be set to an actual hostname, localhost values are not allowed."
@@ -258,9 +258,9 @@ jenkins_configure_host() {
local base_url
local scheme
is_boolean_yes "$JENKINS_ENABLE_HTTPS" && scheme="https" || scheme="http"
is_boolean_yes "$JENKINS_FORCE_HTTPS" && scheme="https" || scheme="http"
base_url="${scheme}://${hostname}"
if is_boolean_yes "$JENKINS_ENABLE_HTTPS"; then
if is_boolean_yes "$JENKINS_FORCE_HTTPS"; then
[[ "$JENKINS_EXTERNAL_HTTPS_PORT_NUMBER" != "443" ]] && base_url+=":${JENKINS_EXTERNAL_HTTPS_PORT_NUMBER}"
else
[[ "$JENKINS_EXTERNAL_HTTP_PORT_NUMBER" != "80" ]] && base_url+=":${JENKINS_EXTERNAL_HTTP_PORT_NUMBER}"