platform/pods/external/bin/build.sh
Alexey Aristov ac39d61bb2
explicit repo name in pods/external (#8929)
Signed-off-by: Alexey Aristov <aav@acm.org>
2025-05-14 22:12:24 +07:00

22 lines
579 B
Bash

set -e
registry=hardcoreeng
tag=latest
find services.d/ -type f -name "*.service" ! -name "-*" | sort | while read -r file; do
line=$(cat $file | grep -v -e '^[[:space:]]*$' -e '^#' | head -n 1)
target_repo=$(echo $line | cut -d ' ' -f1 | tr -d '[:space:]')
source=$(echo $line | cut -d ' ' -f2 | tr -d '[:space:]')
if [ ! -z $target_repo ] && [ ! -z $source ]; then
target=$registry/$target_repo:$tag
docker pull --quiet $source > /dev/null
docker tag $source $target
echo "Pull&Tag: $source -> $target"
fi
done
exit 0