From 70b8118ab0bf864e1993104078e7911814873bdf Mon Sep 17 00:00:00 2001 From: "James E. Blair" Date: Sat, 20 Apr 2019 08:33:55 -0700 Subject: [PATCH] Use local fork of gitea and upgrade to 1.8.0 This has a few emergency local patches while we wait for them to appear in an upstream release. This updates the modified templates to match the changes in 1.8.0 upstream. This also disables the oauth2 service, which is new in 1.8.0. Without disabling this, gitea tries to generate a JWT secret and write it to the file, which in our case is read only. If we want to enable it, we need to add a new JWT_SECRET setting. Change-Id: I969682bce6ff25b7614ce9265097307ee9cbc6cb Co-Authored-By: Monty Taylor --- docker/gitea/Dockerfile | 4 +-- .../custom/templates/base/head_navbar.tmpl | 6 ++--- .../gitea/custom/templates/repo/header.tmpl | 26 ++++++++----------- playbooks/roles/gitea/templates/app.ini.j2 | 3 +++ 4 files changed, 19 insertions(+), 20 deletions(-) diff --git a/docker/gitea/Dockerfile b/docker/gitea/Dockerfile index 40701ea1af..1df4e5720a 100644 --- a/docker/gitea/Dockerfile +++ b/docker/gitea/Dockerfile @@ -26,7 +26,7 @@ FROM golang:1.11-stretch AS build-env LABEL maintainer="infra-root@openstack.org" -ARG GITEA_VERSION=v1.7.4 +ARG GITEA_VERSION=opendev-1.8.0 ENV TAGS "bindata $TAGS" #Build deps @@ -34,7 +34,7 @@ RUN apt-get update && apt-get -y install build-essential git \ && mkdir -p ${GOPATH}/src/code.gitea.io/gitea #Setup repo -RUN git clone https://github.com/go-gitea/gitea ${GOPATH}/src/code.gitea.io/gitea +RUN git clone https://github.com/jeblair/gitea ${GOPATH}/src/code.gitea.io/gitea WORKDIR ${GOPATH}/src/code.gitea.io/gitea #Checkout version if set diff --git a/docker/gitea/custom/templates/base/head_navbar.tmpl b/docker/gitea/custom/templates/base/head_navbar.tmpl index 892c14d312..9ed761823b 100644 --- a/docker/gitea/custom/templates/base/head_navbar.tmpl +++ b/docker/gitea/custom/templates/base/head_navbar.tmpl @@ -56,14 +56,14 @@ diff --git a/docker/gitea/custom/templates/repo/header.tmpl b/docker/gitea/custom/templates/repo/header.tmpl index 97ccca27ec..1842fde907 100644 --- a/docker/gitea/custom/templates/repo/header.tmpl +++ b/docker/gitea/custom/templates/repo/header.tmpl @@ -1,19 +1,15 @@
- {{with .Repository}}
-
-
- +
+
@@ -34,8 +30,8 @@ {{end}} {{if .Permission.CanRead $.UnitTypeExternalTracker}} - - {{.i18n.Tr "repo.issues"}} + + {{.i18n.Tr "repo.issues"}} {{end}} diff --git a/playbooks/roles/gitea/templates/app.ini.j2 b/playbooks/roles/gitea/templates/app.ini.j2 index 76a61fb20e..c4c10a8f5c 100644 --- a/playbooks/roles/gitea/templates/app.ini.j2 +++ b/playbooks/roles/gitea/templates/app.ini.j2 @@ -72,6 +72,9 @@ NO_REPLY_ADDRESS = noreply.example.org [mailer] ENABLED = false +[oauth2] +ENABLE = false + [openid] ENABLE_OPENID_SIGNIN = true ENABLE_OPENID_SIGNUP = true