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