Aller au contenu

Session 22 — Intégration Squash Orchestrator → SSH → test-runner

Durée : ~8h
Objectif : Connecter Squash TM → Orchestrator → test-runner via SSH channel pour exécuter Robot Framework automatiquement


Résumé exécutif

Session consacrée à l'intégration complète du pipeline d'automatisation : - Build de l'image perfshop-test-runner avec OpenSSH server - Configuration du SSH channel dans Squash Orchestrator (linux,robotframework) - Installation du plugin scm-git dans Squash TM - Création du repo GitLab dédié perfshop-tests - Configuration du workflow Squash simple et du serveur SCM - Secret JWT Base64 pour l'API Squash TM - Premier workflow déclenché et reçu par l'orchestrateur ✅ - Blocage final : endpoint resultpublisher en 404 (plugin payant ou URL reverse proxy)


Décisions architecturales

Décision Raison
OpenSSH dans test-runner Seule architecture compatible 3 environnements (Desktop/Unix/NAS)
SSH_CHANNEL_TAGS: linux,robotframework L'orchestrateur route par technologie + OS — les deux sont obligatoires
Repo Git dédié perfshop-tests Repo PerfShop trop volumineux pour être cloné par Squash TM
User perfshop-ci Compte dédié sans droits admin, rôle Developer sur perfshop-tests
Plugin scm-git uniquement api-rest-admin payant (licence requise), crash loop sans licence
Secret JWT en Base64 Squash TM v8 exige squash.rest-api.jwt.secret encodé Base64 ≥86 chars
Workflow Squash simple Active les vues Automaticien/Testeur fonctionnel en Community
Format référence : fichier.robot#Nom du test Format obligatoire selon doc officielle Squash Orchestrator

État final des services

Container Image Statut
perfshop-squash-db postgres:16 ✅ Healthy
perfshop-testmgmt squashtest/squash-tm:latest ✅ Healthy — plugin scm-git
perfshop-selenium selenium/standalone-chrome:latest ✅ Up
perfshop-test-runner perfshop-test-runner:latest ✅ Up — sshd -D
perfshop-orchestrator squashtest/squash-orchestrator:latest ✅ Up — SSH channel IDLE
perfshop-filebrowser filebrowser/filebrowser:latest ✅ Up

Configuration Squash TM (persistée dans PostgreSQL)

Élément Valeur
Serveur d'automatisation PerfShop Orchestratorhttp://perfshop-orchestrator:7774
Serveur SCM PerfShop GitLabhttps://perfshop-gitlab.perfshop.io/perf/
Dépôt scripts perfshop-tests / branche main
User SCM perfshop-ci / Squash2026!
Workflow projet Squash simple
Technologie BDD Robot Framework

Nouveaux fichiers et modifications

Fichier Modification
test-runner/Dockerfile openssh-server + allure-robotframework + squash-tf-services + CMD sshd
squash-seed/start-plugins.cfg Plugin scm-git activé
docker-compose.*.yml (×3) SSH_CHANNEL_*, SQUASH_REST_API_JWT_SECRET, SQUASH_TM_PUBLIC_URL, volume start-plugins.cfg
.env.example + .env.production SQUASH_JWT_SECRET, SQUASH_REST_API_JWT_SECRET, SQUASH_PUBLIC_URL
mkdocs/docs/guides/squash-orchestrator-setup.md Credentials repo perfshop-tests

Pending session 22

  • [ ] Résoudre le 404 sur resultpublisher (URL interne vs publique, ou plugin manquant)
  • [ ] Nettoyer le plugin api-rest-admin résiduel dans le volume Squash TM
  • [ ] Corriger la duplication de scm-git au démarrage
  • [ ] Automatiser la config Squash TM via seed.py (serveur autom, SCM, projet)
  • [ ] Obtenir le premier PASS complet affiché dans Squash TM

Bugs résolus

# Bug Sévérité Correction
1 SSH_CHANNEL_TAGS=default invalide BLOQUANT linux,robotframework
2 Secret JWT avec tirets invalide en Base64 BLOQUANT → secret encodé Base64 ≥86 chars
3 Plugin autom-devops inexistant dans l'image MOYEN → retiré
4 Plugin api-rest-admin payant — crash loop Squash TM BLOQUANT → retiré, jamais activer
5 Variable SQUASH_JWT_SECRET incorrecte MOYEN SQUASH_REST_API_JWT_SECRET
6 mkdir /var/run/sshd échoue (existe déjà) MINEUR mkdir -p

Erreurs Claude (pour le bilan vibe coding)

# Erreur Sévérité Impact
1 SSH_CHANNEL_TAGS=default proposé sans lire la doc MAJEUR 1 cycle de debug
2 Secret JWT non encodé Base64 MAJEUR 2 cycles + redémarrage Squash
3 Plugin autom-devops proposé (n'existe pas) MOYEN 1 cycle d'erreur
4 Plugin api-rest-admin proposé sans vérifier la licence MAJEUR Crash loop Squash TM
5 Variable SQUASH_JWT_SECRET au lieu de SQUASH_REST_API_JWT_SECRET MOYEN 1 cycle de debug
6 Trop de tâtonnements sur le workflow IHM Squash TM MINEUR Perte de temps