|
|
@ -17,8 +17,9 @@ set -euo pipefail
|
|
|
|
[ -n "${DEBUG:-}" ] && set -x
|
|
|
|
[ -n "${DEBUG:-}" ] && set -x
|
|
|
|
srcdir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
|
|
srcdir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
|
|
|
|
|
|
|
|
|
|
# shellcheck disable=SC1090
|
|
|
|
# could set this to DNS CNAME 'jenkins', but often these says we run in docker
|
|
|
|
#. "$srcdir/bash-tools/lib/utils.sh"
|
|
|
|
DEFAULT_JENKINS_HOST=localhost
|
|
|
|
|
|
|
|
DEFAULT_JENKINS_PORT=8080
|
|
|
|
|
|
|
|
|
|
|
|
java="${JAVA:-java}"
|
|
|
|
java="${JAVA:-java}"
|
|
|
|
jar="$srcdir/jenkins-cli.jar"
|
|
|
|
jar="$srcdir/jenkins-cli.jar"
|
|
|
@ -30,8 +31,8 @@ if ! which "$java" &>/dev/null; then
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
if [ -z "${JENKINS_URL:-}" ]; then
|
|
|
|
if [ -z "${JENKINS_URL:-}" ]; then
|
|
|
|
host="${JENKINS_HOST:-${HOST:-localhost}}"
|
|
|
|
host="${JENKINS_HOST:-${HOST:-$DEFAULT_JENKINS_HOST}}"
|
|
|
|
port="${JENKINS_PORT:-${PORT:-8080}}"
|
|
|
|
port="${JENKINS_PORT:-${PORT:-$DEFAULT_JENKINS_PORT}}"
|
|
|
|
http="http"
|
|
|
|
http="http"
|
|
|
|
if [ -n "${JENKINS_SSL:-}" ]; then
|
|
|
|
if [ -n "${JENKINS_SSL:-}" ]; then
|
|
|
|
http="https"
|
|
|
|
http="https"
|
|
|
|