diff --git a/ansible/arcodange/factory/inventory/group_vars/all/gitea.yml b/ansible/arcodange/factory/inventory/group_vars/all/gitea.yml index 837e292..2381e8d 100644 --- a/ansible/arcodange/factory/inventory/group_vars/all/gitea.yml +++ b/ansible/arcodange/factory/inventory/group_vars/all/gitea.yml @@ -9,3 +9,41 @@ # so the secret propagation playbook iterates over this list. gitea_secret_propagation_users: - arcodange + +# ══════════════════════════════════════════════════════════════════════════ +# VERSION DU RUNNER GITEA ACTIONS — ÉPINGLÉE, ET C'EST LE POINT. +# +# Le playbook 03_cicd déployait `gitea/act_runner:latest` avec `pull: missing`, +# c'est-à-dire la pire combinaison possible : un tag FLOTTANT qui n'est JAMAIS +# rafraîchi. Chaque hôte garde ce que « latest » voulait dire le jour de son +# premier pull — d'où deux machines censées être équivalentes qui divergent +# (constaté le 2026-07-30) : +# +# pi1 : sha256:7bdc8d31… → act_runner v0.3.1 +# pi3 : sha256:0f65fa10… → act_runner v0.2.13 +# +# Effet mesuré : le MÊME job, sur la MÊME image de CI, met 511 s sur pi1 et +# 397 s sur pi3 — 114 s d'écart imputables à la machine. Et pi3 (v0.2.13) a mal +# lu la définition d'un job dont il dépendait (« 'runs-on' key not defined », +# puis « No steps found »). +# +# ⚠ NE PAS remplacer par `latest` + `pull: always` : `latest` vaut aujourd'hui +# 0.6.1, soit 3 à 4 versions mineures devant tout ce qui est éprouvé ici. Le +# runner exécute TOUTE la CI de la forge — une montée subie, non datée et non +# choisie, s'y paie cher. Une version épinglée se relit, se date et se recule. +# ⚠ L'IMAGE A CHANGÉ DE NOM. `gitea/act_runner` est gelée à 0.6.1 ; le +# successeur officiel est `gitea/runner`, et son binaire s'appelle désormais +# `gitea-runner` (plus `act_runner`). +# Vérifié avant de basculer — c'est un REMPLACEMENT DIRECT pour ce compose : +# • entrypoint identique : /sbin/tini -- run.sh +# • mêmes variables lues : CONFIG_FILE, GITEA_INSTANCE_URL, +# GITEA_RUNNER_{REGISTRATION_TOKEN,NAME,LABELS} +# • config.yaml compatible : capacity, labels, cache.*, container.force_pull, +# options, valid_volumes, host.workdir_parent — AUCUNE clé utilisée ici n'a +# disparu (comparé à `gitea-runner generate-config` de la 2.3.0). +# Le blog de Gitea 1.27 recommande « Gitea Runner 2.0.0 » ; 2.3.0 est la même +# lignée majeure, en plus récent. Gitea reste par ailleurs compatible fil-à-fil +# avec les runners plus anciens — il désactive simplement les fonctionnalités +# qu'ils n'annoncent pas. +gitea_runner_image: "gitea/runner" +gitea_runner_version: "2.3.0" diff --git a/ansible/arcodange/factory/inventory/group_vars/gitea/gitea.yml b/ansible/arcodange/factory/inventory/group_vars/gitea/gitea.yml index ed88c9a..6b0ac9f 100644 --- a/ansible/arcodange/factory/inventory/group_vars/gitea/gitea.yml +++ b/ansible/arcodange/factory/inventory/group_vars/gitea/gitea.yml @@ -1,4 +1,13 @@ -gitea_version: 1.25.5 +# ⚠ Montée 1.25.5 → 1.27.1 : DEUX versions mineures, avec migrations de base +# IRRÉVERSIBLES (Gitea ne sait pas redescendre après migration). Sauvegardes du +# jour vérifiées avant la bascule (pg_dumpall 13 Mo intègre + archive fichiers +# 1,7 Go intègre, /mnt/backups). +# Changements cassants relevés dans les notes de version, et leur portée ICI : +# • workflows réutilisables externes retirés → AUCUN dans nos trois dépôts (vérifié) +# • nonce CSP exigé pour les scripts inline → concerne les templates +# personnalisés ; nous n'en avons pas +# • X-Content-Type-Options: nosniff par défaut +gitea_version: 1.27.1 gitea_database: db_name: gitea diff --git a/ansible/arcodange/factory/playbooks/03_cicd.yml b/ansible/arcodange/factory/playbooks/03_cicd.yml index 353bc7e..532ddf8 100644 --- a/ansible/arcodange/factory/playbooks/03_cicd.yml +++ b/ansible/arcodange/factory/playbooks/03_cicd.yml @@ -30,7 +30,14 @@ name: arcodange_factory_gitea_action services: gitea_action: - image: gitea/act_runner:latest + # ⚠ VERSION ÉPINGLÉE (inventory/group_vars/all/gitea.yml), PAS `latest`. + # `latest` + `pull: missing` = tag flottant JAMAIS rafraîchi : chaque + # hôte gardait ce que « latest » voulait dire à son premier pull, d'où + # pi1 en v0.3.1 et pi3 en v0.2.13 sur des machines censées être + # équivalentes (114 s d'écart mesurés sur le même job). + # Avec un tag épinglé, `pull: missing` redevient CORRECT : changer la + # version change le tag, donc l'image est absente, donc elle est tirée. + image: "{{ gitea_runner_image }}:{{ gitea_runner_version }}" container_name: gitea_action restart: always environment: