Etat initial - Agents and project docs still referenced --skipSetupHost, --import-v1 on CLI, and optional log flags. Motivation du changement - Align ia_dev agents and mirrored docs with LeCoffre deploy.sh (setup via run-setup-host.sh, business flags in deploy.conf only, logs always on). Resolution - Add .cursor/agents/setup-host.md; update change-to-all-branches, deploy-by-script, deploy-pprod-or-prod; refresh agents-scripts-split and WORKFLOWS for lecoffreio and ia_dev projects. Root cause - Documentation drift after deploy CLI and pipeline changes. Fonctionnalités impactées - Cursor agent instructions only (no runtime code path change in this commit beyond files listed). Code modifié - .cursor/agents/*.md, deploy/*.sh, deploy/lib/*.sh, projects/*/docs/*.md as staged. Documentation modifiée - projects/lecoffreio/docs/agents-scripts-split.md, WORKFLOWS_AND_COMPONENTS.md; projects/ia_dev/docs/* (same). Configurations modifiées - none. Fichiers dans déploy modifiés - deploy/change-to-all-branches.sh, deploy-by-script-to.sh, deploy.sh, lib/README.md, deploy-conf-handling.sh, deploy-methodology.sh, orchestrator.sh (pre-existing session changes + doc alignment). Fichiers dans logs impactés - none. Bases de données et autres sources modifiées - none. Modifications hors projet - none. fichiers dans .cursor/ modifiés - .cursor/agents/setup-host.md (new), change-to-all-branches.md, deploy-by-script.md, deploy-pprod-or-prod.md. fichiers dans .secrets/ modifiés - none. nouvelle sous sous version dans VERSION - N/A (ia_dev repo has no VERSION file). CHANGELOG.md mise à jour (oui/non) - non
2.5 KiB
Shared deploy libraries (ia_dev)
ssh.sh
Canonical SSH/SCP helpers (ssh_run, scp_copy, require_ssh_key, ssh_common_opts) used across projects.
LeCoffre : deploy/scripts_v2/_lib/ssh.sh sources ia_dev/deploy/lib/ssh.sh when the submodule path ia_dev/deploy/lib/ssh.sh exists from the repo root; otherwise it embeds the same implementation.
deploy-log.sh
Optional deploy_script_tee_log_if_requested <project_root> <log_subdir> — requires info from the project’s colors.sh (sourced before this file in deploy.sh).
Policy
Project-specific logic (Prisma, systemd unit names, remote app layout, LeCoffre domains) stays under each repository’s deploy/scripts_v2/. Only transport/logging helpers live here.
deploy-methodology.sh
Shared contract for all managed projects: allowed envs (test | pprod | prod), validation helpers. Sourced by deploy.sh and orchestrator.sh. Extend only with an explicit decision (new env = conf + doc migration).
Boundary : any step strictly identical for every project belongs here or in a sibling deploy/lib/deploy-*.sh. The project orchestrator under repository_root only sequences project-specific scripts (e.g. _lib/deploy-phase-*.sh).
Quality gates and longer sequences that are identical across projects should be added here or in peers — not in project repos.
deploy-conf-handling.sh
Shared conf.json handling: jq requirement, deploy.secrets_path → SECRETS_BASE / LECOFFRE_SECRETS_BASE, exports IA_DEV_DEPLOY_REPO_ROOT and IA_DEV_DEPLOY_ENV (mandatory handoff: ia_dev_deploy_assert_handoff_context exits if unset or inconsistent — no fallback). Sourced by orchestrator.sh. Add new generic deploy.* reads here.
Orchestration (../orchestrator.sh, ../deploy.sh)
deploy.sh:./deploy/deploy.sh <project_id> <env> [args]— applies methodology (env validation, banner), setsIA_PROJECT_ID, thenexec orchestrator.sh.orchestrator.sh: exports secrets from conf, thenexecthe project orchestratorrepository_root+deploy.project_orchestrator_path(relative path) with the same"$@". Legacy : ifproject_orchestrator_pathis missing, usesdeploy.hooks.phasesordeploy.deploy_script_path.run-project-hooks.shexecsorchestrator.shfor backward compatibility.
Project orchestrator = single script in the target repo that sequences project-specific steps (deploy.sh LeCoffre today, or a dedicated orchestrate-project.sh later).