From 4f405f13f5e1aa8503ac757ce19703b4b976ba80 Mon Sep 17 00:00:00 2001 From: Clark Boylan Date: Wed, 20 May 2020 09:40:25 -0700 Subject: [PATCH] Update to gitea 1.12.0 Gitea 1.12.0 brings much improved git repo performance. Specifically it caches the most recent commits helping the web views render much more quickly. This bumps our golang base image to 1.14-buster as gitea has changed their default golang verison to 1.14. We also add gnupg to the package install list as the upstream images did this. In the templates I've tried to comment out rather than remove content that we don't want exposed. The reason for this is it makes resolving future template updates simpler. For v1.12.0 release notes see: https://github.com/go-gitea/gitea/blob/v1.12.0/CHANGELOG.md Change-Id: I8fd6587c8962554023d878266055a2bd9d2499f9 --- docker/gitea/Dockerfile | 5 +- .../custom/templates/base/head_navbar.tmpl | 88 ++++++--- .../gitea/custom/templates/repo/header.tmpl | 177 +++++++++++++----- 3 files changed, 196 insertions(+), 74 deletions(-) diff --git a/docker/gitea/Dockerfile b/docker/gitea/Dockerfile index 6b0213b85d..1ef7003c8a 100644 --- a/docker/gitea/Dockerfile +++ b/docker/gitea/Dockerfile @@ -22,11 +22,11 @@ ################################### #Build stage -FROM docker.io/library/golang:1.13-buster AS build-env +FROM docker.io/library/golang:1.14-buster AS build-env LABEL maintainer="infra-root@openstack.org" -ARG GITEA_VERSION="v1.11.4" +ARG GITEA_VERSION="v1.12.0" ENV TAGS "bindata $TAGS" #Build deps @@ -58,6 +58,7 @@ RUN apt-get update && apt-get -y install \ git \ openssh-client \ tzdata \ + gnupg \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* diff --git a/docker/gitea/custom/templates/base/head_navbar.tmpl b/docker/gitea/custom/templates/base/head_navbar.tmpl index 0503ae8cd5..c518df60ae 100644 --- a/docker/gitea/custom/templates/base/head_navbar.tmpl +++ b/docker/gitea/custom/templates/base/head_navbar.tmpl @@ -8,11 +8,19 @@ - {{if .IsSigned}} + {{if and .IsSigned .MustChangePassword}} + {{/* No links */}} + {{else if .IsSigned}} {{.i18n.Tr "dashboard"}} + {{if not .UnitIssuesGlobalDisabled}} {{.i18n.Tr "issues"}} + {{end}} + {{if not .UnitPullsGlobalDisabled}} {{.i18n.Tr "pull_requests"}} + {{end}} + {{if not (and .UnitIssuesGlobalDisabled .UnitPullsGlobalDisabled)}} {{if .ShowMilestonesDashboardPage}}{{.i18n.Tr "milestones"}}{{end}} + {{end}} {{.i18n.Tr "explore"}} {{else if .IsLandingPageHome}} {{.i18n.Tr "home"}} @@ -34,37 +42,59 @@ */}} - {{if .IsSigned}} + + {{if and .IsSigned .MustChangePassword}} + + {{else if .IsSigned}} {{end}} -
- {{if not .Repository.IsBeingCreated}} - + {{end}} +
+