.
This commit is contained in:
parent
fc39595237
commit
7973cd10b7
|
@ -1,4 +1,4 @@
|
|||
export LOCAL_DOCKER_REGISTRY=${REGISTRY_DOMAIN}:${REGISTRY_PORT}/${NAME}/ \
|
||||
export LOCAL_DOCKER_REGISTRY=${REGISTRY_DOMAIN}:${REGISTRY_PORT}/${ROOT}/${NAME}/ \
|
||||
&& docker stack rm guacamole \
|
||||
&& echo 'sleeping...zzz' \
|
||||
&& sleep 60 \
|
||||
|
|
|
@ -8,7 +8,7 @@ local save = import 'node_modules/@sigyl/jsonnet-drone/save.libsonnet';
|
|||
|
||||
local config = {
|
||||
registry: '',
|
||||
root: '/stack/',
|
||||
root: 'stack',
|
||||
name: 'guacamole',
|
||||
};
|
||||
|
||||
|
|
|
@ -33,7 +33,7 @@ steps:
|
|||
commands:
|
||||
- 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 pull postgres:12.4 \\\\\n && docker tag postgres:12.4 $${REGISTRY_DOMAIN}:$${REGISTRY_PORT}/guacamole/postgres:12.4 \\\\\n && docker push $${REGISTRY_DOMAIN}:$${REGISTRY_PORT}/guacamole/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}/stack/guacamole/postgres:12.4 \\\\\n && docker push $${REGISTRY_DOMAIN}:$${REGISTRY_PORT}/stack/guacamole/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:
|
||||
- name: dockersock
|
||||
path: /var/run
|
||||
|
@ -43,7 +43,7 @@ steps:
|
|||
commands:
|
||||
- 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 pull guacamole/guacd:1.2.0 \\\\\n && docker tag guacamole/guacd:1.2.0 $${REGISTRY_DOMAIN}:$${REGISTRY_PORT}/guacamole/guacamole/guacd:1.2.0 \\\\\n && docker push $${REGISTRY_DOMAIN}:$${REGISTRY_PORT}/guacamole/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}/stack/guacamole/guacamole/guacd:1.2.0 \\\\\n && docker push $${REGISTRY_DOMAIN}:$${REGISTRY_PORT}/stack/guacamole/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:
|
||||
- name: dockersock
|
||||
path: /var/run
|
||||
|
@ -53,7 +53,7 @@ steps:
|
|||
commands:
|
||||
- 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 pull guacamole/guacamole:1.2.0 \\\\\n && docker tag guacamole/guacamole:1.2.0 $${REGISTRY_DOMAIN}:$${REGISTRY_PORT}/guacamole/guacamole/guacamole:1.2.0 \\\\\n && docker push $${REGISTRY_DOMAIN}:$${REGISTRY_PORT}/guacamole/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}/stack/guacamole/guacamole/guacamole:1.2.0 \\\\\n && docker push $${REGISTRY_DOMAIN}:$${REGISTRY_PORT}/stack/guacamole/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:
|
||||
- name: dockersock
|
||||
path: /var/run
|
||||
|
@ -112,8 +112,8 @@ steps:
|
|||
- drone_repo_name
|
||||
- drone_repo_namespace
|
||||
script:
|
||||
- mkdir -p /stack/images/guacamole
|
||||
- rm -f /stack/images/guacamole/*.*
|
||||
- mkdir -p /stack/.images/guacamole
|
||||
- rm -f /stack/.images/guacamole/*.*
|
||||
|
||||
- name: postgres:12.4
|
||||
image: appleboy/drone-ssh:1.6.2@sha256:b801dc2cd238c192b6e99acfa7bc3f5b9a03f312bd2feb1e10b3a7a28a1b80ea
|
||||
|
@ -129,10 +129,10 @@ steps:
|
|||
- registry_password
|
||||
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"
|
||||
- docker pull $${REGISTRY_DOMAIN}:$${REGISTRY_PORT}/guacamole/postgres:12.4
|
||||
- docker save $${REGISTRY_DOMAIN}:$${REGISTRY_PORT}/postgres:12.4 -o /stack/images/guacamole/postgres:12.4.tar
|
||||
- docker pull $${REGISTRY_DOMAIN}:$${REGISTRY_PORT}/stack/guacamole/postgres:12.4
|
||||
- docker save $${REGISTRY_DOMAIN}:$${REGISTRY_PORT}/stack/guacamole/postgres:12.4 -o /stack/images/guacamole/postgres:12.4.tar
|
||||
- echo "docker load postgres:12.4.tar" >> /stack/images/guacamole/load.sh
|
||||
- echo "docker tag $${REGISTRY_DOMAIN}:$${REGISTRY_PORT}/guacamole/postgres:12.4 DOLLAR1/postgres:12.4" >> /stack/images/guacamole/load.sh
|
||||
- echo "docker tag $${REGISTRY_DOMAIN}:$${REGISTRY_PORT}/stack/guacamole/postgres:12.4 /stack/DOLLAR1/postgres:12.4" >> stackimages/guacamole/load.sh
|
||||
|
||||
- name: guacamole/guacd:1.2.0
|
||||
image: appleboy/drone-ssh:1.6.2@sha256:b801dc2cd238c192b6e99acfa7bc3f5b9a03f312bd2feb1e10b3a7a28a1b80ea
|
||||
|
@ -148,10 +148,10 @@ steps:
|
|||
- registry_password
|
||||
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"
|
||||
- docker pull $${REGISTRY_DOMAIN}:$${REGISTRY_PORT}/guacamole/guacamole/guacd:1.2.0
|
||||
- docker save $${REGISTRY_DOMAIN}:$${REGISTRY_PORT}/guacamole/guacd:1.2.0 -o /stack/images/guacamole/guacamole_guacd:1.2.0.tar
|
||||
- docker pull $${REGISTRY_DOMAIN}:$${REGISTRY_PORT}/stack/guacamole/guacamole/guacd:1.2.0
|
||||
- docker save $${REGISTRY_DOMAIN}:$${REGISTRY_PORT}/stack/guacamole/guacamole/guacd:1.2.0 -o /stack/images/guacamole/guacamole_guacd:1.2.0.tar
|
||||
- echo "docker load guacamole_guacd:1.2.0.tar" >> /stack/images/guacamole/load.sh
|
||||
- echo "docker tag $${REGISTRY_DOMAIN}:$${REGISTRY_PORT}/guacamole/guacamole/guacd:1.2.0 DOLLAR1/guacamole/guacd:1.2.0" >> /stack/images/guacamole/load.sh
|
||||
- echo "docker tag $${REGISTRY_DOMAIN}:$${REGISTRY_PORT}/stack/guacamole/guacamole/guacd:1.2.0 /stack/DOLLAR1/guacamole/guacd:1.2.0" >> stackimages/guacamole/load.sh
|
||||
|
||||
- name: guacamole/guacamole:1.2.0
|
||||
image: appleboy/drone-ssh:1.6.2@sha256:b801dc2cd238c192b6e99acfa7bc3f5b9a03f312bd2feb1e10b3a7a28a1b80ea
|
||||
|
@ -167,10 +167,10 @@ steps:
|
|||
- registry_password
|
||||
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"
|
||||
- docker pull $${REGISTRY_DOMAIN}:$${REGISTRY_PORT}/guacamole/guacamole/guacamole:1.2.0
|
||||
- docker save $${REGISTRY_DOMAIN}:$${REGISTRY_PORT}/guacamole/guacamole:1.2.0 -o /stack/images/guacamole/guacamole_guacamole:1.2.0.tar
|
||||
- docker pull $${REGISTRY_DOMAIN}:$${REGISTRY_PORT}/stack/guacamole/guacamole/guacamole:1.2.0
|
||||
- docker save $${REGISTRY_DOMAIN}:$${REGISTRY_PORT}/stack/guacamole/guacamole/guacamole:1.2.0 -o /stack/images/guacamole/guacamole_guacamole:1.2.0.tar
|
||||
- echo "docker load guacamole_guacamole:1.2.0.tar" >> /stack/images/guacamole/load.sh
|
||||
- echo "docker tag $${REGISTRY_DOMAIN}:$${REGISTRY_PORT}/guacamole/guacamole/guacamole:1.2.0 DOLLAR1/guacamole/guacamole:1.2.0" >> /stack/images/guacamole/load.sh
|
||||
- echo "docker tag $${REGISTRY_DOMAIN}:$${REGISTRY_PORT}/stack/guacamole/guacamole/guacamole:1.2.0 /stack/DOLLAR1/guacamole/guacamole:1.2.0" >> stackimages/guacamole/load.sh
|
||||
|
||||
trigger:
|
||||
event:
|
||||
|
@ -211,7 +211,7 @@ steps:
|
|||
command_timeout: 2m
|
||||
source:
|
||||
- .
|
||||
target: /stack/guacamole
|
||||
target: stackguacamole
|
||||
|
||||
- name: wait
|
||||
image: alpine:3.12.0@sha256:90baa0922fe90624b05cb5766fa5da4e337921656c2f8e2b13bd3c052a0baac1
|
||||
|
@ -250,6 +250,7 @@ steps:
|
|||
- export REGISTRY_PASSWORD=$${REGISTRY_PASSWORD}
|
||||
- set -e
|
||||
- export NAME=guacamole
|
||||
- export ROOT=stack
|
||||
- cd /stack/guacamole
|
||||
- "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"
|
||||
- sh .drone/pull.sh
|
||||
|
|
|
@ -1 +1 @@
|
|||
docker pull ${REGISTRY_DOMAIN}:${REGISTRY_PORT}/${NAME}/guacamole-postgresql
|
||||
docker pull ${REGISTRY_DOMAIN}:${REGISTRY_PORT}/${ROOT}/${NAME}/guacamole-postgresql
|
||||
|
|
|
@ -1 +1 @@
|
|||
docker push ${REGISTRY_DOMAIN}:${REGISTRY_PORT}/${NAME}/guacamole-postgresql
|
||||
docker push ${REGISTRY_DOMAIN}:${REGISTRY_PORT}/${ROOT}/${NAME}/guacamole-postgresql
|
||||
|
|
Loading…
Reference in New Issue