Gitlab CI/CD Pipeline
This commit is contained in:
26
backend/entrypoint.sh
Normal file
26
backend/entrypoint.sh
Normal file
@@ -0,0 +1,26 @@
|
||||
#!/bin/sh
|
||||
|
||||
echo "---------------------------"
|
||||
echo "Starting Java Application"
|
||||
echo "Main class : ${MAIN_CLASS}"
|
||||
echo "App JAR : app.jar"
|
||||
echo "Libs folder : libs/"
|
||||
echo "Detected JARs in libs/:"
|
||||
find libs -type f -name "*.jar" -exec echo " -> {}" \;
|
||||
|
||||
if [ ! -f app.jar ]; then
|
||||
echo "ERROR: app.jar not found. Ensure it is copied into the container."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Build classpath string
|
||||
CLASSPATH="app.jar"
|
||||
for jar in libs/*.jar; do
|
||||
CLASSPATH="$CLASSPATH:$jar"
|
||||
done
|
||||
|
||||
echo "---------------------------"
|
||||
echo "Executing: java -cp \"$CLASSPATH\" $MAIN_CLASS"
|
||||
echo "---------------------------"
|
||||
|
||||
exec java -cp "$CLASSPATH" "$MAIN_CLASS"
|
||||
Reference in New Issue
Block a user