diff --git a/.drone/drone-home.jsonnet b/.drone/drone-home.jsonnet index 9d98589..29bcd4d 100644 --- a/.drone/drone-home.jsonnet +++ b/.drone/drone-home.jsonnet @@ -13,8 +13,22 @@ local config = { register, registry( config { - script: 'sh .drone/scripts/initialise-images.sh', + // script: 'sh .drone/scripts/initialise-images.sh', secrets: [], + images: [ + { + load: 'postgres:12.4', + save: 'postgres:12.4' + }, + { + load: 'guacamole/guacd:1.2.0', + save: 'guacamole/guacd:1.2.0', + }, + { + load: 'guacamole/guacamole:1.2.0', + save: 'guacamole/guacamole:1.2.0', + }, + ], }, ) { trigger +: { diff --git a/.drone/drone-home.yml b/.drone/drone-home.yml index 1d4d621..736e0ca 100644 --- a/.drone/drone-home.yml +++ b/.drone/drone-home.yml @@ -25,12 +25,35 @@ platform: arch: amd64 steps: -- name: "dockerpull and save docker images:" +- name: dockerpostgres:12.4 image: docker:19.03.12-dind@sha256:8dded163e463f4a59bf305b3dca98e312b2cfb89a43da3872e48f95a7554c48f commands: - set -e - export REGISTRY=$${REGISTRY_DOMAIN}:$${REGISTRY_PORT}/ - - sh .drone/scripts/initialise-images.sh $${REGISTRY} "$${REGISTRY_PASSWORD}" + - "n=0\nwhile :\ndo\n docker login $${REGISTRY} --username client --password \"$${REGISTRY_PASSWORD}\" \\\n && break # substitute your command here\n n=$((n+1))\n if [ $n -ge 10 ]; then\n echo \"login failed\"\n exit 1\n fi\n echo \"retrying login..$n\"\n sleep 5\ndone\n" + - "n=0\nwhile :\ndo\n docker pull postgres:12.4 \\\n && docker tag postgres:12.4 $${REGISTRY}postgres:12.4 \\\n && docker push postgres:12.4 $${REGISTRY}postgres:12.4 && break # substitute your command here\n n=$((n+1))\n if [ $n -ge 10 ]; then\n echo \"initialise failed\"\n exit 1\n fi\n echo \"retrying..$n\"\n sleep 5\ndone\n" + volumes: + - name: dockersock + path: /var/run + +- name: dockerguacamole/guacd:1.2.0 + image: docker:19.03.12-dind@sha256:8dded163e463f4a59bf305b3dca98e312b2cfb89a43da3872e48f95a7554c48f + commands: + - set -e + - export REGISTRY=$${REGISTRY_DOMAIN}:$${REGISTRY_PORT}/ + - "n=0\nwhile :\ndo\n docker login $${REGISTRY} --username client --password \"$${REGISTRY_PASSWORD}\" \\\n && break # substitute your command here\n n=$((n+1))\n if [ $n -ge 10 ]; then\n echo \"login failed\"\n exit 1\n fi\n echo \"retrying login..$n\"\n sleep 5\ndone\n" + - "n=0\nwhile :\ndo\n docker pull guacamole/guacd:1.2.0 \\\n && docker tag guacamole/guacd:1.2.0 $${REGISTRY}guacamole/guacd:1.2.0 \\\n && docker push guacamole/guacd:1.2.0 $${REGISTRY}guacamole/guacd:1.2.0 && break # substitute your command here\n n=$((n+1))\n if [ $n -ge 10 ]; then\n echo \"initialise failed\"\n exit 1\n fi\n echo \"retrying..$n\"\n sleep 5\ndone\n" + volumes: + - name: dockersock + path: /var/run + +- name: dockerguacamole/guacamole:1.2.0 + image: docker:19.03.12-dind@sha256:8dded163e463f4a59bf305b3dca98e312b2cfb89a43da3872e48f95a7554c48f + commands: + - set -e + - export REGISTRY=$${REGISTRY_DOMAIN}:$${REGISTRY_PORT}/ + - "n=0\nwhile :\ndo\n docker login $${REGISTRY} --username client --password \"$${REGISTRY_PASSWORD}\" \\\n && break # substitute your command here\n n=$((n+1))\n if [ $n -ge 10 ]; then\n echo \"login failed\"\n exit 1\n fi\n echo \"retrying login..$n\"\n sleep 5\ndone\n" + - "n=0\nwhile :\ndo\n docker pull guacamole/guacamole:1.2.0 \\\n && docker tag guacamole/guacamole:1.2.0 $${REGISTRY}guacamole/guacamole:1.2.0 \\\n && docker push guacamole/guacamole:1.2.0 $${REGISTRY}guacamole/guacamole:1.2.0 && break # substitute your command here\n n=$((n+1))\n if [ $n -ge 10 ]; then\n echo \"initialise failed\"\n exit 1\n fi\n echo \"retrying..$n\"\n sleep 5\ndone\n" volumes: - name: dockersock path: /var/run