Use sourceRegistry from deps.yaml for sorbet/drctl in ctst Dockerfile#2353
Conversation
Hello delthas,My role is to assist you with the merge of this Available options
Available commands
Status report is not available. |
Waiting for approvalThe following approvals are needed before I can proceed with the merge:
|
00492a6 to
31774ab
Compare
The ctst Dockerfile hardcoded ghcr.io/scality as the registry for sorbet and drctl images, ignoring the sourceRegistry field in deps.yaml. This meant changing sourceRegistry (e.g. to a playground fork) had no effect on CI test builds. Extract the full image path (sourceRegistry + image) from deps.yaml using yq in the workflow, and pass it as Docker build args. The Dockerfile now uses SORBET_IMAGE and DRCTL_IMAGE ARGs with backward-compatible defaults. Issue: ZENKO-5220
31774ab to
02b8b4a
Compare
|
/after_pull_request=2357 |
Waiting for other pull request(s)The current pull request is locked by the after_pull_request option. In order for me to merge this pull request, run the following actions first: ➡️ Merge the
Alternatively, delete all the after_pull_request comments from this pull request. The following options are set: after_pull_request, approve |
Waiting for other pull request(s)The current pull request is locked by the after_pull_request option. In order for me to merge this pull request, run the following actions first: ➡️ Merge the
Alternatively, delete all the after_pull_request comments from this pull request. The following options are set: after_pull_request |
Summary
ghcr.io/scalityas the registry for sorbet and drctl images, ignoring thesourceRegistryfield indeps.yamlsourceRegistry + image) fromdeps.yamlusingyqin the workflow, pass it as Docker build argsSORBET_IMAGEandDRCTL_IMAGEARGs with backward-compatible defaultsWhy inline yq rather than a shared helper
The
sourceRegistry + "/" + imageextraction pattern is already duplicated across 13 call sites in 7 files, each with slightly different needs (with/without tag, with/withoutdocker.iofallback, iterating all images vs. a single named image). Here is the full picture:Existing sourceRegistry extraction patterns
docker.iofallbacksolution/kafka_build_vars.sh:10get_image_from_deps().$dep_name | .sourceRegistry + "/" + .imageend2end.yaml:320(build-kafka job)solution/build.sh:87flatten_source_images().* | select(.image) | .sourceRegistry + "/" + .image + ":" + .tagend2end.yaml:280(build-iso job)solution/build.sh:98dependencies_versions_env().[] | select(.image) | .envsubst + "=" + .imageend2end.yaml:280(build-iso job)solution/build.sh:226get_component_dashboards().* | select(.dashboard) | .sourceRegistry + "/" + .dashboard + ":" + .tagsolution/build.sh:243copy_iam_policies().* | select(.policy) | .sourceRegistry + "/" + .policy + ":" + .tagsolution/build.sh:255copy_config().* | select(.config) | .sourceRegistry + "/" + .config + ":" + .tagsolution/build.sh:356download_tools().[] | .sourceRegistry + "/" + .image + ":" + .tagsolution-base/build.sh:67flatten_source_images().* | .sourceRegistry + "/" + .image + ":" + .taginstall-kind-dependencies.sh:211install-kind-dependencies.sh:236get_image_from_deps().$dep_name | .sourceRegistry + "/" + .image + ":" + .tagdeploy-zenko.sh:58dependencies_image_env().[] | .envsubst + "=" + .sourceRegistry + "/" + .imagedeploy-zenko.sh:64dependencies_dashboard_env().[] | .envsubst + "=" + .sourceRegistry + "/" + .dashboarddeploy-zenko.sh:70dependencies_policy_env().[] | .envsubst + "=" + .sourceRegistry + "/" + .policydeploy-zenko.sh:76dependencies_config_env().[] | .envsubst + "=" + .sourceRegistry + "/" + .configdeploy-zkop.sh:5."zenko-operator" | .sourceRegistry + "/" + .imageEach function builds the string slightly differently depending on its needs. Refactoring all 13 sites into a shared helper would be a separate effort. This PR adds one more inline call, consistent with the existing
deploy-zkop.shstyle (nodocker.iofallback, no tag — both sorbet and drctl always havesourceRegistrydefined indeps.yaml).Consolidating the duplication into a shared utility could be done in a follow-up PR.
Fixes ZENKO-5220