This commit is contained in:
Giles Bradshaw 2020-10-22 22:47:23 +01:00
parent 3f49d0d1e0
commit b6d9e0e649
1 changed files with 18 additions and 18 deletions

View File

@ -33,7 +33,7 @@ steps:
commands: commands:
- set -e - set -e
- "n=0\nwhile :\ndo\n docker login $${REGISTRY_DOMAIN}:$${REGISTRY_PORT}/ --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 login $${REGISTRY_DOMAIN}:$${REGISTRY_PORT}/ --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_DOMAIN}:$${REGISTRY_PORT}/postgres:12.4 \\\\\n && docker push $${REGISTRY_DOMAIN}:$${REGISTRY_PORT}/postgres:12.4 && break\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" - "n=0\nwhile :\ndo\n docker pull postgres:12.4 \\\\\n && docker tag postgres:12.4 $${REGISTRY_DOMAIN}:$${REGISTRY_PORT}/proxy/postgres:12.4 \\\\\n && docker push $${REGISTRY_DOMAIN}:$${REGISTRY_PORT}/proxy/postgres:12.4 && break\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: volumes:
- name: dockersock - name: dockersock
path: /var/run path: /var/run
@ -43,7 +43,7 @@ steps:
commands: commands:
- set -e - set -e
- "n=0\nwhile :\ndo\n docker login $${REGISTRY_DOMAIN}:$${REGISTRY_PORT}/ --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 login $${REGISTRY_DOMAIN}:$${REGISTRY_PORT}/ --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_DOMAIN}:$${REGISTRY_PORT}/guacamole/guacd:1.2.0 \\\\\n && docker push $${REGISTRY_DOMAIN}:$${REGISTRY_PORT}/guacamole/guacd:1.2.0 && break\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" - "n=0\nwhile :\ndo\n docker pull guacamole/guacd:1.2.0 \\\\\n && docker tag guacamole/guacd:1.2.0 $${REGISTRY_DOMAIN}:$${REGISTRY_PORT}/proxy/guacamole/guacd:1.2.0 \\\\\n && docker push $${REGISTRY_DOMAIN}:$${REGISTRY_PORT}/proxy/guacamole/guacd:1.2.0 && break\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: volumes:
- name: dockersock - name: dockersock
path: /var/run path: /var/run
@ -53,7 +53,7 @@ steps:
commands: commands:
- set -e - set -e
- "n=0\nwhile :\ndo\n docker login $${REGISTRY_DOMAIN}:$${REGISTRY_PORT}/ --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 login $${REGISTRY_DOMAIN}:$${REGISTRY_PORT}/ --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_DOMAIN}:$${REGISTRY_PORT}/guacamole/guacamole:1.2.0 \\\\\n && docker push $${REGISTRY_DOMAIN}:$${REGISTRY_PORT}/guacamole/guacamole:1.2.0 && break\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" - "n=0\nwhile :\ndo\n docker pull guacamole/guacamole:1.2.0 \\\\\n && docker tag guacamole/guacamole:1.2.0 $${REGISTRY_DOMAIN}:$${REGISTRY_PORT}/proxy/guacamole/guacamole:1.2.0 \\\\\n && docker push $${REGISTRY_DOMAIN}:$${REGISTRY_PORT}/proxy/guacamole/guacamole:1.2.0 && break\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: volumes:
- name: dockersock - name: dockersock
path: /var/run path: /var/run
@ -115,7 +115,7 @@ steps:
- mkdir -p /root/images/guacamole - mkdir -p /root/images/guacamole
- rm /root/images/guacamole/*.* - rm /root/images/guacamole/*.*
- name: postgres:12.4 - name: proxy/postgres:12.4
image: appleboy/drone-ssh:1.6.2@sha256:b801dc2cd238c192b6e99acfa7bc3f5b9a03f312bd2feb1e10b3a7a28a1b80ea image: appleboy/drone-ssh:1.6.2@sha256:b801dc2cd238c192b6e99acfa7bc3f5b9a03f312bd2feb1e10b3a7a28a1b80ea
settings: settings:
envs: envs:
@ -129,12 +129,12 @@ steps:
- registry_password - registry_password
script: script:
- "n=0\nwhile :\ndo\n docker login $${REGISTRY_DOMAIN}:$${REGISTRY_PORT}/ --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 login $${REGISTRY_DOMAIN}:$${REGISTRY_PORT}/ --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"
- docker pull $${REGISTRY_DOMAIN}:$${REGISTRY_PORT}/postgres:12.4 - docker pull $${REGISTRY_DOMAIN}:$${REGISTRY_PORT}/proxy/postgres:12.4
- docker save $${REGISTRY_DOMAIN}:$${REGISTRY_PORT}/postgres:12.4 -o /root/images/guacamole/postgres:12.4.tar - docker save $${REGISTRY_DOMAIN}:$${REGISTRY_PORT}/proxy/postgres:12.4 -o /root/images/guacamole/proxy-postgres:12.4.tar
- echo "docker load postgres:12.4.tar" >> /root/images/guacamole/load.sh - echo "docker load proxy_postgres:12.4.tar" >> /root/images/guacamole/load.sh
- echo "docker tag $${REGISTRY_DOMAIN}:$${REGISTRY_PORT}/postgres:12.4 DOLLAR1/postgres:12.4" >> /root/images/guacamole/load.sh - echo "docker tag $${REGISTRY_DOMAIN}:$${REGISTRY_PORT}/proxy/postgres:12.4 DOLLAR1/proxy/postgres:12.4" >> /root/images/guacamole/load.sh
- name: guacamole/guacd:1.2.0 - name: proxy/guacamole/guacd:1.2.0
image: appleboy/drone-ssh:1.6.2@sha256:b801dc2cd238c192b6e99acfa7bc3f5b9a03f312bd2feb1e10b3a7a28a1b80ea image: appleboy/drone-ssh:1.6.2@sha256:b801dc2cd238c192b6e99acfa7bc3f5b9a03f312bd2feb1e10b3a7a28a1b80ea
settings: settings:
envs: envs:
@ -148,12 +148,12 @@ steps:
- registry_password - registry_password
script: script:
- "n=0\nwhile :\ndo\n docker login $${REGISTRY_DOMAIN}:$${REGISTRY_PORT}/ --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 login $${REGISTRY_DOMAIN}:$${REGISTRY_PORT}/ --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"
- docker pull $${REGISTRY_DOMAIN}:$${REGISTRY_PORT}/guacamole/guacd:1.2.0 - docker pull $${REGISTRY_DOMAIN}:$${REGISTRY_PORT}/proxy/guacamole/guacd:1.2.0
- docker save $${REGISTRY_DOMAIN}:$${REGISTRY_PORT}/guacamole/guacd:1.2.0 -o /root/images/guacamole/guacamole-guacd:1.2.0.tar - docker save $${REGISTRY_DOMAIN}:$${REGISTRY_PORT}/proxy/guacamole/guacd:1.2.0 -o /root/images/guacamole/proxy-guacamole-guacd:1.2.0.tar
- echo "docker load guacamole-guacd:1.2.0.tar" >> /root/images/guacamole/load.sh - echo "docker load proxy_guacamole_guacd:1.2.0.tar" >> /root/images/guacamole/load.sh
- echo "docker tag $${REGISTRY_DOMAIN}:$${REGISTRY_PORT}/guacamole/guacd:1.2.0 DOLLAR1/guacamole/guacd:1.2.0" >> /root/images/guacamole/load.sh - echo "docker tag $${REGISTRY_DOMAIN}:$${REGISTRY_PORT}/proxy/guacamole/guacd:1.2.0 DOLLAR1/proxy/guacamole/guacd:1.2.0" >> /root/images/guacamole/load.sh
- name: guacamole/guacamole:1.2.0 - name: proxy/guacamole/guacamole:1.2.0
image: appleboy/drone-ssh:1.6.2@sha256:b801dc2cd238c192b6e99acfa7bc3f5b9a03f312bd2feb1e10b3a7a28a1b80ea image: appleboy/drone-ssh:1.6.2@sha256:b801dc2cd238c192b6e99acfa7bc3f5b9a03f312bd2feb1e10b3a7a28a1b80ea
settings: settings:
envs: envs:
@ -167,10 +167,10 @@ steps:
- registry_password - registry_password
script: script:
- "n=0\nwhile :\ndo\n docker login $${REGISTRY_DOMAIN}:$${REGISTRY_PORT}/ --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 login $${REGISTRY_DOMAIN}:$${REGISTRY_PORT}/ --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"
- docker pull $${REGISTRY_DOMAIN}:$${REGISTRY_PORT}/guacamole/guacamole:1.2.0 - docker pull $${REGISTRY_DOMAIN}:$${REGISTRY_PORT}/proxy/guacamole/guacamole:1.2.0
- docker save $${REGISTRY_DOMAIN}:$${REGISTRY_PORT}/guacamole/guacamole:1.2.0 -o /root/images/guacamole/guacamole-guacamole:1.2.0.tar - docker save $${REGISTRY_DOMAIN}:$${REGISTRY_PORT}/proxy/guacamole/guacamole:1.2.0 -o /root/images/guacamole/proxy-guacamole-guacamole:1.2.0.tar
- echo "docker load guacamole-guacamole:1.2.0.tar" >> /root/images/guacamole/load.sh - echo "docker load proxy_guacamole_guacamole:1.2.0.tar" >> /root/images/guacamole/load.sh
- echo "docker tag $${REGISTRY_DOMAIN}:$${REGISTRY_PORT}/guacamole/guacamole:1.2.0 DOLLAR1/guacamole/guacamole:1.2.0" >> /root/images/guacamole/load.sh - echo "docker tag $${REGISTRY_DOMAIN}:$${REGISTRY_PORT}/proxy/guacamole/guacamole:1.2.0 DOLLAR1/proxy/guacamole/guacamole:1.2.0" >> /root/images/guacamole/load.sh
trigger: trigger:
event: event: