Skip to content

Commit adafa1b

Browse files
committed
Apply for all components
Signed-off-by: Viet Nguyen Duc <[email protected]>
1 parent be0c6a5 commit adafa1b

File tree

9 files changed

+86
-24
lines changed

9 files changed

+86
-24
lines changed

Distributor/start-selenium-grid-distributor.sh

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,11 +150,18 @@ if [ ! -z "$SE_NEW_SESSION_THREAD_POOL_SIZE" ]; then
150150
fi
151151

152152
EXTRA_LIBS=""
153+
if [ -n "${SE_EXTRA_LIBS}" ]; then
154+
echo "Adding external jars to classpath: ${SE_EXTRA_LIBS}"
155+
EXTRA_LIBS="--ext ${SE_EXTRA_LIBS}"
156+
fi
153157

154158
if [ "${SE_ENABLE_TRACING}" = "true" ] && [ -n "${SE_OTEL_EXPORTER_ENDPOINT}" ]; then
155159
EXTERNAL_JARS=$(</external_jars/.classpath.txt)
156-
[ -n "$EXTRA_LIBS" ] && [ -n "${EXTERNAL_JARS}" ] && EXTRA_LIBS=${EXTRA_LIBS}:
157-
EXTRA_LIBS="--ext "${EXTRA_LIBS}${EXTERNAL_JARS}
160+
if [ -n "${EXTRA_LIBS}" ] && [ -n "${EXTERNAL_JARS}" ]; then
161+
EXTRA_LIBS="${EXTRA_LIBS}:${EXTERNAL_JARS}"
162+
elif [ -z "${EXTRA_LIBS}" ] && [ -n "${EXTERNAL_JARS}" ]; then
163+
EXTRA_LIBS="--ext ${EXTERNAL_JARS}"
164+
fi
158165
echo "Tracing is enabled"
159166
echo "Classpath will be enriched with these external jars : " ${EXTRA_LIBS}
160167
if [ -n "$SE_OTEL_SERVICE_NAME" ]; then

EventBus/start-selenium-grid-eventbus.sh

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,11 +80,18 @@ if [ "${SE_ENABLE_TLS}" = "true" ]; then
8080
fi
8181

8282
EXTRA_LIBS=""
83+
if [ -n "${SE_EXTRA_LIBS}" ]; then
84+
echo "Adding external jars to classpath: ${SE_EXTRA_LIBS}"
85+
EXTRA_LIBS="--ext ${SE_EXTRA_LIBS}"
86+
fi
8387

8488
if [ "${SE_ENABLE_TRACING}" = "true" ] && [ -n "${SE_OTEL_EXPORTER_ENDPOINT}" ]; then
8589
EXTERNAL_JARS=$(</external_jars/.classpath.txt)
86-
[ -n "$EXTRA_LIBS" ] && [ -n "${EXTERNAL_JARS}" ] && EXTRA_LIBS=${EXTRA_LIBS}:
87-
EXTRA_LIBS="--ext "${EXTRA_LIBS}${EXTERNAL_JARS}
90+
if [ -n "${EXTRA_LIBS}" ] && [ -n "${EXTERNAL_JARS}" ]; then
91+
EXTRA_LIBS="${EXTRA_LIBS}:${EXTERNAL_JARS}"
92+
elif [ -z "${EXTRA_LIBS}" ] && [ -n "${EXTERNAL_JARS}" ]; then
93+
EXTRA_LIBS="--ext ${EXTERNAL_JARS}"
94+
fi
8895
echo "Tracing is enabled"
8996
echo "Classpath will be enriched with these external jars : " ${EXTRA_LIBS}
9097
if [ -n "$SE_OTEL_SERVICE_NAME" ]; then

Hub/start-selenium-grid-hub.sh

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,11 +130,18 @@ if [ ! -z "${CONFIG_FILE}" ]; then
130130
fi
131131

132132
EXTRA_LIBS=""
133+
if [ -n "${SE_EXTRA_LIBS}" ]; then
134+
echo "Adding external jars to classpath: ${SE_EXTRA_LIBS}"
135+
EXTRA_LIBS="--ext ${SE_EXTRA_LIBS}"
136+
fi
133137

