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