Add guide
Some checks failed
rock-paper-scissors/pipeline/head Something is wrong with the build of this commit

This commit is contained in:
Maxime Pierront
2025-11-23 19:16:50 +01:00
parent e57896fd1e
commit 48ed50c6c7

21
Jenkinsfile vendored
View File

@@ -28,20 +28,21 @@ pipeline {
sh 'mvn package -DskipTests' sh 'mvn package -DskipTests'
} }
} }
stage('Déploiement') { stage('Déploiement DEBUG') {
steps { steps {
sh ''' sh '''
echo "PWD = $(pwd)" echo "=== Debug du démarrage Spring Boot sur 8081 (foreground) ==="
echo "Content of target/:" ls -lh target
ls -lh target || echo "No target directory"
echo "Which java?" JAR_FILE=$(ls target/*.jar | head -n 1)
which java || echo "java NOT in PATH" echo "Jar sélectionné: $JAR_FILE"
java -version || echo "java command failed"
echo "Trying to start app..." echo "Version de Java:"
nohup java -jar target/*.jar --server.port=8081 > app.log 2>&1 & which java || echo "java introuvable"
echo "PID started: $!" java -version || true
echo "Lancement de l'application en foreground (sans nohup)..."
java -jar "$JAR_FILE" --server.port=8081
''' '''
} }
} }