
- Contexte: service 4NK_certificator (port, endpoints, compose dédié) - IA_agents: section d’avancement + liens repo/spec - CI_TRIGGER_PROCESS: entrée 4NK_certificator (CI à configurer)
6.0 KiB
6.0 KiB
Processus de Déclenchement des CI
📋 Vue d'ensemble
Ce document explique comment déclencher les CI pour tous les projets du LeCoffre Node.
🔧 Mécanisme de déclenchement
Principe
- Branche Git :
ext
(pour le développement) - Tag Git :
ext
(pour déclencher les CI) - Image Docker :
ext
(résultat des CI)
Workflow
- Développement sur la branche
ext
- Création d'un tag Git
ext
- Push du tag → déclenchement automatique de la CI
- Construction de l'image Docker
git.4nkweb.com/4nk/{project}:ext
🏗️ Projets avec CI
Projet | Workflow | Image Docker | Status |
---|---|---|---|
sdk_relay |
.gitea/workflows/build-ext.yml |
git.4nkweb.com/4nk/sdk_relay:ext |
✅ CI configurée |
sdk_storage |
.gitea/workflows/build-ext.yml |
git.4nkweb.com/4nk/sdk_storage:ext |
✅ CI configurée |
ihm_client |
.gitea/workflows/docker-ext.yml |
git.4nkweb.com/4nk/ihm_client:ext |
✅ CI configurée |
lecoffre-front |
.gitea/workflows/build-ext.yml |
git.4nkweb.com/4nk/lecoffre-front:ext |
✅ CI configurée |
4NK_certificator |
(à définir) | git.4nkweb.com/4nk/4nk_certificator:ext |
⏳ CI à configurer |
🚀 Commandes pour déclencher les CI
Pour un projet spécifique
cd /home/debian/4NK_env/{project}
git tag -a ext -m "ci: docker_tag=ext - Description du changement"
git push origin refs/tags/ext
Commandes spécifiques par projet
1. sdk_relay
cd /home/debian/4NK_env/sdk_relay
git tag -a ext -m "ci: docker_tag=ext - Trigger CI build for sdk_relay"
git push origin refs/tags/ext
- Workflow:
.gitea/workflows/build-ext.yml
- Image Docker:
git.4nkweb.com/4nk/sdk_relay:ext
- Tags existants:
ci-trigger-ext
,ext
2. sdk_storage
cd /home/debian/4NK_env/sdk_storage
git tag -a ext -m "ci: docker_tag=ext - Trigger CI build for sdk_storage"
git push origin refs/tags/ext
- Workflow:
.gitea/workflows/build-ext.yml
- Image Docker:
git.4nkweb.com/4nk/sdk_storage:ext
- Tags existants:
ext
4. ihm_client
cd /home/debian/4NK_env/ihm_client
git tag -a ext -m "ci: docker_tag=ext - Trigger CI build for ihm_client"
git push origin refs/tags/ext
- Workflow:
.gitea/workflows/docker-ext.yml
- Image Docker:
git.4nkweb.com/4nk/ihm_client:ext
- Tags existants:
ext
- Note: Utilise un workflow différent (docker-ext.yml au lieu de build-ext.yml)
5. lecoffre-front
cd /home/debian/4NK_env/lecoffre-front
git tag -a ext -m "ci: docker_tag=ext - Trigger CI build for lecoffre-front"
git push origin refs/tags/ext
- Workflow:
.gitea/workflows/build-ext.yml
- Image Docker:
git.4nkweb.com/4nk/lecoffre-front:ext
- Tags existants:
ext
Pour tous les projets
cd /home/debian/4NK_env
for project in sdk_relay sdk_storageihm_client lecoffre-front; do
echo "=== Déclenchement CI pour $project ==="
cd $project
git tag -a ext -m "ci: docker_tag=ext - Trigger CI build for $project"
git push origin refs/tags/ext
cd ..
done
📝 Messages de commit recommandés
Format standard
ci: docker_tag=ext - Description du changement
Exemples
ci: docker_tag=ext - Fix config file reading logic
ci: docker_tag=ext - Update dependencies and build process
ci: docker_tag=ext - Add new features for relay service
⚠️ Points d'attention
Distinction importante
- Branche
ext
: Pour le développement (git branch ext) - Tag
ext
: Pour déclencher les CI (git tag ext) - Image
ext
: Résultat des CI (docker pull ...:ext)
Types de workflows
Workflow build-ext.yml (standard)
- Projets: sdk_relay, sdk_storage, lecoffre-front
- Caractéristiques:
- Utilise Docker BuildKit
- Support SSH pour les clonages Git
- Extraction du tag Docker depuis le message de commit
- Build avec
docker build --ssh default
Workflow docker-ext.yml (spécialisé)
- Projets: ihm_client
- Caractéristiques:
- Utilise Docker Buildx
- Support multi-plateforme (linux/amd64)
- Vérification des fichiers WebAssembly
- Build avec
docker/build-push-action@v6
Résolution de conflits
Si un tag ext
existe déjà :
# Supprimer l'ancien tag local
git tag -d ext
# Supprimer l'ancien tag distant
git push origin :refs/tags/ext
# Créer et pousser le nouveau tag
git tag -a ext -m "ci: docker_tag=ext - Nouveau message"
git push origin refs/tags/ext
🔍 Vérification des CI
Vérifier les tags existants
cd /home/debian/4NK_env/{project}
git tag -l | grep ext
Vérifier les images Docker
docker pull git.4nkweb.com/4nk/{project}:ext
Vérifier le statut des CI
Les CI sont visibles sur git.4nkweb.com
dans l'interface web de chaque projet.
📊 Historique des déclenchements
Date | Projet | Tag | Commit | Status | Notes |
---|---|---|---|---|---|
2025-09-21 | sdk_relay | ext | 0180d32 | ✅ CI déclenchée | Fix config file reading logic |
2025-09-21 | sdk_storage | ext | - | ✅ CI déclenchée | Tag créé et poussé |
2025-09-21 | ihm_client | ext | - | ✅ CI déclenchée | Tag créé et poussé |
2025-09-21 | lecoffre-front | ext | - | ✅ CI déclenchée | Tag créé et poussé |
Détails des projets vérifiés
Projet | Branche | Tags existants | Workflow | Dockerfile | Status |
---|---|---|---|---|---|
sdk_relay | ext | ci-trigger-ext, ext | build-ext.yml | ✅ | ✅ Configuré |
sdk_storage | ext | ext | build-ext.yml | ✅ | ✅ Configuré |
ihm_client | ext | ext | docker-ext.yml | ✅ | ✅ Configuré |
lecoffre-front | ext | ext | build-ext.yml | ✅ | ✅ Configuré |
🎯 Prochaines étapes
- Attendre que toutes les CI se terminent (5-10 minutes)
- Vérifier que les nouvelles images sont disponibles
- Redémarrer les services avec les nouvelles images
- Tester la connectivité complète
Document créé le 2025-09-21 - Processus de déploiement LeCoffre Node