From efbed6064b4ee8b41eadc199a234f7ecd8f880a9 Mon Sep 17 00:00:00 2001 From: giles Date: Thu, 19 Oct 2023 19:16:57 +0100 Subject: [PATCH 01/16] update to v1.13.0 --- gitea/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gitea/Dockerfile b/gitea/Dockerfile index 911aca3..4d17da6 100644 --- a/gitea/Dockerfile +++ b/gitea/Dockerfile @@ -1,5 +1,5 @@ ARG REGISTRY -FROM ${REGISTRY}gitea/gitea:1.12.3-linux-amd64 +FROM ${REGISTRY}gitea/gitea:1.13.0-linux-amd64 COPY app.ini /init/ COPY ./templates /init/templates/ COPY run.sh / From ef48885fd79437d2cdb9a1fac69049423248a64b Mon Sep 17 00:00:00 2001 From: giles Date: Thu, 19 Oct 2023 19:19:47 +0100 Subject: [PATCH 02/16] update to v1.13.0 --- gitea/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gitea/Dockerfile b/gitea/Dockerfile index 4d17da6..017f4a9 100644 --- a/gitea/Dockerfile +++ b/gitea/Dockerfile @@ -1,5 +1,5 @@ ARG REGISTRY -FROM ${REGISTRY}gitea/gitea:1.13.0-linux-amd64 +FROM gitea/gitea:1.13.0-linux-amd64 COPY app.ini /init/ COPY ./templates /init/templates/ COPY run.sh / From 2a56e560c925358779e7ab62211e35dacd38d4b9 Mon Sep 17 00:00:00 2001 From: giles Date: Thu, 19 Oct 2023 19:23:37 +0100 Subject: [PATCH 03/16] 14 --- gitea/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gitea/Dockerfile b/gitea/Dockerfile index 017f4a9..ffd87f0 100644 --- a/gitea/Dockerfile +++ b/gitea/Dockerfile @@ -1,5 +1,5 @@ ARG REGISTRY -FROM gitea/gitea:1.13.0-linux-amd64 +FROM gitea/gitea:1.14.0-linux-amd64 COPY app.ini /init/ COPY ./templates /init/templates/ COPY run.sh / From fa2a2b8733fc0831dbd47c942613dcbc29441413 Mon Sep 17 00:00:00 2001 From: giles Date: Thu, 19 Oct 2023 19:28:44 +0100 Subject: [PATCH 04/16] 15 --- gitea/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gitea/Dockerfile b/gitea/Dockerfile index ffd87f0..51f89af 100644 --- a/gitea/Dockerfile +++ b/gitea/Dockerfile @@ -1,5 +1,5 @@ ARG REGISTRY -FROM gitea/gitea:1.14.0-linux-amd64 +FROM gitea/gitea:1.15.0-linux-amd64 COPY app.ini /init/ COPY ./templates /init/templates/ COPY run.sh / From a0cb0afea7e5f8f59fab0706def3532296a48bea Mon Sep 17 00:00:00 2001 From: giles Date: Thu, 19 Oct 2023 19:32:20 +0100 Subject: [PATCH 05/16] 15 --- .drone/drone-home.yml | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/.drone/drone-home.yml b/.drone/drone-home.yml index fd4beb4..d92c796 100644 --- a/.drone/drone-home.yml +++ b/.drone/drone-home.yml @@ -257,16 +257,21 @@ volumes: path: /etc/docker/daemon.json trigger: - event: - - promote - target: - - build + branch: + - separate-database + #event: + #- promote + #target: + #- build --- kind: pipeline type: docker name: deploy +depends_on: +- build + platform: os: linux arch: amd64 @@ -350,9 +355,11 @@ steps: from_secret: gitea-server-lfs-jwt-secret trigger: - event: - - promote - target: - - deploy + branch: + - separate-database + #event: + #- promote + #target: + #- deploy ... From 3550cefc3e8591d48afa43a4b0ccb2cde11c4bf3 Mon Sep 17 00:00:00 2001 From: giles Date: Thu, 19 Oct 2023 19:34:20 +0100 Subject: [PATCH 06/16] 16 --- gitea/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gitea/Dockerfile b/gitea/Dockerfile index 51f89af..91f8913 100644 --- a/gitea/Dockerfile +++ b/gitea/Dockerfile @@ -1,5 +1,5 @@ ARG REGISTRY -FROM gitea/gitea:1.15.0-linux-amd64 +FROM gitea/gitea:1.16.0-linux-amd64 COPY app.ini /init/ COPY ./templates /init/templates/ COPY run.sh / From 87ed972d984bcd5345676f729e3f5509ab8932e1 Mon Sep 17 00:00:00 2001 From: giles Date: Thu, 19 Oct 2023 19:49:40 +0100 Subject: [PATCH 07/16] 15 --- gitea/templates/home.tmpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gitea/templates/home.tmpl b/gitea/templates/home.tmpl index 8339d0c..578c67b 100644 --- a/gitea/templates/home.tmpl +++ b/gitea/templates/home.tmpl @@ -3,7 +3,7 @@
- +