134138
if [ "${SE_ENABLE_TRACING}" = "true" ] && [ -n "${SE_OTEL_EXPORTER_ENDPOINT}" ]; then
135139
EXTERNAL_JARS=$(</external_jars/.classpath.txt)
136-
[ -n "$EXTRA_LIBS" ] && [ -n "${EXTERNAL_JARS}" ] && EXTRA_LIBS=${EXTRA_LIBS}:
137-
EXTRA_LIBS="--ext "${EXTRA_LIBS}${EXTERNAL_JARS}
140+
if [ -n "${EXTRA_LIBS}" ] && [ -n "${EXTERNAL_JARS}" ]; then
141+
EXTRA_LIBS="${EXTRA_LIBS}:${EXTERNAL_JARS}"
142+
elif [ -z "${EXTRA_LIBS}" ] && [ -n "${EXTERNAL_JARS}" ]; then
143+
EXTRA_LIBS="--ext ${EXTERNAL_JARS}"
144+
fi
138145
echo "Tracing is enabled"
139146
echo "Classpath will be enriched with these external jars : " ${EXTRA_LIBS}
140147
if [ -n "$SE_OTEL_SERVICE_NAME" ]; then

NodeDocker/start-selenium-grid-docker.sh

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,11 +97,18 @@ echo "Selenium Grid Node Docker configuration: "
9797
cat "${CONFIG_FILE}"
9898

9999
EXTRA_LIBS=""
100+
if [ -n "${SE_EXTRA_LIBS}" ]; then
101+
echo "Adding external jars to classpath: ${SE_EXTRA_LIBS}"
102+
EXTRA_LIBS="--ext ${SE_EXTRA_LIBS}"
103+
fi
100104

101105
if [ "${SE_ENABLE_TRACING}" = "true" ] && [ -n "${SE_OTEL_EXPORTER_ENDPOINT}" ]; then
102106
EXTERNAL_JARS=$(</external_jars/.classpath.txt)
103-
[ -n "$EXTRA_LIBS" ] && [ -n "${EXTERNAL_JARS}" ] && EXTRA_LIBS=${EXTRA_LIBS}:
104-
EXTRA_LIBS="--ext "${EXTRA_LIBS}${EXTERNAL_JARS}
107+
if [ -n "${EXTRA_LIBS}" ] && [ -n "${EXTERNAL_JARS}" ]; then
108+
EXTRA_LIBS="${EXTRA_LIBS}:${EXTERNAL_JARS}"
109+
elif [ -z "${EXTRA_LIBS}" ] && [ -n "${EXTERNAL_JARS}" ]; then
110+
EXTRA_LIBS="--ext ${EXTERNAL_JARS}"
111+
fi
105112
echo "Tracing is enabled"
106113
echo "Classpath will be enriched with these external jars : " ${EXTRA_LIBS}
107114
if [ -n "$SE_OTEL_SERVICE_NAME" ]; then

Router/start-selenium-grid-router.sh

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,11 +131,18 @@ if [ ! -z "$SE_ROUTER_PASSWORD" ]; then
131131
fi
132132

133133
EXTRA_LIBS=""
134+
if [ -n "${SE_EXTRA_LIBS}" ]; then
135+
echo "Adding external jars to classpath: ${SE_EXTRA_LIBS}"
136+
EXTRA_LIBS="--ext ${SE_EXTRA_LIBS}"
137+
fi
134138

135139
if [ "${SE_ENABLE_TRACING}" = "true" ] && [ -n "${SE_OTEL_EXPORTER_ENDPOINT}" ]; then
136140
EXTERNAL_JARS=$(</external_jars/.classpath.txt)
137-
[ -n "$EXTRA_LIBS" ] && [ -n "${EXTERNAL_JARS}" ] && EXTRA_LIBS=${EXTRA_LIBS}:
138-
EXTRA_LIBS="--ext "${EXTRA_LIBS}${EXTERNAL_JARS}
141+
if [ -n "${EXTRA_LIBS}" ] && [ -n "${EXTERNAL_JARS}" ]; then
142+
EXTRA_LIBS="${EXTRA_LIBS}:${EXTERNAL_JARS}"
143+
elif [ -z "${EXTRA_LIBS}" ] && [ -n "${EXTERNAL_JARS}" ]; then
144+
EXTRA_LIBS="--ext ${EXTERNAL_JARS}"
145+
fi
139146
echo "Tracing is enabled"
140147
echo "Classpath will be enriched with these external jars : " ${EXTRA_LIBS}
141148
if [ -n "$SE_OTEL_SERVICE_NAME" ]; then

