Replace hardcoded HAF_COMMIT with dynamic image detection

Summary

  • Add find_haf_image job to dynamically detect the latest HAF image from the registry
  • Replace hardcoded HAF_COMMIT variable and prepare_haf_image job with dynamic detection
  • Remove validate_haf_commit job (no longer needed with dynamic detection)
  • Update sync job to use HAF_UPSTREAM_COMMIT from find_haf_image artifacts

Details

This change implements the same dynamic HAF image detection pattern used by hafah, balance_tracker, reputation_tracker, haf_block_explorer, and hivemind. Instead of manually updating HAF_COMMIT when HAF changes, the pipeline now:

  1. Runs find_haf_image in the new detect stage
  2. Uses common-ci-configuration templates for upstream image detection
  3. Fetches source patterns from HAF's source-patterns.sh script
  4. Outputs HAF_UPSTREAM_IMAGE, HAF_UPSTREAM_COMMIT, and HAF_UPSTREAM_TAG as dotenv artifacts

The includes section now uses:

  • /templates/haf_data_preparation.gitlab-ci.yml (contains .prepare_haf_image template if needed)
  • /templates/source_change_detection.gitlab-ci.yml (contains .find_upstream_image template)

This eliminates the maintenance burden of keeping HAF_COMMIT in sync with the submodule.

Test plan

  • Verify pipeline passes with dynamic HAF image detection
  • Verify find_haf_image job outputs correct variables
  • Verify sync job successfully uses the detected HAF image

Merge request reports

Loading