cbuild: check_registry_is_enabled() doesn't work
While the function re-creates the test from the old template, the script runs the following before calling it:
USER="${USER:-$(whoami)}"
CI_REGISTRY_USER="${CI_REGISTRY_USER:-$USER}"
CI_PROJECT_PATH="${CI_PROJECT_PATH:-$CI_REGISTRY_USER/$(basename $PWD)}"
CI_COMMIT_SHA="${CI_COMMIT_SHA:-$(git rev-list --max-count=1 HEAD)}"
CI_REGISTRY="${CI_REGISTRY:-registry.freedesktop.org}"
CI_REGISTRY_IMAGE="${CI_REGISTRY_IMAGE:-$CI_REGISTRY/$CI_PROJECT_PATH}"
CI_PIPELINE_ID="${CI_PIPELINE_ID:-1111}"
CI_BUILDS_DIR="${CI_BUILDS_DIR:-$PWD}"
That is, CI_REGISTRY_IMAGE is always defined, and we always consider the registry to be enabled.
(The same apply to check_required_env() I guess)