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'
|
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
|
||||||
'''
|
'''
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user