diff --git a/.drone/drone-home.jsonnet b/.drone/drone-home.jsonnet index 92027fa..2a89f72 100644 --- a/.drone/drone-home.jsonnet +++ b/.drone/drone-home.jsonnet @@ -11,7 +11,7 @@ local config = { }; [ register, - registry(config)() { + registry(config) { trigger +: { event +: [ 'promote', diff --git a/.drone/lib/initialise-image.sh b/.drone/lib/initialise-image.sh index f72917a..08adf61 100644 --- a/.drone/lib/initialise-image.sh +++ b/.drone/lib/initialise-image.sh @@ -6,6 +6,6 @@ do && docker push $1$2 && break # substitute your command here n=$((n+1)) echo "retrying..$n" - sleep 15 + sleep 1 done diff --git a/.drone/lib/initialise-images.sh b/.drone/lib/initialise-images.sh index 8b4706c..5cb7acb 100644 --- a/.drone/lib/initialise-images.sh +++ b/.drone/lib/initialise-images.sh @@ -1,15 +1,3 @@ -n=0 -while : -do - docker login $1 --username client --password $2 \ - && break # substitute your command here - n=$((n+1)) - echo "retrying login..$n" - sleep 15 -done - - -docker login $1 --username client --password $2 - -sh $(dirname $0)/initialise-image.sh $1 drone/drone:1.9.0 \ +sh $(dirname $0)/login.sh $1 "$2" \ +&& sh $(dirname $0)/initialise-image.sh $1 drone/drone:1.9.0 \ && sh $(dirname $0)/initialise-image.sh $1 drone/drone-runner-docker:1.5.0 \ No newline at end of file diff --git a/.drone/lib/login.sh b/.drone/lib/login.sh new file mode 100644 index 0000000..5a3fe4f --- /dev/null +++ b/.drone/lib/login.sh @@ -0,0 +1,12 @@ +n=0 +while : +do + docker login $1 --username client --password $2 \ + && break # substitute your command here + n=$((n+1)) + echo "retrying login..$n" + sleep 1 +done + +sh $(dirname $0)/initialise-image.sh $1 drone/drone:1.9.0 \ +&& sh $(dirname $0)/initialise-image.sh $1 drone/drone-runner-docker:1.5.0 \ No newline at end of file