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 <mordred@inaugust.com>
This commit is contained in:
James E. Blair 2019-04-20 08:33:55 -07:00 committed by Monty Taylor
parent 6d48f0561e
commit 70b8118ab0
4 changed files with 19 additions and 20 deletions

View File

@ -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

View File

@ -56,14 +56,14 @@
</span>
<div class="menu">
<a class="item" href="{{AppSubUrl}}/repo/create">
<i class="fitted octicon octicon-plus"></i> {{.i18n.Tr "new_repo"}}
<i class="octicon octicon-plus"></i> {{.i18n.Tr "new_repo"}}
</a>
<a class="item" href="{{AppSubUrl}}/repo/migrate">
<i class="fitted octicon octicon-repo-clone"></i> {{.i18n.Tr "new_migrate"}}
<i class="octicon octicon-repo-clone"></i> {{.i18n.Tr "new_migrate"}}
</a>
{{if .SignedUser.CanCreateOrganization}}
<a class="item" href="{{AppSubUrl}}/org/create">
<i class="fitted octicon octicon-organization"></i> {{.i18n.Tr "new_org"}}
<i class="octicon octicon-organization"></i> {{.i18n.Tr "new_org"}}
</a>
{{end}}
</div><!-- end content create new menu -->

View File

@ -1,19 +1,15 @@
<div class="header-wrapper">
<script>
window.location.hash.replace(/#n(\d*)/, '#L$1');
</script>
{{with .Repository}}
<div class="ui container">
<div class="ui stackable grid header-grid">
<div class="seven wide column">
<div class="ui huge breadcrumb">
<i class="mega-octicon octicon-{{if .IsPrivate}}lock{{else if .IsMirror}}repo-clone{{else if .IsFork}}repo-forked{{else}}repo{{end}}"></i>
<a href="{{AppSubUrl}}/{{.Owner.Name}}">{{.Owner.Name}}</a>
<div class="divider"> / </div>
<a href="{{$.RepoLink}}">{{.Name}}</a>
{{if .IsMirror}}<div class="fork-flag">{{$.i18n.Tr "repo.mirror_from"}} <a target="_blank" rel="noopener noreferrer" href="{{$.Mirror.Address}}">{{$.Mirror.Address}}</a></div>{{end}}
{{if .IsFork}}<div class="fork-flag">{{$.i18n.Tr "repo.forked_from"}} <a href="{{.BaseRepo.Link}}">{{SubStr .BaseRepo.RelLink 1 -1}}</a></div>{{end}}
</div>
<div class="repo-header">
<div class="ui huge breadcrumb repo-title">
<i class="mega-octicon octicon-{{if .IsPrivate}}lock{{else if .IsMirror}}repo-clone{{else if .IsFork}}repo-forked{{else}}repo{{end}}"></i>
<a href="{{AppSubUrl}}/{{.Owner.Name}}">{{.Owner.Name}}</a>
<div class="divider"> / </div>
<a href="{{$.RepoLink}}">{{.Name}}</a>
{{if .IsArchived}}<i class="archive icon archived-icon"></i>{{end}}
{{if .IsMirror}}<div class="fork-flag">{{$.i18n.Tr "repo.mirror_from"}} <a target="_blank" rel="noopener noreferrer" href="{{$.Mirror.Address}}">{{$.Mirror.Address}}</a></div>{{end}}
{{if .IsFork}}<div class="fork-flag">{{$.i18n.Tr "repo.forked_from"}} <a href="{{.BaseRepo.Link}}">{{SubStr .BaseRepo.RelLink 1 -1}}</a></div>{{end}}
</div>
</div><!-- end grid -->
</div><!-- end container -->
@ -34,8 +30,8 @@
{{end}}
{{if .Permission.CanRead $.UnitTypeExternalTracker}}
<a class="{{if .PageIsIssueList}}active{{end}} item" href="{{.RepoLink}}/issues" target="_blank" rel="noopener noreferrer">
<i class="octicon octicon-issue-opened"></i> {{.i18n.Tr "repo.issues"}} </span>
<a class="{{if .PageIsIssueList}}active{{end}} item" href="{{.RepoExternalIssuesLink}}" target="_blank" rel="noopener noreferrer">
<i class="octicon octicon-link-external"></i> {{.i18n.Tr "repo.issues"}} </span>
</a>
{{end}}

View File

@ -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