Skip to content

Commit

Permalink
Updates to jetty.sh and testing to reduce failures
Browse files Browse the repository at this point in the history
Backport of #10790 to Jetty 10.

+ Making sure /etc/default/jetty is populated correctly in the user_change mode
+ Removing warnings from jetty startup about --start-log-file=... being unrecognized
+ Adding unique jetty10 identifier to docker image names (helps to keep different jetty versions apart when manually testing)

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
  • Loading branch information
joakime committed Oct 26, 2023
1 parent 92f62a1 commit 31b5518
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions jetty-home/src/main/resources/bin/jetty.sh
Original file line number Diff line number Diff line change
Expand Up @@ -635,13 +635,13 @@ case "$ACTION" in
chown "$JETTY_USER" "$JETTY_PID"
su - "$JETTY_USER" $SU_SHELL -c "
cd \"$JETTY_BASE\"
echo ${RUN_ARGS[*]} --start-log-file=\"$JETTY_START_LOG\" | xargs ${JAVA} > /dev/null &
echo ${RUN_ARGS[*]} | xargs ${JAVA} > /dev/null &
PID=\$!
disown \$PID"
(( DEBUG )) && echo "Starting: su shell (w/user $JETTY_USER) on PID $PID"
else
# Startup if not switching users
echo ${RUN_ARGS[*]} --start-log-file="${JETTY_START_LOG}" | xargs ${JAVA} > /dev/null &
echo ${RUN_ARGS[*]} | xargs ${JAVA} > /dev/null &
PID=$!
disown $PID
(( DEBUG )) && echo "Starting: java command on PID $PID"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public class ImageOSAmazonCorretto11 extends ImageOS
{
public ImageOSAmazonCorretto11()
{
super("amazoncorretto-jdk11",
super("amazoncorretto-jdk11-jetty10",
builder ->
builder
.from("amazoncorretto:11.0.20")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public class ImageOSUbuntuJammyJDK17 extends ImageOS
{
public ImageOSUbuntuJammyJDK17()
{
super("ubuntu-22.04-jdk17",
super("ubuntu-22.04-jdk17-jetty10",
builder ->
builder
.from("ubuntu:22.04")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public ImageUserChange(ImageOS osImage)
"useradd --home-dir=${JETTY_BASE} --shell=/bin/bash jetty ; " +
"chown jetty:jetty ${JETTY_BASE} ; " +
"chmod a+w ${JETTY_BASE} ; " +
"echo \"JETTY_USER=jetty\" > /etc/default/jetty") // user change
"echo \"JETTY_USER=jetty\" >> /etc/default/jetty") // user change
.user("jetty")
// Configure Jetty Base
.workDir("${JETTY_BASE}")
Expand Down

0 comments on commit 31b5518

Please sign in to comment.