Context
The ODELIA deploy test (`run_deploy_test.sh`, ~970 lines) and STAMP deploy test (`run_stamp_deploy_test.sh`, ~750 lines) share substantial duplicate code:
- `remote_exec()` / `remote_copy()` — SSH/SCP helpers
- `deploy_kits()` — startup kit distribution
- `fix_remote_dns()` — DNS fixup on remote machines
- `pre_pull_images()` — Docker image pre-pull
- `start_server()` — NVFlare server startup
- `wait_for_client_registration()` — client registration polling
- `submit_job()` — expect-based job submission
- `wait_for_completion()` — server log monitoring
- Color/logging helpers
The scripts were intentionally separated to avoid coupling STAMP onto the ODELIA script, but now that both are working, the shared code could be extracted into a common library.
Proposed Solution
- Create `scripts/deploy/deploy_common.sh` with shared functions
- Source it from both `run_deploy_test.sh` and `run_stamp_deploy_test.sh`
- Keep pipeline-specific code (STAMP env vars, ODELIA evaluation, container name prefixes) in the respective scripts
This reduces maintenance burden and ensures fixes (e.g., timeout handling, error detection) propagate to both pipelines.
Related Files
- `scripts/deploy/run_deploy_test.sh` — ODELIA deploy test
- `scripts/deploy/run_stamp_deploy_test.sh` — STAMP deploy test
Context
The ODELIA deploy test (`run_deploy_test.sh`, ~970 lines) and STAMP deploy test (`run_stamp_deploy_test.sh`, ~750 lines) share substantial duplicate code:
The scripts were intentionally separated to avoid coupling STAMP onto the ODELIA script, but now that both are working, the shared code could be extracted into a common library.
Proposed Solution
This reduces maintenance burden and ensures fixes (e.g., timeout handling, error detection) propagate to both pipelines.
Related Files