Skip to content
Snippets Groups Projects
Commit 09b4b246 authored by garciadeblas's avatar garciadeblas
Browse files

Update patch_module to allow push to ttl.sh


Change-Id: Iab5ac29525145bb05edf0ec4b437b135faf464c1
Signed-off-by: default avatargarciadeblas <gerardo.garciadeblas@telefonica.com>
parent 72a25d59
No related branches found
No related tags found
No related merge requests found
......@@ -18,8 +18,12 @@
if [ $# -ne 2 ]; then
echo "Usage $0 <module> <tag_number>"
echo "Example: $0 ro 2"
echo "Example: $0 lcm 5"
echo " Example: $0 ro 2"
echo " Will import image in containerd local registry as opensourcemano/ro:devel-2"
echo " Example: $0 lcm 5"
echo " Will import image in containerd local registry as opensourcemano/lcm:devel-5"
echo " Example: $0 osm-krm-functions 24h"
echo " (when tag_number is '[0-9]+h') Will push the image to ttl.sh/osm-krm-functions-devel:24h"
exit 1
fi
......@@ -27,6 +31,16 @@ MODULE_NAME="$1"
TAG_NUMBER="$2"
set -x
if [[ "${TAG_NUMBER}" =~ ^[0-9]+h$ ]]; then
IMAGE_NAME="ttl.sh/${MODULE_NAME}-devel:${TAG_NUMBER}"
docker tag opensourcemano/${MODULE_NAME}:devel ${IMAGE_NAME}
docker push ${IMAGE_NAME}
exit 0
else
echo "Image will be imported locally"
fi
IMAGE_NAME="opensourcemano/${MODULE_NAME}:devel-${TAG_NUMBER}"
docker tag opensourcemano/${MODULE_NAME}:devel ${IMAGE_NAME}
IMAGE_FILE="${MODULE_NAME}-devel-${TAG_NUMBER}.tar.gz"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment