From d8655294008dfbcde8c27b62a932766c62d8548b Mon Sep 17 00:00:00 2001 From: ZeinebMESSAOUDI <130365664+Zeineb2001@users.noreply.github.com> Date: Sat, 30 Nov 2024 16:09:04 +0100 Subject: [PATCH] Stop any running service --- .github/workflows/catalog-service-ci-cd.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/catalog-service-ci-cd.yml b/.github/workflows/catalog-service-ci-cd.yml index 0605949d..ba6b3372 100644 --- a/.github/workflows/catalog-service-ci-cd.yml +++ b/.github/workflows/catalog-service-ci-cd.yml @@ -79,7 +79,8 @@ jobs: username: ${{ secrets.DEPLOYMENT_MACHINE_USER }} password: ${{ secrets.DEPLOYMENT_MACHINE_USER_PSW }} script: | - + echo "Stopping any running service..." + pkill -f "java -jar service-catalog.jar" || echo "No service to stop." sleep 10 echo "Starting Java service..."