From 98273306408adb5ce38907904bd39caf7691c8c5 Mon Sep 17 00:00:00 2001 From: Clark Boylan Date: Sat, 15 Oct 2022 09:02:54 -0700 Subject: [PATCH] Update to gitea 1.17.3 This updates our gitea images from 1.17.2 to 1.17.3. Git diff of the three template files we override between 1.17.2 and 1.17.3 show no changes to the templates. Also, while the changelog indicates go 1.19 fmt is used with gitea 1.17 now the 1.17 Dockerfile continues to build gitea itself with go 1.18. We don't update our golang version for this reason. The changelog can be found here: https://github.com/go-gitea/gitea/blob/v1.17.3/CHANGELOG.md Additionally, I've modified how we do our docker image prune step to keep old images for 3 days. The reason for this is it gives us a short window of time where we can easily revert to the old image that we have stored locally on the system. Keep in mind that this will slightly increase disk consumption on the nodes by about 1GB per gitea+gitea-ssh+mariadb set. I think this is worthwhile considering these images don't update often so we should only ever have one extra old set on the node. If others don't care for this feel free to modify the change to remove this edit. Change-Id: I84e89e461ae8957c553c8f3d1b537af622a824b4 --- docker/gitea/Dockerfile | 2 +- playbooks/roles/gitea/tasks/main.yaml | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/docker/gitea/Dockerfile b/docker/gitea/Dockerfile index 40c579e380..5b06ac27d1 100644 --- a/docker/gitea/Dockerfile +++ b/docker/gitea/Dockerfile @@ -27,7 +27,7 @@ FROM docker.io/library/golang:1.18-bullseye AS build-env LABEL maintainer="infra-root@openstack.org" -ARG GITEA_VERSION="v1.17.2" +ARG GITEA_VERSION="v1.17.3" ENV TAGS "bindata $TAGS" #Build deps diff --git a/playbooks/roles/gitea/tasks/main.yaml b/playbooks/roles/gitea/tasks/main.yaml index 776ff8a367..025f077cf5 100644 --- a/playbooks/roles/gitea/tasks/main.yaml +++ b/playbooks/roles/gitea/tasks/main.yaml @@ -70,7 +70,10 @@ chdir: /etc/gitea-docker/ - name: Run docker prune to cleanup unneeded images shell: - cmd: docker image prune -f + # Keep images around for 3 days before pruning them. Allows for + # easy rollback if necessary. Note "3d" seems to be rejected by + # docker but 72 hours == 3 days. + cmd: docker image prune -f --filter "until=72h" # User management outside of service bringup to avoid confusion between # the two stages.