Add shared haf-app-test-runner image for HAF application testing
Problem
Three HAF application repos maintain nearly identical docker/ci/Dockerfile files:
balance_trackerreputation_trackerhaf_block_explorer
Each builds a custom ci-runner image for DinD-based testing. This causes:
- Duplicated maintenance effort
- Inconsistent environments across projects
- Per-project image build overhead in CI
Proposal
Create a shared haf-app-test-runner image in common-ci-configuration that all HAF apps can use.
Requirements Analysis
Common to all projects:
-
docker-builderbase (Alpine + Docker for DinD) - JMeter + m2u (from
benchmark-test-runner) - Python 3.12+ with pip
- py3-psycopg2
- postgresql-client
- bash, ca-certificates
- openjdk11-jre (for JMeter)
Additional from balance_tracker (recommended for all):
- gcc, musl-dev, python3-dev, linux-headers (build Python wheels)
- gcompat, libstdc++ (glibc compat for pre-built wheels like hiveio-wax)
- util-linux (proper flock for NFS - BusyBox flock fails on NFS mounts)
Migration Plan
Phase 1: Create shared image in common-ci-configuration
- Add
haf-app-test-runner/Dockerfileto common-ci-configuration - Add CI job to build and publish the image
- Tag initial release
Phase 2: Migrate projects (can be done incrementally)
For each project:
- Update
.gitlab-ci.ymlto use the shared image - Remove
docker/ci/Dockerfile - Remove
docker-ci-runner-buildjob from CI - Test that all CI jobs pass
Order of migration:
-
reputation_tracker(simplest) haf_block_explorerbalance_tracker
Benefits
- Single maintenance point: Update deps once, all projects benefit
- Faster CI: No per-project image build step
- Consistency: All HAF apps use identical test environment
- Easier onboarding: New HAF apps just use the shared image
Open Questions
- Should we version the image or use
:latest? - Image naming:
haf-app-test-runnervshaf-test-runner?
See proposed Dockerfile in haf_block_explorer: docs/shared-ci-runner-plan.md