Add shared haf-app-test-runner image for HAF application testing

Problem

Three HAF application repos maintain nearly identical docker/ci/Dockerfile files:

  • balance_tracker
  • reputation_tracker
  • haf_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-builder base (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)
  • 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

  1. Add haf-app-test-runner/Dockerfile to common-ci-configuration
  2. Add CI job to build and publish the image
  3. Tag initial release

Phase 2: Migrate projects (can be done incrementally)

For each project:

  1. Update .gitlab-ci.yml to use the shared image
  2. Remove docker/ci/Dockerfile
  3. Remove docker-ci-runner-build job from CI
  4. Test that all CI jobs pass

Order of migration:

  1. reputation_tracker (simplest)
  2. haf_block_explorer
  3. balance_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

  1. Should we version the image or use :latest?
  2. Image naming: haf-app-test-runner vs haf-test-runner?

See proposed Dockerfile in haf_block_explorer: docs/shared-ci-runner-plan.md