Add guide
Some checks failed
rock-paper-scissors/pipeline/head Something is wrong with the build of this commit
Some checks failed
rock-paper-scissors/pipeline/head Something is wrong with the build of this commit
This commit is contained in:
21
Jenkinsfile
vendored
21
Jenkinsfile
vendored
@@ -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
|
||||
'''
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user