Replace hardcoded HAF_COMMIT with dynamic image detection
Summary
- Add
find_haf_imagejob to dynamically detect the latest HAF image from the registry - Replace hardcoded
HAF_COMMITvariable andprepare_haf_imagejob with dynamic detection - Remove
validate_haf_commitjob (no longer needed with dynamic detection) - Update
syncjob to useHAF_UPSTREAM_COMMITfromfind_haf_imageartifacts
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:
- Runs
find_haf_imagein the newdetectstage - Uses
common-ci-configurationtemplates for upstream image detection - Fetches source patterns from HAF's
source-patterns.shscript - Outputs
HAF_UPSTREAM_IMAGE,HAF_UPSTREAM_COMMIT, andHAF_UPSTREAM_TAGas dotenv artifacts
The includes section now uses:
-
/templates/haf_data_preparation.gitlab-ci.yml(contains.prepare_haf_imagetemplate if needed) -
/templates/source_change_detection.gitlab-ci.yml(contains.find_upstream_imagetemplate)
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_imagejob outputs correct variables -
Verify
syncjob successfully uses the detected HAF image