|
|
|
@ -28,12 +28,12 @@ clone:
|
|
|
|
|
disable: true
|
|
|
|
|
|
|
|
|
|
steps:
|
|
|
|
|
- name: drone/drone:1.9.1
|
|
|
|
|
- name: drone/drone:2.4.0
|
|
|
|
|
image: docker:19.03.12-dind@sha256:8dded163e463f4a59bf305b3dca98e312b2cfb89a43da3872e48f95a7554c48f
|
|
|
|
|
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 drone/drone:1.9.1@sha256:f07d1719b75a404c142b95b47598d7658805359d2416e8f36ddfc0385120e9a6 \\\\\n && docker tag drone/drone:1.9.1@sha256:f07d1719b75a404c142b95b47598d7658805359d2416e8f36ddfc0385120e9a6 $${REGISTRY_DOMAIN}:$${REGISTRY_PORT}/stack/drone/drone/drone:1.9.1 \\\\\n && docker push $${REGISTRY_DOMAIN}:$${REGISTRY_PORT}/stack/drone/drone/drone:1.9.1 && 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 drone/drone:2.4.0@sha256:8c1c83ed0f68b00e16ca50b8769e6cf7ccb3c5ff390036eaec7e5fcb79c3cb92 \\\\\n && docker tag drone/drone:2.4.0@sha256:8c1c83ed0f68b00e16ca50b8769e6cf7ccb3c5ff390036eaec7e5fcb79c3cb92 $${REGISTRY_DOMAIN}:$${REGISTRY_PORT}/stack/drone/drone/drone:2.4.0 \\\\\n && docker push $${REGISTRY_DOMAIN}:$${REGISTRY_PORT}/stack/drone/drone/drone:2.4.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"
|
|
|
|
|
environment:
|
|
|
|
|
REGISTRY_DOMAIN:
|
|
|
|
|
from_secret: registry-domain
|
|
|
|
@ -45,12 +45,12 @@ steps:
|
|
|
|
|
- name: dockersock
|
|
|
|
|
path: /var/run
|
|
|
|
|
|
|
|
|
|
- name: drone/drone-runner-docker:1.5.3
|
|
|
|
|
- name: drone/drone-runner-docker:1.6.3
|
|
|
|
|
image: docker:19.03.12-dind@sha256:8dded163e463f4a59bf305b3dca98e312b2cfb89a43da3872e48f95a7554c48f
|
|
|
|
|
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 drone/drone-runner-docker:1.5.3@sha256:8554bbb53c482324f544091ec9b6e855e8581cb27cb9fbfb2c38fd4574dfcd8e \\\\\n && docker tag drone/drone-runner-docker:1.5.3@sha256:8554bbb53c482324f544091ec9b6e855e8581cb27cb9fbfb2c38fd4574dfcd8e $${REGISTRY_DOMAIN}:$${REGISTRY_PORT}/stack/drone/drone/drone-runner-docker:1.5.3 \\\\\n && docker push $${REGISTRY_DOMAIN}:$${REGISTRY_PORT}/stack/drone/drone/drone-runner-docker:1.5.3 && 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 drone/drone-runner-docker:1.6.3@sha256:0d6069fcb7a437d4526cca760e15d57e00ba3e7954a3fffd72b04e716a23312c \\\\\n && docker tag drone/drone-runner-docker:1.6.3@sha256:0d6069fcb7a437d4526cca760e15d57e00ba3e7954a3fffd72b04e716a23312c $${REGISTRY_DOMAIN}:$${REGISTRY_PORT}/stack/drone/drone/drone-runner-docker:1.6.3 \\\\\n && docker push $${REGISTRY_DOMAIN}:$${REGISTRY_PORT}/stack/drone/drone/drone-runner-docker:1.6.3 && 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"
|
|
|
|
|
environment:
|
|
|
|
|
REGISTRY_DOMAIN:
|
|
|
|
|
from_secret: registry-domain
|
|
|
|
@ -120,7 +120,7 @@ steps:
|
|
|
|
|
- rm -f /stack/.images/drone/*.*
|
|
|
|
|
- rm -f /stack/.images/drone/built/*.*
|
|
|
|
|
|
|
|
|
|
- name: drone/drone:1.9.1
|
|
|
|
|
- name: drone/drone:2.4.0
|
|
|
|
|
image: appleboy/drone-ssh:1.6.2@sha256:b801dc2cd238c192b6e99acfa7bc3f5b9a03f312bd2feb1e10b3a7a28a1b80ea
|
|
|
|
|
settings:
|
|
|
|
|
envs:
|
|
|
|
@ -132,14 +132,15 @@ steps:
|
|
|
|
|
- registry_domain
|
|
|
|
|
- registry_port
|
|
|
|
|
- registry_password
|
|
|
|
|
- destination_registry
|
|
|
|
|
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}/stack/drone/drone/drone:1.9.1
|
|
|
|
|
- docker save $${REGISTRY_DOMAIN}:$${REGISTRY_PORT}/stack/drone/drone/drone:1.9.1 -o /stack/.images/drone/drone_drone:1.9.1.tar
|
|
|
|
|
- echo "docker load drone_drone:1.9.1.tar" >> /stack/.images/drone/load.sh
|
|
|
|
|
- echo "docker tag $${REGISTRY_DOMAIN}:$${REGISTRY_PORT}/stack/drone/drone/drone:1.9.1 /stack/DOLLAR1/drone/drone:1.9.1" >> /stack/.images/drone/load.sh
|
|
|
|
|
- docker pull $${REGISTRY_DOMAIN}:$${REGISTRY_PORT}/stack/drone/drone/drone:2.4.0
|
|
|
|
|
- docker save $${REGISTRY_DOMAIN}:$${REGISTRY_PORT}/stack/drone/drone/drone:2.4.0 -o /stack/.images/drone/drone_drone:2.4.0.tar
|
|
|
|
|
- echo "docker load < drone_drone:2.4.0.tar" >> /stack/.images/drone/load.sh
|
|
|
|
|
- echo "docker tag $${REGISTRY_DOMAIN}:$${REGISTRY_PORT}/stack/drone/drone/drone:2.4.0 $${DESTINATION_REGISTRY}/stack/drone/drone/drone:2.4.0" >> /stack/.images/drone/load.sh
|
|
|
|
|
|
|
|
|
|
- name: drone/drone-runner-docker:1.5.3
|
|
|
|
|
- name: drone/drone-runner-docker:1.6.3
|
|
|
|
|
image: appleboy/drone-ssh:1.6.2@sha256:b801dc2cd238c192b6e99acfa7bc3f5b9a03f312bd2feb1e10b3a7a28a1b80ea
|
|
|
|
|
settings:
|
|
|
|
|
envs:
|
|
|
|
@ -151,12 +152,13 @@ steps:
|
|
|
|
|
- registry_domain
|
|
|
|
|
- registry_port
|
|
|
|
|
- registry_password
|
|
|
|
|
- destination_registry
|
|
|
|
|
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}/stack/drone/drone/drone-runner-docker:1.5.3
|
|
|
|
|
- docker save $${REGISTRY_DOMAIN}:$${REGISTRY_PORT}/stack/drone/drone/drone-runner-docker:1.5.3 -o /stack/.images/drone/drone_drone-runner-docker:1.5.3.tar
|
|
|
|
|
- echo "docker load drone_drone-runner-docker:1.5.3.tar" >> /stack/.images/drone/load.sh
|
|
|
|
|
- echo "docker tag $${REGISTRY_DOMAIN}:$${REGISTRY_PORT}/stack/drone/drone/drone-runner-docker:1.5.3 /stack/DOLLAR1/drone/drone-runner-docker:1.5.3" >> /stack/.images/drone/load.sh
|
|
|
|
|
- docker pull $${REGISTRY_DOMAIN}:$${REGISTRY_PORT}/stack/drone/drone/drone-runner-docker:1.6.3
|
|
|
|
|
- docker save $${REGISTRY_DOMAIN}:$${REGISTRY_PORT}/stack/drone/drone/drone-runner-docker:1.6.3 -o /stack/.images/drone/drone_drone-runner-docker:1.6.3.tar
|
|
|
|
|
- echo "docker load < drone_drone-runner-docker:1.6.3.tar" >> /stack/.images/drone/load.sh
|
|
|
|
|
- echo "docker tag $${REGISTRY_DOMAIN}:$${REGISTRY_PORT}/stack/drone/drone/drone-runner-docker:1.6.3 $${DESTINATION_REGISTRY}/stack/drone/drone/drone-runner-docker:1.6.3" >> /stack/.images/drone/load.sh
|
|
|
|
|
|
|
|
|
|
trigger:
|
|
|
|
|
event:
|
|
|
|
|