From 3b6da38f6d1c05bfe1ada7b146c97412e0162490 Mon Sep 17 00:00:00 2001 From: ZeinebMESSAOUDI <130365664+Zeineb2001@users.noreply.github.com> Date: Mon, 18 Nov 2024 23:51:08 +0100 Subject: [PATCH] Update catalog-service-ci-cd.yml --- .github/workflows/catalog-service-ci-cd.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/catalog-service-ci-cd.yml b/.github/workflows/catalog-service-ci-cd.yml index 7d3c5abb..0b0650d8 100644 --- a/.github/workflows/catalog-service-ci-cd.yml +++ b/.github/workflows/catalog-service-ci-cd.yml @@ -80,5 +80,15 @@ jobs: password: ${{ secrets.DEPLOYMENT_MACHINE_USER_PSW }} script: | mkdir -p ~/service-catalog + + # Tuer le processus existant Java si présent pkill -f 'java.*service-catalog.jar' || true + + # Attendre 5 secondes avant de relancer le service + sleep 5 + + # Lancer le service en arrière-plan nohup java -jar ~/service-catalog/service-catalog.jar --server.port=8082 > ~/service-catalog/app.log 2>&1 & + + # Vérification des logs pour détecter des erreurs + tail -n 10 ~/service-catalog/app.log