This commit is contained in:
giles 2023-10-18 14:27:48 +01:00
parent 1489d72410
commit a41b0a8c35
1 changed files with 5 additions and 33 deletions

View File

@ -18,42 +18,18 @@ trigger:
--- ---
kind: pipeline kind: pipeline
type: docker type: docker
name: registry name: yml
platform: platform:
os: linux os: linux
arch: amd64 arch: amd64
clone: clone:
disable: true disable: false
steps: steps:
- name: alpine/git:v2.26.2 - name: "build - install"
image: docker:19.03.12-dind@sha256:8dded163e463f4a59bf305b3dca98e312b2cfb89a43da3872e48f95a7554c48f image: sigyl/zone-10-batch2yml:latest
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 alpine/git:v2.26.2@sha256:8715680f27333935bb384a678256faf8e8832a5f2a0d4a00c9d481111c5a29c0 \\\\\n && docker tag alpine/git:v2.26.2@sha256:8715680f27333935bb384a678256faf8e8832a5f2a0d4a00c9d481111c5a29c0 $${REGISTRY_DOMAIN}:$${REGISTRY_PORT}/stack/ghost/alpine/git:v2.26.2 \\\\\n && docker push $${REGISTRY_DOMAIN}:$${REGISTRY_PORT}/stack/ghost/alpine/git:v2.26.2 && 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
- name: ghost:3.14.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 ghost:3.14.0@sha256:38fb60af996dca89632e848c32e8c155d6dd20578c129752bd5449f99028fa92 \\\\\n && docker tag ghost:3.14.0@sha256:38fb60af996dca89632e848c32e8c155d6dd20578c129752bd5449f99028fa92 $${REGISTRY_DOMAIN}:$${REGISTRY_PORT}/stack/ghost/ghost:3.14.0 \\\\\n && docker push $${REGISTRY_DOMAIN}:$${REGISTRY_PORT}/stack/ghost/ghost:3.14.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
- name: mysql:5.7
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 mysql:5.7@sha256:ce6815027949d0b48e3097a94fa3ec062866a78868d50c7900c697c13574599f \\\\\n && docker tag mysql:5.7@sha256:ce6815027949d0b48e3097a94fa3ec062866a78868d50c7900c697c13574599f $${REGISTRY_DOMAIN}:$${REGISTRY_PORT}/stack/ghost/mysql:5.7 \\\\\n && docker push $${REGISTRY_DOMAIN}:$${REGISTRY_PORT}/stack/ghost/mysql:5.7 && 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
@ -69,7 +45,6 @@ services:
path: /etc/docker/certs.d path: /etc/docker/certs.d
- name: daemonjson - name: daemonjson
path: /etc/docker/daemon.json path: /etc/docker/daemon.json
volumes: volumes:
- name: dockersock - name: dockersock
temp: {} temp: {}
@ -80,14 +55,11 @@ volumes:
host: host:
path: /etc/docker/daemon.json path: /etc/docker/daemon.json
image_pull_secrets:
- dockerconfigjson
trigger: trigger:
event: event:
- promote - promote
target: target:
- registry - yml
--- ---
kind: pipeline kind: pipeline