SessionQueue/start-selenium-grid-session-queue.sh

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,11 +84,18 @@ if [ ! -z "$SE_REGISTRATION_SECRET" ]; then
8484
fi
8585

8686
EXTRA_LIBS=""
87+
if [ -n "${SE_EXTRA_LIBS}" ]; then
88+
echo "Adding external jars to classpath: ${SE_EXTRA_LIBS}"
89+
EXTRA_LIBS="--ext ${SE_EXTRA_LIBS}"
90+
fi
8791

8892
if [ "${SE_ENABLE_TRACING}" = "true" ] && [ -n "${SE_OTEL_EXPORTER_ENDPOINT}" ]; then
8993
EXTERNAL_JARS=$(</external_jars/.classpath.txt)
90-
[ -n "$EXTRA_LIBS" ] && [ -n "${EXTERNAL_JARS}" ] && EXTRA_LIBS=${EXTRA_LIBS}:
91-
EXTRA_LIBS="--ext "${EXTRA_LIBS}${EXTERNAL_JARS}
94+
if [ -n "${EXTRA_LIBS}" ] && [ -n "${EXTERNAL_JARS}" ]; then
95+
EXTRA_LIBS="${EXTRA_LIBS}:${EXTERNAL_JARS}"
96+
elif [ -z "${EXTRA_LIBS}" ] && [ -n "${EXTERNAL_JARS}" ]; then
97+
EXTRA_LIBS="--ext ${EXTERNAL_JARS}"
98+
fi
9299
echo "Tracing is enabled"
93100
echo "Classpath will be enriched with these external jars : " ${EXTRA_LIBS}
94101
if [ -n "$SE_OTEL_SERVICE_NAME" ]; then

Sessions/start-selenium-grid-sessions.sh

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -106,11 +106,18 @@ if [ ! -z "${CONFIG_FILE}" ]; then
106106
fi
107107

108108
EXTRA_LIBS=""
109+
if [ -n "${SE_EXTRA_LIBS}" ]; then
110+
echo "Adding external jars to classpath: ${SE_EXTRA_LIBS}"
111+
EXTRA_LIBS="--ext ${SE_EXTRA_LIBS}"
112+
fi
109113

110114
if [ "${SE_ENABLE_TRACING}" = "true" ] && [ -n "${SE_OTEL_EXPORTER_ENDPOINT}" ]; then
111115
EXTERNAL_JARS=$(</external_jars/.classpath.txt)
112-
[ -n "$EXTRA_LIBS" ] && [ -n "${EXTERNAL_JARS}" ] && EXTRA_LIBS=${EXTRA_LIBS}:
113-
EXTRA_LIBS="${EXTRA_LIBS}${EXTERNAL_JARS}"
116+
if [ -n "${EXTRA_LIBS}" ] && [ -n "${EXTERNAL_JARS}" ]; then
117+
EXTRA_LIBS="${EXTRA_LIBS}:${EXTERNAL_JARS}"
118+
elif [ -z "${EXTRA_LIBS}" ] && [ -n "${EXTERNAL_JARS}" ]; then
119+
EXTRA_LIBS="--ext ${EXTERNAL_JARS}"
120+
fi
114121
echo "Tracing is enabled"
115122
echo "Classpath will be enriched with these external jars : " ${EXTRA_LIBS}
116123
if [ -n "$SE_OTEL_SERVICE_NAME" ]; then
@@ -136,12 +143,11 @@ fi
136143