From cd12ee1acefb03c24d60fceac47b3e3fb6cb339d Mon Sep 17 00:00:00 2001 From: giles Date: Thu, 19 Oct 2023 20:20:11 +0100 Subject: [PATCH 08/16] versioned build --- .drone/build.sh | 2 +- .drone/deploy.sh | 1 + .drone/drone-home.yml | 8 ++++---- .drone/pull.sh | 2 +- .drone/push.sh | 2 +- docker-compose.yml | 2 +- 6 files changed, 9 insertions(+), 8 deletions(-) diff --git a/.drone/build.sh b/.drone/build.sh index 83f8194..4b16d55 100644 --- a/.drone/build.sh +++ b/.drone/build.sh @@ -2,4 +2,4 @@ sleep 10 docker build gitea \ --build-arg REGISTRY=${REGISTRY_DOMAIN}:${REGISTRY_PORT}/${ROOT}/${NAME}/ \ - -t ${REGISTRY_DOMAIN}:${REGISTRY_PORT}/${ROOT}/${NAME}/gitea + -t ${REGISTRY_DOMAIN}:${REGISTRY_PORT}/${ROOT}/${NAME}/gitea:$1 diff --git a/.drone/deploy.sh b/.drone/deploy.sh index 11bdc15..312db68 100644 --- a/.drone/deploy.sh +++ b/.drone/deploy.sh @@ -1,4 +1,5 @@ export LOCAL_DOCKER_REGISTRY=${REGISTRY_DOMAIN}:${REGISTRY_PORT}/${ROOT}/${NAME}/ \ +&& export TAG=$1 \ && docker stack rm gitea \ && echo 'sleeping...zzz' \ && sleep 60 \ diff --git a/.drone/drone-home.yml b/.drone/drone-home.yml index d92c796..11835b2 100644 --- a/.drone/drone-home.yml +++ b/.drone/drone-home.yml @@ -228,8 +228,8 @@ steps: - export NAME=gitea - export ROOT=stack - "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/build.sh - - sh .drone/push.sh + - sh .drone/build.sh $${DRONE_COMMIT_SHA} + - sh .drone/push.sh $${DRONE_COMMIT_SHA} volumes: - name: dockersock path: /var/run @@ -330,8 +330,8 @@ steps: - export ROOT=stack - cd /stack/gitea - "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 - - sh .drone/deploy.sh + - sh .drone/pull.sh $${DRONE_COMMIT_SHA} + - sh .drone/deploy.sh $${DRONE_COMMIT_SHA} environment: GITEA_APP_NAME: from_secret: gitea-app-name diff --git a/.drone/pull.sh b/.drone/pull.sh index e52add2..f296aaf 100644 --- a/.drone/pull.sh +++ b/.drone/pull.sh @@ -1 +1 @@ -docker pull ${REGISTRY_DOMAIN}:${REGISTRY_PORT}/${ROOT}/${NAME}/gitea +docker pull ${REGISTRY_DOMAIN}:${REGISTRY_PORT}/${ROOT}/${NAME}/gitea:$1 diff --git a/.drone/push.sh b/.drone/push.sh index 7922e60..d569c2a 100644 --- a/.drone/push.sh +++ b/.drone/push.sh @@ -1 +1 @@ -docker push ${REGISTRY_DOMAIN}:${REGISTRY_PORT}/${ROOT}/${NAME}/gitea +docker push ${REGISTRY_DOMAIN}:${REGISTRY_PORT}/${ROOT}/${NAME}/gitea:$1 diff --git a/docker-compose.yml b/docker-compose.yml index b87a3ca..4a273e4 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -7,7 +7,7 @@ services: replicas: 1 restart_policy: condition: any - image: ${LOCAL_DOCKER_REGISTRY}gitea + image: ${LOCAL_DOCKER_REGISTRY}gitea:${TAG} environment: - USER_UID=1000 - USER_GID=1000 From 37dd57e75afafdf8b8e520c3ccb333c7b054e293 Mon Sep 17 00:00:00 2001 From: giles Date: Thu, 19 Oct 2023 20:28:09 +0100 Subject: [PATCH 10/16] retry --- .drone/deploy.sh | 1 + .drone/drone-home.yml | 1 + 2 files changed, 2 insertions(+) diff --git a/.drone/deploy.sh b/.drone/deploy.sh index 312db68..489700f 100644 --- a/.drone/deploy.sh +++ b/.drone/deploy.sh @@ -1,4 +1,5 @@ export LOCAL_DOCKER_REGISTRY=${REGISTRY_DOMAIN}:${REGISTRY_PORT}/${ROOT}/${NAME}/ \ +&& echo $1 \ && export TAG=$1 \ && docker stack rm gitea \ && echo 'sleeping...zzz' \ diff --git a/.drone/drone-home.yml b/.drone/drone-home.yml index 11835b2..082145b 100644 --- a/.drone/drone-home.yml +++ b/.drone/drone-home.yml @@ -330,6 +330,7 @@ steps: - export ROOT=stack - cd /stack/gitea - "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" + - echo $${DRONE_COMMIT_SHA} - sh .drone/pull.sh $${DRONE_COMMIT_SHA} - sh .drone/deploy.sh $${DRONE_COMMIT_SHA} environment: From 19f51b34fa15ae8564d745c18d31edcaa5cd2e87 Mon Sep 17 00:00:00 2001 From: giles Date: Thu, 19 Oct 2023 20:29:41 +0100 Subject: [PATCH 11/16] retry --- .drone/drone-home.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.drone/drone-home.yml b/.drone/drone-home.yml index 082145b..0e58a3d 100644 --- a/.drone/drone-home.yml +++ b/.drone/drone-home.yml @@ -330,7 +330,8 @@ steps: - export ROOT=stack - cd /stack/gitea - "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" - - echo $${DRONE_COMMIT_SHA} + - echo hello + - echo itis $${DRONE_COMMIT_SHA} - sh .drone/pull.sh $${DRONE_COMMIT_SHA} - sh .drone/deploy.sh $${DRONE_COMMIT_SHA} environment: From 48114020c30c675bdd2407e45f471733f539dcff Mon Sep 17 00:00:00 2001 From: giles Date: Thu, 19 Oct 2023 20:31:40 +0100 Subject: [PATCH 12/16] retry --- .drone/drone-home.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.drone/drone-home.yml b/.drone/drone-home.yml index 0e58a3d..798c489 100644 --- a/.drone/drone-home.yml +++ b/.drone/drone-home.yml @@ -330,8 +330,7 @@ steps: - export ROOT=stack - cd /stack/gitea - "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" - - echo hello - - echo itis $${DRONE_COMMIT_SHA} + - printenv - sh .drone/pull.sh $${DRONE_COMMIT_SHA} - sh .drone/deploy.sh $${DRONE_COMMIT_SHA} environment: From 5bfa1f7f657300c921700822eb417a78f78d1bf3 Mon Sep 17 00:00:00 2001 From: giles Date: Thu, 19 Oct 2023 20:35:41 +0100 Subject: [PATCH 13/16] retry --- .drone/drone-home.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.drone/drone-home.yml b/.drone/drone-home.yml index 798c489..e441d8f 100644 --- a/.drone/drone-home.yml +++ b/.drone/drone-home.yml @@ -291,6 +291,7 @@ steps: envs: - drone_tag - drone_commit + - drone_commit_sha - drone_build_number - drone_repo_name - drone_repo_namespace From 90c25b5f9ddf8a1a0998dc5ae96f722dadb316a5 Mon Sep 17 00:00:00 2001 From: giles Date: Thu, 19 Oct 2023 20:38:24 +0100 Subject: [PATCH 14/16] retry --- .drone/drone-home.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.drone/drone-home.yml b/.drone/drone-home.yml index e441d8f..041cad6 100644 --- a/.drone/drone-home.yml +++ b/.drone/drone-home.yml @@ -228,8 +228,8 @@ steps: - export NAME=gitea - export ROOT=stack - "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/build.sh $${DRONE_COMMIT_SHA} - - sh .drone/push.sh $${DRONE_COMMIT_SHA} + - sh .drone/build.sh ${DRONE_COMMIT_SHA} + - sh .drone/push.sh ${DRONE_COMMIT_SHA} volumes: - name: dockersock path: /var/run @@ -332,8 +332,8 @@ steps: - cd /stack/gitea - "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" - printenv - - sh .drone/pull.sh $${DRONE_COMMIT_SHA} - - sh .drone/deploy.sh $${DRONE_COMMIT_SHA} + - sh .drone/pull.sh ${DRONE_COMMIT_SHA} + - sh .drone/deploy.sh ${DRONE_COMMIT_SHA} environment: GITEA_APP_NAME: from_secret: gitea-app-name From 624f5c9ea931fc72ac124608c2a64f54e76fca26 Mon Sep 17 00:00:00 2001 From: giles Date: Thu, 19 Oct 2023 20:42:09 +0100 Subject: [PATCH 15/16] 17 --- gitea/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gitea/Dockerfile b/gitea/Dockerfile index 91f8913..b9b455e 100644 --- a/gitea/Dockerfile +++ b/gitea/Dockerfile @@ -1,5 +1,5 @@ ARG REGISTRY -FROM gitea/gitea:1.16.0-linux-amd64 +FROM gitea/gitea:1.17.0-linux-amd64 COPY app.ini /init/ COPY ./templates /init/templates/ COPY run.sh / From 98bbf1ed70d3f325b3ce0220887b88b104ed9055 Mon Sep 17 00:00:00 2001 From: giles Date: Thu, 19 Oct 2023 20:44:11 +0100 Subject: [PATCH 16/16] 1.20.5 --- gitea/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gitea/Dockerfile b/gitea/Dockerfile index b9b455e..13192f2 100644 --- a/gitea/Dockerfile +++ b/gitea/Dockerfile @@ -1,5 +1,5 @@ ARG REGISTRY -FROM gitea/gitea:1.17.0-linux-amd64 +FROM gitea/gitea:1.20.5-linux-amd64 COPY app.ini /init/ COPY ./templates /init/templates/ COPY run.sh /