Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 84d7b7e847 | |||
| a0a77648ca | |||
| 6cb35e82fe |
@@ -1,93 +1,5 @@
|
||||
name: Déploiement AEGIS Portal
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- dev
|
||||
- test
|
||||
- acc
|
||||
- master
|
||||
|
||||
jobs:
|
||||
build-and-deploy:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
GIT_SSL_NO_VERIFY: "true"
|
||||
NODE_TLS_REJECT_UNAUTHORIZED: "0"
|
||||
|
||||
steps:
|
||||
- name: Patch DNS local pour Gitea Runner
|
||||
run: sudo echo "10.10.40.31 git.bunker.lan" | sudo tee -a /etc/hosts
|
||||
|
||||
- name: Configuration de Git pour SSL
|
||||
run: git config --global http.sslVerify false
|
||||
|
||||
- name: Récupération du code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Configuration de Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 22
|
||||
|
||||
- name: Activation de pnpm
|
||||
run: corepack enable pnpm
|
||||
|
||||
- name: Installation des dépendances
|
||||
run: pnpm install --frozen-lockfile
|
||||
|
||||
- name: Compilation de la Build
|
||||
env:
|
||||
VITE_APP_ENV: ${{ github.ref_name }}
|
||||
VITE_PB_URL: ${{ secrets.PB_URL }}
|
||||
run: pnpm run build
|
||||
|
||||
- name: Installation de lftp
|
||||
run: sudo apt-get update && sudo apt-get install -y lftp
|
||||
|
||||
- name: Routage et Déploiement FTP
|
||||
env: # 1. On charge tous les secrets de manière sécurisée
|
||||
SERVER: ${{ secrets.FTP_SERVER }}
|
||||
DEV_U: ${{ secrets.DEV_FTP_USER }}
|
||||
DEV_P: ${{ secrets.DEV_FTP_PASSWORD }}
|
||||
TEST_U: ${{ secrets.TEST_FTP_USER }}
|
||||
TEST_P: ${{ secrets.TEST_FTP_PASSWORD }}
|
||||
ACC_U: ${{ secrets.ACC_FTP_USER }}
|
||||
ACC_P: ${{ secrets.ACC_FTP_PASSWORD }}
|
||||
PROD_U: ${{ secrets.PROD_FTP_USER }}
|
||||
PROD_P: ${{ secrets.PROD_FTP_PASSWORD }}
|
||||
BRANCH: ${{ github.ref_name }}
|
||||
run: |
|
||||
# 2. On attribue les bons identifiants selon la branche
|
||||
if [ "$BRANCH" == "master" ]; then
|
||||
TARGET_USER=$PROD_U; TARGET_PASS=$PROD_P;
|
||||
elif [ "$BRANCH" == "acc" ]; then
|
||||
TARGET_USER=$ACC_U; TARGET_PASS=$ACC_P;
|
||||
elif [ "$BRANCH" == "test" ]; then
|
||||
TARGET_USER=$TEST_U; TARGET_PASS=$TEST_P;
|
||||
else
|
||||
TARGET_USER=$DEV_U; TARGET_PASS=$DEV_P;
|
||||
fi
|
||||
|
||||
echo "Déploiement de la branche [$BRANCH]"
|
||||
|
||||
# 3. Exécution du script FTP
|
||||
cat << EOF > script.lftp
|
||||
set ftp:passive-mode true
|
||||
set ftp:ssl-allow no
|
||||
set ssl:verify-certificate no
|
||||
set net:timeout 5
|
||||
set net:max-retries 2
|
||||
set dns:fatal-timeout 2
|
||||
open -u "${TARGET_USER}","${TARGET_PASS}" "${SERVER}"
|
||||
cd home/${TARGET_USER}
|
||||
mirror -R --delete --verbose dist/ ./
|
||||
quit
|
||||
EOF
|
||||
|
||||
lftp -f script.lftp
|
||||
name: Déploiement AEGIS Portal
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
|
||||
@@ -1,45 +1,5 @@
|
||||
name: Sécurité - Architecture Git-Flow
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
- dev
|
||||
- test
|
||||
- acc
|
||||
- master
|
||||
|
||||
jobs:
|
||||
validate-flow:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Vérification du flux de promotion
|
||||
run: |
|
||||
TARGET_BRANCH="${{ github.base_ref }}"
|
||||
SOURCE_BRANCH="${{ github.head_ref }}"
|
||||
|
||||
echo "Tentative de promotion : $SOURCE_BRANCH ➔ $TARGET_BRANCH"
|
||||
|
||||
# Règle 1 : Vers TEST (Doit venir de DEV)
|
||||
if [ "$TARGET_BRANCH" == "test" ] && [ "$SOURCE_BRANCH" != "dev" ]; then
|
||||
echo "ERREUR : L'environnement TEST ne peut recevoir que du code de DEV."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Règle 2 : Vers ACC (Doit venir de TEST)
|
||||
if [ "$TARGET_BRANCH" == "acc" ] && [ "$SOURCE_BRANCH" != "test" ]; then
|
||||
echo "ERREUR : L'environnement d'ACCEPTATION ne peut recevoir que du code de TEST."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Règle 3 : Vers PROD (Doit venir de ACC)
|
||||
if [ "$TARGET_BRANCH" == "master" ] && [ "$SOURCE_BRANCH" != "acc" ]; then
|
||||
echo "ERREUR : La PRODUCTION ne peut recevoir que du code validé en ACCEPTATION (acc)."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Flux réglementaire respecté ! Promotion autorisée."
|
||||
name: Sécurité - Architecture Git-Flow
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
|
||||
@@ -1,64 +1,5 @@
|
||||
name: Contrôle Qualité & Sécurité (QA)
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
- dev
|
||||
- test
|
||||
- acc
|
||||
- master
|
||||
|
||||
jobs:
|
||||
quality-gate:
|
||||
name: qa-s-check
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
env:
|
||||
GIT_SSL_NO_VERIFY: "true"
|
||||
NODE_TLS_REJECT_UNAUTHORIZED: "0"
|
||||
|
||||
steps:
|
||||
- name: Patch DNS local pour Gitea Runner
|
||||
run: sudo echo "10.10.40.31 git.bunker.lan" | sudo tee -a /etc/hosts
|
||||
|
||||
- name: Configuration de Git pour SSL
|
||||
run: git config --global http.sslVerify false
|
||||
|
||||
- name: Récupération du code source
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Configuration de Node.js (v22)
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 22
|
||||
|
||||
- name: Activation de pnpm
|
||||
run: corepack enable pnpm
|
||||
|
||||
- name: Installation des dépendances
|
||||
run: pnpm install --frozen-lockfile
|
||||
|
||||
# Étape 1 : ESLint (Syntaxe et conventions)
|
||||
- name: Analyse Linter (ESLint)
|
||||
run: pnpm run lint
|
||||
|
||||
# Étape 2 : Verification stricte des types TypeScript (sans émettre de fichiers)
|
||||
- name: Verification des Types TypeScript
|
||||
run: pnpm exec tsc --noEmit
|
||||
|
||||
# Étape 3 : Exécution des tests unitaires
|
||||
- name: Tests Unitaires (Vitest)
|
||||
run: pnpm run test -- --run
|
||||
|
||||
# Étape 4 : Audit des vulnérabilités npm (Niveau High/Critical)
|
||||
- name: Audit de Sécurité des Dépendances
|
||||
run: pnpm audit --audit-level=high
|
||||
|
||||
# Étape 5 : Validation de la compilation ViteJS
|
||||
- name: Validation du Build de Production
|
||||
run: pnpm run build
|
||||
name: Contrôle Qualité & Sécurité (QA)
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
|
||||
@@ -15,8 +15,7 @@ export const useTickets = () => {
|
||||
sort: '-created', // Du plus récent au plus ancien
|
||||
});
|
||||
setTickets(records);
|
||||
} catch (err) {
|
||||
console.error("Erreur lors de la récupération des tickets :", err);
|
||||
} catch {
|
||||
setError("Impossible de charger l'historique de vos requêtes.");
|
||||
} finally {
|
||||
setIsLoading(false);
|
||||
|
||||
Reference in New Issue
Block a user