mirror of
https://github.com/hcengineering/platform.git
synced 2025-04-14 04:08:19 +00:00
UBERF-8328: Fail CI on docker push failure (#6794)
Signed-off-by: Alexey Zinoviev <alexey.zinoviev@xored.com>
This commit is contained in:
parent
563f44bb66
commit
951fcf2afa
@ -9,12 +9,19 @@ then
|
||||
c=( ${a[2]//[^0-9]*/ } )
|
||||
((c++))
|
||||
version="${a[0]}.${a[1]}.${c}-staging"
|
||||
echo "Tagging stating $1 with version ${version}"
|
||||
echo "Tagging staging $1 with version ${version}"
|
||||
docker tag "$1:$rev_version" "$1:$version"
|
||||
for n in {1..5}; do
|
||||
docker push "$1:$version" && break
|
||||
echo 'Docker failed to push, wait 5 seconds'
|
||||
sleep 5
|
||||
|
||||
if (( $n < 5 ))
|
||||
then
|
||||
echo 'Docker failed to push, wait 5 second'
|
||||
sleep 5
|
||||
else
|
||||
echo '5 push attempts failed, exiting with failure'
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
else
|
||||
echo "Tagging release $1 with version ${version}"
|
||||
@ -22,12 +29,26 @@ else
|
||||
docker tag "$1:$rev_version" "$1:latest"
|
||||
for n in {1..5}; do
|
||||
docker push "$1:$version" && break
|
||||
echo 'Docker failed to push, wait 5 seconds'
|
||||
sleep 5
|
||||
|
||||
if (( $n < 5 ))
|
||||
then
|
||||
echo 'Docker failed to push, wait 5 second'
|
||||
sleep 5
|
||||
else
|
||||
echo '5 push attempts failed, exiting with failure'
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
for n in {1..5}; do
|
||||
docker push "$1:latest" && break
|
||||
echo 'Docker failed to push, wait 5 seconds'
|
||||
sleep 5
|
||||
|
||||
if (( $n < 5 ))
|
||||
then
|
||||
echo 'Docker failed to push, wait 5 second'
|
||||
sleep 5
|
||||
else
|
||||
echo '5 push attempts failed, exiting with failure'
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user