Merge "Update package versions"
authorBartek Grzybowski <b.grzybowski@partner.samsung.com>
Wed, 4 Nov 2020 07:41:34 +0000 (07:41 +0000)
committerGerrit Code Review <gerrit@onap.org>
Wed, 4 Nov 2020 07:41:34 +0000 (07:41 +0000)
build/create_repo.sh
build/docker-entrypoint.sh

index ec9b239..e70d69b 100755 (executable)
@@ -155,14 +155,12 @@ then
             mounted_lists+=(-v ${array_list}:${container_list_volume}${array_list##*/})
         done
 
-    docker run -d \
-               --name $container_name \
+    docker run --name $container_name \
                -v ${volume_offline_directory}:${container_offline_volume} \
                -v ${volume_repo_directory}:${container_repo_volume} \
                "${mounted_lists[@]}" \
                --rm \
                --entrypoint="${container_offline_volume}docker-entrypoint.sh" \
-                    -it ${docker_image} \
+                    ${docker_image} \
                     "${param_array[@]}"
-    docker logs $(docker ps --filter name="^${container_name}$" --format '{{.ID}}' -a) -f
 fi
index 965037e..7d5f5b2 100755 (executable)
@@ -1,5 +1,7 @@
 #!/usr/bin/env bash
 
+set -eo pipefail
+
 # Set distribution family
 distro_type=$(cat /etc/*-release | grep -w "ID" | awk -F'=' '{ print $2 }' | tr -d '"')
 case "$distro_type" in
@@ -45,7 +47,6 @@ EOF
 }
 
 # Getting input parameters
-POSITIONAL=()
 if [[ $# -eq 0 ]] ; then
     help # show help
     exit 0
@@ -107,6 +108,9 @@ then
     PCKG_LIST_DIR="/tmp/additional-lists/"
 fi
 
+# Clean target repo dir for idempotency
+rm -rf ${OFFLINE_REPO_DIR}/*
+
 case "$distro_type" in
     ubuntu)
         # Change current working dir