Gitlab CI/CD Pipeline

This commit is contained in:
2025-05-29 18:51:59 +00:00
parent cb4eb80105
commit 5a73be331b
30 changed files with 432 additions and 144 deletions

26
backend/entrypoint.sh Normal file
View 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"