137144
if [ "${SE_SESSIONS_MAP_EXTERNAL_DATASTORE}" = "true" ]; then
138145
EXTERNAL_JARS=$(</external_jars/.classpath_session_map.txt)
139-
[ -n "$EXTRA_LIBS" ] && [ -n "${EXTERNAL_JARS}" ] && EXTRA_LIBS=${EXTRA_LIBS}:
140-
EXTRA_LIBS="${EXTRA_LIBS}${EXTERNAL_JARS}"
141-
fi
142-
143-
if [ -n "${EXTRA_LIBS}" ]; then
144-
EXTRA_LIBS="--ext ${EXTRA_LIBS}"
146+
if [ -n "${EXTRA_LIBS}" ] && [ -n "${EXTERNAL_JARS}" ]; then
147+
EXTRA_LIBS="${EXTRA_LIBS}:${EXTERNAL_JARS}"
148+
elif [ -z "${EXTRA_LIBS}" ] && [ -n "${EXTERNAL_JARS}" ]; then
149+
EXTRA_LIBS="--ext ${EXTERNAL_JARS}"
150+
fi
145151
fi
146152

147153
cat "$CONFIG_FILE"

Standalone/start-selenium-standalone.sh

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,11 +129,18 @@ cat "${CONFIG_FILE}"
129129
echo "Starting Selenium Grid Standalone..."
130130

131131
EXTRA_LIBS=""
132+
if [ -n "${SE_EXTRA_LIBS}" ]; then
133+
echo "Adding external jars to classpath: ${SE_EXTRA_LIBS}"
134+
EXTRA_LIBS="--ext ${SE_EXTRA_LIBS}"
135+
fi
132136

133137
if [ "${SE_ENABLE_TRACING}" = "true" ] && [ -n "${SE_OTEL_EXPORTER_ENDPOINT}" ]; then
134138
EXTERNAL_JARS=$(</external_jars/.classpath.txt)
135-
[ -n "$EXTRA_LIBS" ] && [ -n "${EXTERNAL_JARS}" ] && EXTRA_LIBS=${EXTRA_LIBS}:
136-
EXTRA_LIBS="--ext "${EXTRA_LIBS}${EXTERNAL_JARS}
139+
if [ -n "${EXTRA_LIBS}" ] && [ -n "${EXTERNAL_JARS}" ]; then
140+
EXTRA_LIBS="${EXTRA_LIBS}:${EXTERNAL_JARS}"
141+
elif [ -z "${EXTRA_LIBS}" ] && [ -n "${EXTERNAL_JARS}" ]; then
142+
EXTRA_LIBS="--ext ${EXTERNAL_JARS}"
143+
fi
137144
echo "Tracing is enabled"
138145
echo "Classpath will be enriched with these external jars : " ${EXTRA_LIBS}
139146
if [ -n "$SE_OTEL_SERVICE_NAME" ]; then

StandaloneDocker/start-selenium-grid-docker.sh

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,11 +102,18 @@ echo "Selenium Grid Standalone Docker configuration: "
102102
cat "${CONFIG_FILE}"
103103

104104
EXTRA_LIBS=""
105+
if [ -n "${SE_EXTRA_LIBS}" ]; then
106+
echo "Adding external jars to classpath: ${SE_EXTRA_LIBS}"
107+
EXTRA_LIBS="--ext ${SE_EXTRA_LIBS}"
108+
fi
105109

106110
if [ "${SE_ENABLE_TRACING}" = "true" ] && [ -n "${SE_OTEL_EXPORTER_ENDPOINT}" ]; then
107111
EXTERNAL_JARS=$(</external_jars/.classpath.txt)
108-
[ -n "$EXTRA_LIBS" ] && [ -n "${EXTERNAL_JARS}" ] && EXTRA_LIBS=${EXTRA_LIBS}:
109-
EXTRA_LIBS="--ext "${EXTRA_LIBS}${EXTERNAL_JARS}
112+
if [ -n "${EXTRA_LIBS}" ] && [ -n "${EXTERNAL_JARS}" ]; then
113+
EXTRA_LIBS="${EXTRA_LIBS}:${EXTERNAL_JARS}"
114+
elif [ -z "${EXTRA_LIBS}" ] && [ -n "${EXTERNAL_JARS}" ]; then
115+
EXTRA_LIBS="--ext ${EXTERNAL_JARS}"
116+
fi
110117
echo "Tracing is enabled"
111118
echo "Classpath will be enriched with these external jars : " ${EXTRA_LIBS}
112119
if [ -n "$SE_OTEL_SERVICE_NAME" ]; then

0 commit comments

Comments
 (0)