From 086d1219e19d823be65e1b7c73db06f454996969 Mon Sep 17 00:00:00 2001 From: Tomáš Levora Date: Wed, 27 Feb 2019 16:29:26 +0100 Subject: Fixed path to list for git repos download MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Added missing part of file name for correct dowload of git repositories Issue-ID: OOM-1684 Change-Id: Ic8235a04ea12e13ca7e4165734bd15a81f7c8578 Signed-off-by: Tomáš Levora --- build/creating_data/download-git-repos.sh | 2 +- build/download_offline_data_by_lists.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'build') diff --git a/build/creating_data/download-git-repos.sh b/build/creating_data/download-git-repos.sh index bb4a79f1..0219eb6f 100755 --- a/build/creating_data/download-git-repos.sh +++ b/build/creating_data/download-git-repos.sh @@ -24,7 +24,7 @@ usage () { echo "Usage:" echo -e "./$(basename $0) [destination directory]\n" echo "Examples:" - echo " ./$(basename $0) onap_3.0.0 ./git-repo" + echo " ./$(basename $0) onap_3.0.0-git_repos.list ./git-repo" } LIST="${1}" diff --git a/build/download_offline_data_by_lists.sh b/build/download_offline_data_by_lists.sh index aede41dc..b7acb4a5 100755 --- a/build/download_offline_data_by_lists.sh +++ b/build/download_offline_data_by_lists.sh @@ -67,7 +67,7 @@ mv "${DATA_DIR}/offline_data/docker_images_for_nexus/own_nginx_latest.tar" "${DA mv "${DATA_DIR}/offline_data/docker_images_for_nexus/sonatype_nexus3_latest.tar" "${DATA_DIR}/offline_data/docker_images_infra" echo "[Step $((CURR++))/$TOTAL Download git repos]" -$CTOOLS/download-git-repos.sh "${LISTS_DIR}/${TAG}" "${DATA_DIR}/git-repo" +$CTOOLS/download-git-repos.sh "${LISTS_DIR}/${TAG}-git_repos.list" "${DATA_DIR}/git-repo" echo "[Step $((CURR++))/$TOTAL Download http files]" $CTOOLS/download-http-files.sh "${LISTS_DIR}/${TAG}-http_files.list" "${DATA_DIR}/http" -- cgit 1.2.3-korg From 51ec4d199e6a7a6cb314e6b4d575303070c056d8 Mon Sep 17 00:00:00 2001 From: Tomáš Levora Date: Wed, 27 Feb 2019 17:00:25 +0100 Subject: Save docker images based on list MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Save all docker images to tarballs based on list instead of saving all local registry to prevent not necessary images in the package Issue-ID: OOM-1683 Change-Id: Iaf4e092ff124f753d50be876d6ab564c7f349ddc Signed-off-by: Tomáš Levora --- build/creating_data/save-docker-images.sh | 11 +++++------ build/download_offline_data_by_lists.sh | 2 +- 2 files changed, 6 insertions(+), 7 deletions(-) (limited to 'build') diff --git a/build/creating_data/save-docker-images.sh b/build/creating_data/save-docker-images.sh index f4a5d3c7..4c764556 100755 --- a/build/creating_data/save-docker-images.sh +++ b/build/creating_data/save-docker-images.sh @@ -27,7 +27,8 @@ if [ "$IS_COMMON_FUNCTIONS_SOURCED" != YES ] ; then . "${LOCAL_PATH}"/"${RELATIVE_PATH}"/common-functions.sh fi -IMG_DIR="$1" +LIST="${1}" +IMG_DIR="${2}" if [[ -z "$IMG_DIR" ]]; then IMG_DIR="./images" @@ -55,13 +56,11 @@ save_image() { echo "Save all images" line=1 -lines=$(docker images|grep -v 'IMAGE ID'|wc -l) +lines=$(wc -l ${LIST}) while read -r image; do echo "== pkg #$line of $lines ==" - name=$(echo $image|awk '{print $1}') - tag=$(echo $image|awk '{print $2}') - save_image "$name:$tag" + save_image "${image}" line=$((line+1)) -done <<< "$(docker images|grep -v 'IMAGE ID'|awk '{printf("%s %s\n", $1, $2)}'|column -t)" +done < "${LIST}" diff --git a/build/download_offline_data_by_lists.sh b/build/download_offline_data_by_lists.sh index b7acb4a5..5555d207 100755 --- a/build/download_offline_data_by_lists.sh +++ b/build/download_offline_data_by_lists.sh @@ -59,7 +59,7 @@ echo "[Step $((CURR++))/$TOTAL Build own nginx image]" $CTOOLS/create_nginx_image/01create-image.sh echo "[Step $((CURR++))/$TOTAL Save docker images from docker cache to tarfiles]" -$CTOOLS/save-docker-images.sh "${DATA_DIR}/offline_data/docker_images_for_nexus" +$CTOOLS/save-docker-images.sh "${LISTS_DIR}/${TAG}-docker_images.list" "${DATA_DIR}/offline_data/docker_images_for_nexus" echo "[Step $((CURR++))/$TOTAL move infra related images to infra folder]" mkdir -p "${DATA_DIR}/offline_data/docker_images_infra" -- cgit 1.2.3-korg