**Motivations:** - Keep shared methodology, envs, and future quality sequences in ia_dev; single project orchestrator script per repo **Root causes:** - N/A **Correctifs:** - N/A **Evolutions:** - Add deploy/lib/deploy-methodology.sh (test|pprod|prod validation) - deploy.sh sources methodology before orchestrator - orchestrator prefers deploy.project_orchestrator_path then legacy phases/deploy_script_path - conf.json: project_orchestrator_path for lecoffreio, algo, enso; remove hooks where redundant - Document in README.md, projects/README.md, deploy/lib/README.md **Pages affectées:** - deploy/*, projects/*/conf.json, README files
33 lines
1.2 KiB
Bash
Executable File
33 lines
1.2 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# Generic deploy entry from ia_dev: shared methodology (envs, contract), then ia_dev orchestrator → project orchestrator.
|
|
# Usage (from ia_dev root): ./deploy/deploy.sh <project_id> <env> [options…]
|
|
# Example: ./deploy/deploy.sh lecoffreio test --import-v1 --skipSetupHost
|
|
set -euo pipefail
|
|
|
|
SCRIPT_REAL="$(readlink -f "${BASH_SOURCE[0]:-$0}" 2>/dev/null || realpath "${BASH_SOURCE[0]:-$0}" 2>/dev/null || echo "${BASH_SOURCE[0]:-$0}")"
|
|
DEPLOY_DIR="$(cd "$(dirname "$SCRIPT_REAL")" && pwd)"
|
|
IA_DEV_ROOT="$(cd "$DEPLOY_DIR/.." && pwd)"
|
|
|
|
# shellcheck source=lib/deploy-methodology.sh
|
|
source "${DEPLOY_DIR}/lib/deploy-methodology.sh"
|
|
|
|
if [[ $# -lt 2 ]]; then
|
|
echo "[deploy][ERROR] Missing arguments" >&2
|
|
echo "Usage: $0 <project_id> <env> [options passed to project orchestrator]" >&2
|
|
echo "Example: $0 lecoffreio test --import-v1 --skipSetupHost" >&2
|
|
exit 1
|
|
fi
|
|
|
|
CONF="${IA_DEV_ROOT}/projects/${1}/conf.json"
|
|
if [[ ! -f "$CONF" ]]; then
|
|
echo "[deploy][ERROR] No conf for project '${1}': ${CONF}" >&2
|
|
exit 1
|
|
fi
|
|
|
|
ia_dev_deploy_assert_env_literal "${2}" || exit 1
|
|
ia_dev_deploy_log_methodology_banner
|
|
|
|
export IA_PROJECT_ID="$1"
|
|
shift
|
|
exec "$DEPLOY_DIR/orchestrator.sh" "$@"
|