Skip to content
Snippets Groups Projects
Commit 4112a705 authored by Corné Lukken's avatar Corné Lukken
Browse files

L2SS-205: Fix wordsplitting image list in bash

parent ec9f3644
No related branches found
No related tags found
1 merge request!183Docker image building & pushing with CI pipeline caching
......@@ -70,6 +70,11 @@ docker_store_images_changes:
docker_build_image_devices:
extends: .base_docker_images
script:
- bash $CI_PROJECT_DIR/sbin/tag_and_push_docker_image.sh apsct-sim $tag
- bash $CI_PROJECT_DIR/sbin/tag_and_push_docker_image.sh apspu-sim $tag
- bash $CI_PROJECT_DIR/sbin/tag_and_push_docker_image.sh recv-sim $tag
- bash $CI_PROJECT_DIR/sbin/tag_and_push_docker_image.sh sdptr-sim $tag
- bash $CI_PROJECT_DIR/sbin/tag_and_push_docker_image.sh unb2-sim $tag
- bash $CI_PROJECT_DIR/sbin/tag_and_push_docker_image.sh device-apsct $tag
- bash $CI_PROJECT_DIR/sbin/tag_and_push_docker_image.sh device-apspu $tag
- bash $CI_PROJECT_DIR/sbin/tag_and_push_docker_image.sh device-boot $tag
......
......@@ -112,8 +112,12 @@ if [ ! -z "${1+x}" ] && [ "${1}" == "pull" ]; then
tag="${2}"
for image in "${LOCAL_IMAGES[@]}"; do
local_url="${LOCAL_DOCKER_REGISTRY_HOST}/${LOCAL_DOCKER_REGISTRY_USER}/${image}"
# Pull images, at least one of the two immages must succeed
# Set, splits tuple into $1 and $2. this shadows previous variables
# shellcheck disable=SC2086
set -- $image
local_url="${LOCAL_DOCKER_REGISTRY_HOST}/${LOCAL_DOCKER_REGISTRY_USER}/${1}"
# Pull images, at least one of the two images must succeed
echo "docker pull ${local_url}:${tag}"
docker pull "${local_url}:${tag}" || docker pull "${local_url}:latest" || exit 1
done
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment