mirror of
https://github.com/hcengineering/platform.git
synced 2025-01-08 21:27:45 +03:00
Add retry for docker push (#6427)
Signed-off-by: Andrey Sobolev <haiodo@gmail.com>
This commit is contained in:
parent
6e47c6d378
commit
084bce83e1
@ -11,11 +11,23 @@ then
|
|||||||
version="${a[0]}.${a[1]}.${c}-staging"
|
version="${a[0]}.${a[1]}.${c}-staging"
|
||||||
echo "Tagging stating $1 with version ${version}"
|
echo "Tagging stating $1 with version ${version}"
|
||||||
docker tag "$1:$rev_version" "$1:$version"
|
docker tag "$1:$rev_version" "$1:$version"
|
||||||
docker push "$1:$version"
|
for n in {1..5}; do
|
||||||
|
docker push "$1:$version" && break
|
||||||
|
echo 'Docker failed to push, wait 5 seconds'
|
||||||
|
sleep 5
|
||||||
|
done
|
||||||
else
|
else
|
||||||
echo "Tagging release $1 with version ${version}"
|
echo "Tagging release $1 with version ${version}"
|
||||||
docker tag "$1:$rev_version" "$1:$version"
|
docker tag "$1:$rev_version" "$1:$version"
|
||||||
docker tag "$1:$rev_version" "$1:latest"
|
docker tag "$1:$rev_version" "$1:latest"
|
||||||
docker push "$1:$version"
|
for n in {1..5}; do
|
||||||
docker push "$1:latest"
|
docker push "$1:$version" && break
|
||||||
|
echo 'Docker failed to push, wait 5 seconds'
|
||||||
|
sleep 5
|
||||||
|
done
|
||||||
|
for n in {1..5}; do
|
||||||
|
docker push "$1:latest" && break
|
||||||
|
echo 'Docker failed to push, wait 5 seconds'
|
||||||
|
sleep 5
|
||||||
|
done
|
||||||
fi
|
fi
|
||||||
|
@ -1,4 +1,8 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
echo "Tagging release $1 with version $2"
|
echo "Tagging release $1 with version $2"
|
||||||
docker tag "$1" "$1:$2"
|
docker tag "$1" "$1:$2"
|
||||||
docker push "$1:$2"
|
for n in {1..5}; do
|
||||||
|
docker push "$1:$2" && break
|
||||||
|
echo 'Docker failed to push, wait 5 seconds'
|
||||||
|
sleep 5
|
||||||
|
done
|
Loading…
Reference in New Issue
Block a user