Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Co-authored-by: Mark Waite <[email protected]>
Co-authored-by: Tim Jacomb <[email protected]>
  • Loading branch information
3 people committed Jun 26, 2022
1 parent f471a2f commit cb89835
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 15 deletions.
1 change: 0 additions & 1 deletion 17/alpine/hotspot/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@ EXPOSE ${http_port}
# will be used by attached agents:
EXPOSE ${agent_port}

ENV JENKINS_ENABLE_FUTURE_JAVA=true
ENV COPY_REFERENCE_FILE_LOG $JENKINS_HOME/copy_reference_file.log

ENV JAVA_HOME=/opt/java/openjdk
Expand Down
1 change: 0 additions & 1 deletion 17/debian/bullseye-slim/hotspot/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,6 @@ EXPOSE ${http_port}
EXPOSE ${agent_port}

ENV COPY_REFERENCE_FILE_LOG $JENKINS_HOME/copy_reference_file.log
ENV JENKINS_ENABLE_FUTURE_JAVA=true

ENV JAVA_HOME=/opt/java/openjdk
ENV PATH "${JAVA_HOME}/bin:${PATH}"
Expand Down
1 change: 0 additions & 1 deletion 17/debian/bullseye/hotspot/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,6 @@ EXPOSE ${http_port}
EXPOSE ${agent_port}

ENV COPY_REFERENCE_FILE_LOG $JENKINS_HOME/copy_reference_file.log
ENV JENKINS_ENABLE_FUTURE_JAVA=true

ENV JAVA_HOME=/opt/java/openjdk
ENV PATH "${JAVA_HOME}/bin:${PATH}"
Expand Down
13 changes: 1 addition & 12 deletions jenkins.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,18 +42,7 @@ if [[ $# -lt 1 ]] || [[ "$1" == "--"* ]]; then
jenkins_opts_array+=( "$item" )
done < <([[ $JENKINS_OPTS ]] && xargs printf '%s\0' <<<"$JENKINS_OPTS")

FUTURE_OPTS=""
if [[ "$JENKINS_ENABLE_FUTURE_JAVA" ]] ; then
FUTURE_OPTS="--add-opens java.base/java.lang=ALL-UNNAMED
--add-opens=java.base/java.io=ALL-UNNAMED
--add-opens java.base/java.util=ALL-UNNAMED
--add-opens java.base/java.util.concurrent=ALL-UNNAMED
"
fi

# --add-opens won't get expanded properly with quotes around it
# shellcheck disable=SC2086
exec java -Duser.home="$JENKINS_HOME" ${FUTURE_OPTS} "${java_opts_array[@]}" -jar ${JENKINS_WAR} "${jenkins_opts_array[@]}" "$@"
exec java -Duser.home="$JENKINS_HOME" "${java_opts_array[@]}" -jar ${JENKINS_WAR} "${jenkins_opts_array[@]}" "$@"
fi

# As argument is not jenkins, assume user wants to run a different process, for example a `bash` shell to explore this image
Expand Down

0 comments on commit cb89835

Please sign in to comment.