fix: retries only 10 times
This commit is contained in:
parent
a8c7fae1e8
commit
fc6397378f
|
@ -14,6 +14,11 @@ local config = {
|
|||
registry(
|
||||
config {
|
||||
script: 'sh .drone/scripts/initialise-images.sh',
|
||||
secrets: [
|
||||
'REGISTRY_DOMAIN',
|
||||
'REGISTRY_PORT',
|
||||
'REGISTRY_PASSWORD'
|
||||
],
|
||||
},
|
||||
) {
|
||||
trigger +: {
|
||||
|
|
|
@ -4,6 +4,6 @@
|
|||
"build": "drone jsonnet --source drone-home.jsonnet --target drone-home.yml --stream"
|
||||
},
|
||||
"dependencies": {
|
||||
"@sigyl/jsonnet-drone": "^0.3.0"
|
||||
"@sigyl/jsonnet-drone": "^0.3.1"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,7 +5,12 @@ do
|
|||
&& docker tag $2 $1$2 \
|
||||
&& docker push $1$2 && break # substitute your command here
|
||||
n=$((n+1))
|
||||
if [ $n -ge 10 ]; then
|
||||
echo "initialise failed"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "retrying..$n"
|
||||
sleep 1
|
||||
sleep 5
|
||||
done
|
||||
|
||||
|
|
|
@ -4,8 +4,13 @@ do
|
|||
docker login $1 --username client --password $2 \
|
||||
&& break # substitute your command here
|
||||
n=$((n+1))
|
||||
|
||||
if [ $n -ge 10 ]; then
|
||||
echo "login failed"
|
||||
exit 1
|
||||
fi
|
||||
echo "retrying login..$n"
|
||||
sleep 1
|
||||
sleep 5
|
||||
done
|
||||
|
||||
sh $(dirname $0)/initialise-image.sh $1 drone/drone:1.9.0 \
|
||||
|
|
Loading…
Reference in New Issue