From 584d5fc1bbe022c4ff3e3ed796f13d54576dbcda Mon Sep 17 00:00:00 2001 From: Thomas Enjalbert Date: Thu, 4 Jun 2026 12:20:10 +0200 Subject: [PATCH 01/32] =?UTF-8?q?feat:=20premier=20commit=20=E2=80=94=20ac?= =?UTF-8?q?tivation=20de=20la=20CI?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- notes.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 notes.md diff --git a/notes.md b/notes.md new file mode 100644 index 0000000..2c821cd --- /dev/null +++ b/notes.md @@ -0,0 +1 @@ +# Mon TP GitHub Actions From 6641ed3e8ed6fa72171dc21f8faa8f852da70c11 Mon Sep 17 00:00:00 2001 From: Thomas Enjalbert Date: Thu, 4 Jun 2026 12:24:56 +0200 Subject: [PATCH 02/32] fix: no change, ci test --- notes.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/notes.md b/notes.md index 2c821cd..2c6a4f7 100644 --- a/notes.md +++ b/notes.md @@ -1 +1 @@ -# Mon TP GitHub Actions +# Mon TP GitHub Actions From 9ac0658ad385401020c3349f59b4d8173f9c3183 Mon Sep 17 00:00:00 2001 From: Thomas Enjalbert Date: Thu, 4 Jun 2026 13:02:32 +0200 Subject: [PATCH 03/32] feat: add GitHub Actions workflow for hello pipeline --- .github/workflows/hello.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 .github/workflows/hello.yml diff --git a/.github/workflows/hello.yml b/.github/workflows/hello.yml new file mode 100644 index 0000000..bca121b --- /dev/null +++ b/.github/workflows/hello.yml @@ -0,0 +1,24 @@ +name: Hello NexaCloud + +on: + push: + branches: [main] + workflow_dispatch: # permet de déclencher manuellement depuis l'interface GitHub + +jobs: + salutation: + runs-on: ubuntu-latest + + steps: + - name: Checkout du code + uses: actions/checkout@v4 + + - name: Informations sur l'environnement + run: | + echo "Repo : ${{ github.repository }}" + echo "Branche : ${{ github.ref_name }}" + echo "Commit : ${{ github.sha }}" + echo "Acteur : ${{ github.actor }}" + + - name: Lister les fichiers du repo + run: ls -la \ No newline at end of file From 8457f16ec49de15c3cb55c84595c8b5abfc8d3ac Mon Sep 17 00:00:00 2001 From: Thomas Enjalbert Date: Thu, 4 Jun 2026 13:09:05 +0200 Subject: [PATCH 04/32] feat: add date support to hello workflow --- .github/workflows/hello.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/hello.yml b/.github/workflows/hello.yml index bca121b..1bf0393 100644 --- a/.github/workflows/hello.yml +++ b/.github/workflows/hello.yml @@ -21,4 +21,7 @@ jobs: echo "Acteur : ${{ github.actor }}" - name: Lister les fichiers du repo - run: ls -la \ No newline at end of file + run: ls -la + + - name: Afficher la date et l'heure + run: date \ No newline at end of file From 1188b57f2cea1653c7f0ef580b1894af4cab7e0b Mon Sep 17 00:00:00 2001 From: Thomas Enjalbert Date: Thu, 4 Jun 2026 13:24:05 +0200 Subject: [PATCH 05/32] feat: add GitHub Actions CI workflow for NexaCloud API tests --- .github/workflows/ci.yml | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0a27357..c7d6364 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,18 +1,26 @@ -name: CI +name: CI — NexaCloud API on: push: - branches: [ "main" ] + branches: [main] pull_request: - branches: [ "main" ] + branches: [main] jobs: - build: + test: runs-on: ubuntu-latest steps: - - name: Checkout code + - name: Checkout uses: actions/checkout@v4 - - name: Example step - run: echo "Add your build/test steps here!" + - name: Setup Python + uses: actions/setup-python@v5 + with: + python-version: "3.11" + + - name: Installer les dépendances + run: pip install -r ressources/requirements.txt + + - name: Lancer les tests + run: pytest ressources/ -v \ No newline at end of file From bb88c08367108d01cdd85fc5bf0be4143264dcea Mon Sep 17 00:00:00 2001 From: Thomas Enjalbert Date: Thu, 4 Jun 2026 13:28:33 +0200 Subject: [PATCH 06/32] feat: add flake8 linting job to CI workflow --- .github/workflows/ci.yml | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c7d6364..5c41411 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -23,4 +23,22 @@ jobs: run: pip install -r ressources/requirements.txt - name: Lancer les tests - run: pytest ressources/ -v \ No newline at end of file + run: pytest ressources/ -v + + lint: + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup Python + uses: actions/setup-python@v5 + with: + python-version: "3.11" + + - name: Installer flake8 + run: pip install flake8 + + - name: Lint avec flake8 + run: flake8 ressources/ --config ressources/.flake8 \ No newline at end of file From f892fdc0119241b04429d20d1a548d2f9f5c5e1c Mon Sep 17 00:00:00 2001 From: Thomas Enjalbert Date: Thu, 4 Jun 2026 13:33:53 +0200 Subject: [PATCH 07/32] fix: add unnecessary spaces to test ci --- ressources/app.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ressources/app.py b/ressources/app.py index d7e75f2..ba91bf6 100644 --- a/ressources/app.py +++ b/ressources/app.py @@ -16,7 +16,7 @@ } -@app.route("/") +@app.route("/") def index(): return jsonify({"status": "ok", "service": "NexaCloud API", "version": "1.1.0"}) From 017c5e0a4f50638e3e017f6449bff09c023928a2 Mon Sep 17 00:00:00 2001 From: Thomas Enjalbert Date: Thu, 4 Jun 2026 13:43:56 +0200 Subject: [PATCH 08/32] fix: remove unnecessary whitespace in app.py --- ressources/app.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ressources/app.py b/ressources/app.py index ba91bf6..d7e75f2 100644 --- a/ressources/app.py +++ b/ressources/app.py @@ -16,7 +16,7 @@ } -@app.route("/") +@app.route("/") def index(): return jsonify({"status": "ok", "service": "NexaCloud API", "version": "1.1.0"}) From 30206d9603b56949922f034fb2c35ff0fb6b3483 Mon Sep 17 00:00:00 2001 From: Thomas Enjalbert Date: Thu, 4 Jun 2026 13:46:10 +0200 Subject: [PATCH 09/32] fix: update expected log info count in test_logs_summary_values --- ressources/test_app.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ressources/test_app.py b/ressources/test_app.py index ce56a43..a1a17ba 100644 --- a/ressources/test_app.py +++ b/ressources/test_app.py @@ -43,7 +43,7 @@ def test_logs_summary_values(client): """Les compteurs de logs ont les valeurs attendues.""" response = client.get("/logs/summary") data = response.get_json() - assert data["info"] == 142 + assert data["info"] == 999 assert data["warning"] == 28 assert data["error"] == 12 assert data["critical"] == 3 From 2ba42e0b8e04e80138467da5665eaf2c8342979b Mon Sep 17 00:00:00 2001 From: Thomas Enjalbert Date: Thu, 4 Jun 2026 13:48:23 +0200 Subject: [PATCH 10/32] fix: update expected log info count in test_logs_summary_values --- ressources/test_app.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ressources/test_app.py b/ressources/test_app.py index a1a17ba..ce56a43 100644 --- a/ressources/test_app.py +++ b/ressources/test_app.py @@ -43,7 +43,7 @@ def test_logs_summary_values(client): """Les compteurs de logs ont les valeurs attendues.""" response = client.get("/logs/summary") data = response.get_json() - assert data["info"] == 999 + assert data["info"] == 142 assert data["warning"] == 28 assert data["error"] == 12 assert data["critical"] == 3 From 9c4b2db2506db28ef29eb7357e8e29a99f7207fc Mon Sep 17 00:00:00 2001 From: Thomas Enjalbert Date: Thu, 4 Jun 2026 14:04:29 +0200 Subject: [PATCH 11/32] feat: enhance CI workflow by adding pip caching and coverage reporting steps --- .github/workflows/ci.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5c41411..451cd9f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,12 +19,30 @@ jobs: with: python-version: "3.11" + - name: Cache pip + uses: actions/cache@v4 + with: + path: ~/.cache/pip + key: ${{ runner.os }}-pip-${{ hashFiles('ressources/requirements.txt') }} + - name: Installer les dépendances run: pip install -r ressources/requirements.txt - name: Lancer les tests run: pytest ressources/ -v + - name: Tests avec couverture + run: pytest ressources/ -v --cov=ressources --cov-report=term-missing + + - name: Générer le rapport HTML + run: pytest ressources/ --cov=ressources --cov-report=html + + - name: Upload du rapport + uses: actions/upload-artifact@v4 + with: + name: rapport-couverture + path: htmlcov/ + lint: runs-on: ubuntu-latest From fc8020624616ad8b224c3501c18ca10af2e82f2b Mon Sep 17 00:00:00 2001 From: Thomas Enjalbert Date: Thu, 4 Jun 2026 14:10:36 +0200 Subject: [PATCH 12/32] feat: add demo secrets workflow for API key usage --- .github/workflows/secrets.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 .github/workflows/secrets.yml diff --git a/.github/workflows/secrets.yml b/.github/workflows/secrets.yml new file mode 100644 index 0000000..dd307a5 --- /dev/null +++ b/.github/workflows/secrets.yml @@ -0,0 +1,15 @@ +name: Demo Secrets + +on: + workflow_dispatch: + +jobs: + demo: + runs-on: ubuntu-latest + + steps: + - name: Utiliser le secret + run: | + echo "La clé existe : ${{ secrets.API_KEY != '' }}" + # ⚠️ Cette ligne sera masquée dans les logs : + echo "Valeur : ${{ secrets.API_KEY }}" \ No newline at end of file From f43976157cc5bfdbed237dd317ba2974b32c35ea Mon Sep 17 00:00:00 2001 From: Thomas Enjalbert Date: Thu, 4 Jun 2026 14:33:33 +0200 Subject: [PATCH 13/32] feat: add deployment workflow for staging and production environments --- .github/workflows/deploy.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 .github/workflows/deploy.yml diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..7782ee2 --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,22 @@ +name: Deploy + +on: + workflow_dispatch: + +jobs: + deploy-staging: + runs-on: ubuntu-latest + environment: staging # utilise l'environnement staging + + steps: + - name: Déployer en staging + run: echo "Déploiement en staging..." + + deploy-production: + runs-on: ubuntu-latest + environment: production + needs: deploy-staging + + steps: + - name: Déployer en production + run: echo "Déploiement en production !" \ No newline at end of file From ae5c02a694943a7cfabbea33e74bc04106807c32 Mon Sep 17 00:00:00 2001 From: Thomas Enjalbert Date: Thu, 4 Jun 2026 14:52:11 +0200 Subject: [PATCH 14/32] feat: add input options for workflow dispatch in deployment --- .github/workflows/deploy.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 7782ee2..51978f6 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -2,6 +2,15 @@ name: Deploy on: workflow_dispatch: + inputs: + mon_input: + description: "Description affichée dans l'UI" + required: true + default: "valeur_par_défaut" + type: choice + options: + - choix_1 + - choix_2 jobs: deploy-staging: From ecca84fb29ad598d81f83f15c8f85c69cf8bc820 Mon Sep 17 00:00:00 2001 From: Thomas Enjalbert Date: Thu, 4 Jun 2026 14:54:36 +0200 Subject: [PATCH 15/32] feat: update deployment workflow input options for clarity and defaults --- .github/workflows/deploy.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 51978f6..5adf76c 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -4,13 +4,13 @@ on: workflow_dispatch: inputs: mon_input: - description: "Description affichée dans l'UI" + description: "Choix de l'environnement de déploiement" required: true - default: "valeur_par_défaut" + default: "deploy-staging" type: choice options: - - choix_1 - - choix_2 + - staging + - production jobs: deploy-staging: From f779aef83fc4bf3f25fd06cea840d06538de5b43 Mon Sep 17 00:00:00 2001 From: Thomas Enjalbert Date: Thu, 4 Jun 2026 14:59:47 +0200 Subject: [PATCH 16/32] feat: refactor deployment jobs to use dynamic environment input --- .github/workflows/deploy.yml | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 5adf76c..968ed44 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -13,19 +13,10 @@ on: - production jobs: - deploy-staging: + deploy: runs-on: ubuntu-latest - environment: staging # utilise l'environnement staging + environment: ${{ inputs.environment }} steps: - - name: Déployer en staging - run: echo "Déploiement en staging..." - - deploy-production: - runs-on: ubuntu-latest - environment: production - needs: deploy-staging - - steps: - - name: Déployer en production - run: echo "Déploiement en production !" \ No newline at end of file + - name: Déployer en ${{ inputs.environment }} + run: echo "Déploiement en ${{ inputs.environment }}" From 7c3ee70f3752a98dbd21939036a2ede25cf97d7e Mon Sep 17 00:00:00 2001 From: Thomas Enjalbert Date: Thu, 4 Jun 2026 15:02:52 +0200 Subject: [PATCH 17/32] feat: enhance deployment script with environment-specific messages and URLs --- .github/workflows/deploy.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 968ed44..fd4c21c 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -19,4 +19,11 @@ jobs: steps: - name: Déployer en ${{ inputs.environment }} - run: echo "Déploiement en ${{ inputs.environment }}" + run: | + if [ "${{ inputs.environment }}" = "production" ]; then + echo "🚀 Déploiement en PRODUCTION" + echo "URL : https://nexacloud.example.com" + else + echo "✅ Déploiement en STAGING" + echo "URL : https://staging.nexacloud.example.com" + fi From 3923d1df5240d72ea0adebdb2f6ecd2871f3178e Mon Sep 17 00:00:00 2001 From: Thomas Enjalbert Date: Thu, 4 Jun 2026 15:08:19 +0200 Subject: [PATCH 18/32] feat: update deployment workflow input to standardize environment selection --- .github/workflows/deploy.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index fd4c21c..ee3348a 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -3,10 +3,10 @@ name: Deploy on: workflow_dispatch: inputs: - mon_input: + environment: description: "Choix de l'environnement de déploiement" required: true - default: "deploy-staging" + default: "staging" type: choice options: - staging @@ -18,6 +18,9 @@ jobs: environment: ${{ inputs.environment }} steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Déployer en ${{ inputs.environment }} run: | if [ "${{ inputs.environment }}" = "production" ]; then From 764e4daf8650e07afd6381389e7c08437120e11e Mon Sep 17 00:00:00 2001 From: Thomas Enjalbert Date: Fri, 5 Jun 2026 11:33:33 +0200 Subject: [PATCH 19/32] feat: add CI/CD workflow for NexaCloud API with quality checks, staging, and production deployment --- .github/workflows/cicd.yml | 75 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 75 insertions(+) create mode 100644 .github/workflows/cicd.yml diff --git a/.github/workflows/cicd.yml b/.github/workflows/cicd.yml new file mode 100644 index 0000000..b7fb29d --- /dev/null +++ b/.github/workflows/cicd.yml @@ -0,0 +1,75 @@ +name: CI/CD — NexaCloud API + +on: + push: + branches: [main] + pull_request: + branches: [main] + +jobs: + # ── Job 1 : Qualité ──────────────────────────────────────────────── + qualite: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-python@v5 + with: + python-version: "3.11" + + - run: pip install -r ressources/requirements.txt + + - name: Lint + run: flake8 ressources/ --config ressources/.flake8 + + - name: Tests + run: pytest ressources/ -v --cov=ressources + + # ── Job 2 : Staging ─────────────────────────────────────────────── + staging: + runs-on: ubuntu-latest + needs: qualite # attend que le job qualite réussisse + environment: staging + if: github.ref_name == 'main' # uniquement sur la branche main + + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-python@v5 + with: + python-version: "3.11" + + - name: Installer les dépendances + run: pip install -r ressources/requirements.txt + + - name: Déployer sur Azure App Service (staging) + uses: azure/webapps-deploy@v3 + with: + app-name: "ten-nexacloud-api-15299" + publish-profile: ${{ secrets.AZURE_WEBAPP_PUBLISH_PROFILE }} + package: ressources/ + + # ── Job 3 : Production ──────────────────────────────────────────── + production: + runs-on: ubuntu-latest + needs: staging + environment: production + if: github.ref_name == 'main' + + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-python@v5 + with: + python-version: "3.11" + + - name: Installer les dépendances + run: pip install -r ressources/requirements.txt + + - name: Déployer sur Azure App Service (production) + uses: azure/webapps-deploy@v3 + with: + app-name: "ten-nexacloud-api-15299" + publish-profile: ${{ secrets.AZURE_WEBAPP_PUBLISH_PROFILE }} + package: ressources/ \ No newline at end of file From 2eb00b8a90ea8db8cd2c7e0819c7b3097fe69f4e Mon Sep 17 00:00:00 2001 From: Thomas Enjalbert Date: Fri, 5 Jun 2026 11:53:09 +0200 Subject: [PATCH 20/32] fix: no change, cicd test --- .github/workflows/cicd.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/cicd.yml b/.github/workflows/cicd.yml index b7fb29d..7ce0d9b 100644 --- a/.github/workflows/cicd.yml +++ b/.github/workflows/cicd.yml @@ -72,4 +72,6 @@ jobs: with: app-name: "ten-nexacloud-api-15299" publish-profile: ${{ secrets.AZURE_WEBAPP_PUBLISH_PROFILE }} - package: ressources/ \ No newline at end of file + package: ressources/ + +# No change, CICD test \ No newline at end of file From f2031c32458692a7c3565167539a317da68ab4ed Mon Sep 17 00:00:00 2001 From: Thomas Enjalbert Date: Fri, 5 Jun 2026 12:13:29 +0200 Subject: [PATCH 21/32] feat: update Azure App Service deployment configurations for staging and production environments --- .github/workflows/cicd.yml | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/.github/workflows/cicd.yml b/.github/workflows/cicd.yml index 7ce0d9b..a2bb830 100644 --- a/.github/workflows/cicd.yml +++ b/.github/workflows/cicd.yml @@ -46,8 +46,8 @@ jobs: - name: Déployer sur Azure App Service (staging) uses: azure/webapps-deploy@v3 with: - app-name: "ten-nexacloud-api-15299" - publish-profile: ${{ secrets.AZURE_WEBAPP_PUBLISH_PROFILE }} + app-name: "ten-nexacloud-api-staging-27050" + publish-profile: ${{ secrets.AZURE_WEBAPP_PUBLISH_PROFILE_STAGING }} package: ressources/ # ── Job 3 : Production ──────────────────────────────────────────── @@ -70,8 +70,6 @@ jobs: - name: Déployer sur Azure App Service (production) uses: azure/webapps-deploy@v3 with: - app-name: "ten-nexacloud-api-15299" - publish-profile: ${{ secrets.AZURE_WEBAPP_PUBLISH_PROFILE }} + app-name: "ten-nexacloud-api-production-29408" + publish-profile: ${{ secrets.AZURE_WEBAPP_PUBLISH_PROFILE_PRODUCTION }} package: ressources/ - -# No change, CICD test \ No newline at end of file From 0ee91e4eb84ed3aeebbfebb8a5a0c8bb4628cc14 Mon Sep 17 00:00:00 2001 From: Thomas Enjalbert Date: Fri, 5 Jun 2026 13:42:34 +0200 Subject: [PATCH 22/32] feat: add smoke tests for post-deployment verification in staging and production jobs --- .github/workflows/cicd.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.github/workflows/cicd.yml b/.github/workflows/cicd.yml index a2bb830..3f612ac 100644 --- a/.github/workflows/cicd.yml +++ b/.github/workflows/cicd.yml @@ -50,6 +50,13 @@ jobs: publish-profile: ${{ secrets.AZURE_WEBAPP_PUBLISH_PROFILE_STAGING }} package: ressources/ + # Smoke test post-déploiement : vérifier que l'app répond avant de valider + - name: Smoke test post-déploiement + run: | + sleep 30 # attendre que l'app démarre + curl --fail https://ten-nexacloud-api-staging-27050.azurewebsites.net/health || exit 1 +# Si ce test échoue, le job échoue → on peut déclencher un rollback + # ── Job 3 : Production ──────────────────────────────────────────── production: runs-on: ubuntu-latest @@ -73,3 +80,9 @@ jobs: app-name: "ten-nexacloud-api-production-29408" publish-profile: ${{ secrets.AZURE_WEBAPP_PUBLISH_PROFILE_PRODUCTION }} package: ressources/ + + # Smoke test post-déploiement : vérifier que l'app répond avant de valider + - name: Smoke test post-déploiement + run: | + sleep 30 # attendre que l'app démarre + curl --fail https://https://ten-nexacloud-api-production-29408.azurewebsites.net/health || exit 1 From a1206c635fbda3f2b407115ce0bb490a61cf2aae Mon Sep 17 00:00:00 2001 From: Thomas Enjalbert Date: Fri, 5 Jun 2026 13:52:08 +0200 Subject: [PATCH 23/32] fix: correct duplicate URL in smoke test for production deployment --- .github/workflows/cicd.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cicd.yml b/.github/workflows/cicd.yml index 3f612ac..8f40536 100644 --- a/.github/workflows/cicd.yml +++ b/.github/workflows/cicd.yml @@ -85,4 +85,4 @@ jobs: - name: Smoke test post-déploiement run: | sleep 30 # attendre que l'app démarre - curl --fail https://https://ten-nexacloud-api-production-29408.azurewebsites.net/health || exit 1 + curl --fail https://ten-nexacloud-api-production-29408.azurewebsites.net/health || exit 1 From b7ee043f50450c867a1fa3671695f6b0145877ae Mon Sep 17 00:00:00 2001 From: Thomas Enjalbert Date: Fri, 5 Jun 2026 14:21:26 +0200 Subject: [PATCH 24/32] fix: add extra space to trigger pre-commit --- ressources/app.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ressources/app.py b/ressources/app.py index d7e75f2..fc65587 100644 --- a/ressources/app.py +++ b/ressources/app.py @@ -7,7 +7,7 @@ app = Flask(__name__) -# Simule un résumé de logs issu du TP Bash / PowerShell +# Simule un résumé de logs issu du TP Bash / PowerShell LOG_SUMMARY = { "info": 142, "warning": 28, From 9b713b5b603fd9259cbbf7af053a00ce826db6bf Mon Sep 17 00:00:00 2001 From: Thomas Enjalbert Date: Fri, 5 Jun 2026 14:21:41 +0200 Subject: [PATCH 25/32] fix: add extra space to trigger pre-commit --- ressources/app.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ressources/app.py b/ressources/app.py index fc65587..d7e75f2 100644 --- a/ressources/app.py +++ b/ressources/app.py @@ -7,7 +7,7 @@ app = Flask(__name__) -# Simule un résumé de logs issu du TP Bash / PowerShell +# Simule un résumé de logs issu du TP Bash / PowerShell LOG_SUMMARY = { "info": 142, "warning": 28, From 61bdd8eec707ed5d309d9b223bd6c7586e10cd69 Mon Sep 17 00:00:00 2001 From: Thomas Enjalbert Date: Fri, 5 Jun 2026 14:33:26 +0200 Subject: [PATCH 26/32] add extra space to trigger pre-commit --- ressources/app.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ressources/app.py b/ressources/app.py index d7e75f2..fc65587 100644 --- a/ressources/app.py +++ b/ressources/app.py @@ -7,7 +7,7 @@ app = Flask(__name__) -# Simule un résumé de logs issu du TP Bash / PowerShell +# Simule un résumé de logs issu du TP Bash / PowerShell LOG_SUMMARY = { "info": 142, "warning": 28, From 25747227813a7ecad19d3e179ade47078a03f539 Mon Sep 17 00:00:00 2001 From: Thomas Enjalbert Date: Fri, 5 Jun 2026 14:51:34 +0200 Subject: [PATCH 27/32] fix: add extra space to trigger pre-commit --- ressources/app.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ressources/app.py b/ressources/app.py index fc65587..d7e75f2 100644 --- a/ressources/app.py +++ b/ressources/app.py @@ -7,7 +7,7 @@ app = Flask(__name__) -# Simule un résumé de logs issu du TP Bash / PowerShell +# Simule un résumé de logs issu du TP Bash / PowerShell LOG_SUMMARY = { "info": 142, "warning": 28, From c2a381c1671a429473b1d885a93ff9c7395700b0 Mon Sep 17 00:00:00 2001 From: Thomas Enjalbert Date: Fri, 5 Jun 2026 14:56:23 +0200 Subject: [PATCH 28/32] feat: add dependabot configuration for GitHub Actions and Python dependencies --- .github/dependabot.yml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 .github/dependabot.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..b29b864 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,21 @@ +version: 2 + +updates: + # ── Mettre à jour les actions GitHub ────────────────────────────── + - package-ecosystem: "github-actions" + directory: "/" # cherche dans .github/workflows/ + schedule: + interval: "weekly" # vérifie chaque semaine + labels: + - "dependencies" + - "github-actions" + + # ── Mettre à jour les dépendances Python ────────────────────────── + - package-ecosystem: "pip" + directory: "/ressources" # cherche requirements.txt ici + schedule: + interval: "weekly" + labels: + - "dependencies" + - "python" + open-pull-requests-limit: 5 # max 5 PRs ouvertes en même temps From 5ad3f0c7803b079308da28189b72df4ac490c948 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 5 Jun 2026 12:58:19 +0000 Subject: [PATCH 29/32] build(deps): bump actions/upload-artifact from 4 to 7 Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 4 to 7. - [Release notes](https://github.com/actions/upload-artifact/releases) - [Commits](https://github.com/actions/upload-artifact/compare/v4...v7) --- updated-dependencies: - dependency-name: actions/upload-artifact dependency-version: '7' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 451cd9f..9d118b0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -38,7 +38,7 @@ jobs: run: pytest ressources/ --cov=ressources --cov-report=html - name: Upload du rapport - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v7 with: name: rapport-couverture path: htmlcov/ From e99f9e7d0ee5e3a5e90bc7370c6c58d25da43322 Mon Sep 17 00:00:00 2001 From: Thomas Enjalbert Date: Fri, 5 Jun 2026 15:13:35 +0200 Subject: [PATCH 30/32] feat: add CODEOWNERS file to define review responsibilities --- .github/CODEOWNERS | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 .github/CODEOWNERS diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 0000000..8325b40 --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1,14 @@ +# Syntaxe : <@utilisateur ou @org/équipe> + +# Par défaut : tout changement requiert une review de ces personnes +* @thomase-spl + +# Les workflows CI/CD ne peuvent être modifiés que par le lead DevOps +.github/workflows/ @thomase-spl + +# Le fichier de dépendances requiert une validation technique +ressources/requirements.txt @thomase-spl + +# Les fichiers de sécurité requièrent une double validation +.github/dependabot.yml @thomase-spl +.github/CODEOWNERS @thomase-spl From 3c58c96a8e47142897d2551f94ddc38361a5b3e4 Mon Sep 17 00:00:00 2001 From: Thomas Enjalbert Date: Thu, 11 Jun 2026 09:58:15 +0200 Subject: [PATCH 31/32] fix: no change, ci test --- ressources/test_app.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ressources/test_app.py b/ressources/test_app.py index ce56a43..8a7f955 100644 --- a/ressources/test_app.py +++ b/ressources/test_app.py @@ -57,3 +57,5 @@ def test_logs_critical_alerte(client): assert "critical_count" in data assert "alerte" in data assert data["alerte"] is True + +# no change From 8ee0ba8bb8e5665bdee1fcab57958e8f4c44865a Mon Sep 17 00:00:00 2001 From: Thomas Enjalbert Date: Thu, 11 Jun 2026 10:00:44 +0200 Subject: [PATCH 32/32] fix: no change, some test --- ressources/test_app.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ressources/test_app.py b/ressources/test_app.py index 8a7f955..c6040bb 100644 --- a/ressources/test_app.py +++ b/ressources/test_app.py @@ -58,4 +58,4 @@ def test_logs_critical_alerte(client): assert "alerte" in data assert data["alerte"] is True -# no change +# no change, some test