run_sdk_container: skip fetching image if custom_image is requested

In our CI most uses of run_sdk_container pass the '-C image' flag, which broke
with the last change, due to unbound docker_sdk_vernum variable. Skip fetching
the image when custom_image is passed.

Signed-off-by: Jeremi Piotrowski <jpiotrowski@microsoft.com>
This commit is contained in:
Jeremi Piotrowski 2022-03-17 09:05:32 +01:00
parent ad6f2a4757
commit 65da6b8e79

View File

@ -108,8 +108,12 @@ if [ -z "$stat" ] ; then
gpg_volumes=$(gnupg_ssh_gcloud_mount_opts)
source ci-automation/ci_automation_common.sh
docker_image_from_registry_or_buildcache "flatcar-sdk-${arch}" "${docker_sdk_vernum}"
if [ -z "$custom_image" ]; then
(
source ci-automation/ci_automation_common.sh
docker_image_from_registry_or_buildcache "flatcar-sdk-${arch}" "${docker_sdk_vernum}"
)
fi
$docker create $tty -i \
-v /dev:/dev \