align for IA agents + grafana
This commit is contained in:
parent
78340064b5
commit
f10c2bb555
214
IA_agents/CI_TRIGGER_PROCESS.md
Normal file
214
IA_agents/CI_TRIGGER_PROCESS.md
Normal file
@ -0,0 +1,214 @@
|
|||||||
|
# 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
|
||||||
|
1. Développement sur la branche `ext`
|
||||||
|
2. Création d'un tag Git `ext`
|
||||||
|
3. Push du tag → déclenchement automatique de la CI
|
||||||
|
4. 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 |
|
||||||
|
| `sdk_signer` | `.gitea/workflows/build-ext.yml` | `git.4nkweb.com/4nk/sdk_signer: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 |
|
||||||
|
| `lecoffre-back-mini` | `.gitea/workflows/build-ext.yml` | `git.4nkweb.com/4nk/lecoffre-back-mini:ext` | ✅ CI configurée |
|
||||||
|
|
||||||
|
## 🚀 Commandes pour déclencher les CI
|
||||||
|
|
||||||
|
### Pour un projet spécifique
|
||||||
|
```bash
|
||||||
|
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
|
||||||
|
```bash
|
||||||
|
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
|
||||||
|
```bash
|
||||||
|
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`
|
||||||
|
|
||||||
|
#### 3. sdk_signer
|
||||||
|
```bash
|
||||||
|
cd /home/debian/4NK_env/sdk_signer
|
||||||
|
git tag -a ext -m "ci: docker_tag=ext - Trigger CI build for sdk_signer"
|
||||||
|
git push origin refs/tags/ext
|
||||||
|
```
|
||||||
|
- **Workflow**: `.gitea/workflows/build-ext.yml`
|
||||||
|
- **Image Docker**: `git.4nkweb.com/4nk/sdk_signer:ext`
|
||||||
|
- **Tags existants**: `ext`
|
||||||
|
|
||||||
|
#### 4. ihm_client
|
||||||
|
```bash
|
||||||
|
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
|
||||||
|
```bash
|
||||||
|
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`
|
||||||
|
|
||||||
|
#### 6. lecoffre-back-mini
|
||||||
|
```bash
|
||||||
|
cd /home/debian/4NK_env/lecoffre-back-mini
|
||||||
|
git tag -a ext -m "ci: docker_tag=ext - Trigger CI build for lecoffre-back-mini"
|
||||||
|
git push origin refs/tags/ext
|
||||||
|
```
|
||||||
|
- **Workflow**: `.gitea/workflows/build-ext.yml`
|
||||||
|
- **Image Docker**: `git.4nkweb.com/4nk/lecoffre-back-mini:ext`
|
||||||
|
- **Tags existants**: `ext`
|
||||||
|
|
||||||
|
### Pour tous les projets
|
||||||
|
```bash
|
||||||
|
cd /home/debian/4NK_env
|
||||||
|
for project in sdk_relay sdk_storage sdk_signer ihm_client lecoffre-front lecoffre-back-mini; 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, sdk_signer, lecoffre-front, lecoffre-back-mini
|
||||||
|
- **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à :
|
||||||
|
```bash
|
||||||
|
# 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
|
||||||
|
```bash
|
||||||
|
cd /home/debian/4NK_env/{project}
|
||||||
|
git tag -l | grep ext
|
||||||
|
```
|
||||||
|
|
||||||
|
### Vérifier les images Docker
|
||||||
|
```bash
|
||||||
|
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 | sdk_signer | 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é |
|
||||||
|
| 2025-09-21 | lecoffre-back-mini | 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é |
|
||||||
|
| sdk_signer | ext | ext | build-ext.yml | ✅ | ✅ Configuré |
|
||||||
|
| ihm_client | ext | ext | docker-ext.yml | ✅ | ✅ Configuré |
|
||||||
|
| lecoffre-front | ext | ext | build-ext.yml | ✅ | ✅ Configuré |
|
||||||
|
| lecoffre-back-mini | ext | ext | build-ext.yml | ✅ | ✅ Configuré |
|
||||||
|
|
||||||
|
## 🎯 Prochaines étapes
|
||||||
|
|
||||||
|
1. Attendre que toutes les CI se terminent (5-10 minutes)
|
||||||
|
2. Vérifier que les nouvelles images sont disponibles
|
||||||
|
3. Redémarrer les services avec les nouvelles images
|
||||||
|
4. Tester la connectivité complète
|
||||||
|
|
||||||
|
---
|
||||||
|
*Document créé le 2025-09-21 - Processus de déploiement LeCoffre Node*
|
@ -9,6 +9,7 @@ Déploie l'architecture LeCoffre Node complète en respectant strictement les co
|
|||||||
- Consulte attentivement `IA_agents/context.md` pour le contexte technique
|
- Consulte attentivement `IA_agents/context.md` pour le contexte technique
|
||||||
- Consulte attentivement `IA_agents/flux.md` pour l'architecture des services
|
- Consulte attentivement `IA_agents/flux.md` pour l'architecture des services
|
||||||
- Consulte attentivement `IA_agents/deploy.md` pour les procédures détaillées
|
- Consulte attentivement `IA_agents/deploy.md` pour les procédures détaillées
|
||||||
|
- Consulte attentivement `CI_TRIGGER_PROCESS.md` pour les CI détaillées
|
||||||
- Reste TOUJOURS sur la branche git "ext"
|
- Reste TOUJOURS sur la branche git "ext"
|
||||||
- Déclenche TOUJOURS les builds via CI avec des images docker tagées "ext"
|
- Déclenche TOUJOURS les builds via CI avec des images docker tagées "ext"
|
||||||
- Corrige aussi les problèmes de code
|
- Corrige aussi les problèmes de code
|
||||||
|
@ -1 +1 @@
|
|||||||
Subproject commit 0180d324725c38e4d6d1e7b1e28c3fbdbdf2588f
|
Subproject commit 94bffd5fdb603e42bd5180b8ac53dc46e568034e
|
Loading…
x
Reference in New Issue
Block a user