Update jenkinsfile

This commit is contained in:
2025-11-28 13:17:10 +00:00
parent f44ca08f6a
commit dd0478970b

View File

@@ -51,18 +51,19 @@ pipeline {
} }
} }
stage('Deployment') { stage('Deployment') {
steps { steps {
sh ''' withEnv(["DOCKER_HOST=unix:///var/run/docker.sock"]) {
CONTAINERS=$(docker ps -a --filter "label=com.docker.compose.project=${COMPOSE_PROJECT}" -q || true) sh '''
if [ -n "$CONTAINERS" ]; then cd gameovergne-app2 # si ton repo est dans ce dossier
docker rm -f $CONTAINERS
fi
echo "=== (Re)création de la stack MySQL + Spring + Angular ===" echo "=== Nettoyage de l'ancienne stack ==="
docker-compose up -d mysql spring angular docker-compose down -v || true
'''
} echo "=== (Re)création de la stack MySQL + Spring + Angular ==="
} docker-compose up -d mysql spring angular
'''
} }
}
}
} }