aboutsummaryrefslogtreecommitdiff
path: root/leg-kolla-push-images
diff options
context:
space:
mode:
authorJorge Niedbalski <jorge.niedbalski@linaro.org>2018-05-17 13:02:03 -0400
committerMarcin Juszkiewicz <marcin.juszkiewicz@linaro.org>2018-05-17 18:46:35 +0000
commit14ec86ad42b7a57b733d761a581cab2b85ada5df (patch)
tree050cfd6aac0d7b37899cb4d7f26f015bdcf01b35 /leg-kolla-push-images
parent7c3ecb200063d8d4889daa3fade782efaec72077 (diff)
leg-kolla-*: Parallelize the docker push.
Proof of concept to use gnu parallel to make the docker push process parallel to nbproc --all processes. Change-Id: I561e18408354812d191e8300de45f2056b2555d0 Signed-off-by: Jorge Niedbalski <jorge.niedbalski@linaro.org>
Diffstat (limited to 'leg-kolla-push-images')
-rw-r--r--leg-kolla-push-images/build.sh8
1 files changed, 1 insertions, 7 deletions
diff --git a/leg-kolla-push-images/build.sh b/leg-kolla-push-images/build.sh
index 27b250fb..cbbc4a0a 100644
--- a/leg-kolla-push-images/build.sh
+++ b/leg-kolla-push-images/build.sh
@@ -22,10 +22,4 @@ current=1
echo "Going to push ${amount} of images with '${kolla_tag}' tag."
-for image in $(cat list-of-images)
-do
- echo "Pushing ${current} of ${amount} - ${image}"
- docker push $image:${kolla_tag}
- ((current++))
-done
-
+parallel --will-cite -k -j $(nproc --all) --halt now,fail=1 'echo 'Pushing {#} of {= '$_=total_jobs()' =} - {}' && /usr/bin/docker push {}:${kolla_tag}' ::: $(cat list-of-images)