Date : 21/01/2026 12:50 - 13:25 Status : TERMINE
Finaliser le système Smart-Deploy avec documentation, health check enrichi, et test CI/CD complet.
Fichier : /stock_8to/33800-stack/projects/test-deploy/index.js
Health check enrichi retournant :
Endpoints de test :
POST /unhealthy - Force status unhealthy (test rollback)POST /healthy - Restore status healthyFichier : /stock_8to/33800-stack/scripts/deploy/lib/health.sh
Fonctions :
health_check() - Vérifie un service, parse le JSON, stocke les donnéeshealth_check_with_rollback() - Health check + rollback auto si échecstore_health_data() - Stocke les infos dans /monitoring/health-data/build_health_url() - Construit l'URL selon target et portConfiguration :
HEALTH_CHECK_TIMEOUT=30 (secondes)HEALTH_CHECK_RETRIES=10 (tentatives)HEALTH_CHECK_INTERVAL=3 (secondes entre tentatives)Ajout étape 9 (Health Check) :
Fichier : /stock_8to/33800-stack/scripts/deploy/README.md
Sections :
Fichier : /stock_8to/33800-stack/monitoring/generate.d/25-services.sh
Affiche :
URL : https://dashboard.nowhere84.com/services.html
Ajout :
LOG_PREFIX - Variable pour vérifier si common.sh est chargélog_debug() - Log conditionnel (DEBUG=1 ou VERBOSE=1)log_warn() - Alias pour log_warningPipeline GitLab #179-180 (project test-deploy) :
Résultat :
{
"status": "healthy",
"version": "1.1.0",
"uptime": { "seconds": 48, "human": "48s" },
"system": {
"hostname": "396f4a90c0b9",
"platform": "linux",
"nodeVersion": "v20.20.0",
"memory": { "used": 6, "total": 7, "unit": "MB" }
}
}
| Fichier | Action |
|---|---|
| scripts/deploy/lib/health.sh | Créé |
| scripts/deploy/lib/common.sh | Modifié (log_debug, LOG_PREFIX) |
| scripts/deploy/smart-deploy.sh | Modifié (étape 9 health check) |
| scripts/deploy/README.md | Créé |
| monitoring/generate.d/25-services.sh | Créé |
| monitoring/generate.sh | Modifié (appel generate_services) |
| projects/test-deploy/index.js | Modifié (health check enrichi) |