20 Commits

Author SHA1 Message Date
Clark Boylan
dd0a3374d2 Update Gitea to 1.16.4
Gitea 1.16.4 is now available. Note that this update includes the
changes from 1.16.0-1.16.3 as well since we are upgrading from
1.15.x. The changelog can be found at:

  https://github.com/go-gitea/gitea/blob/v1.16.4/CHANGELOG.md

In particular this calls out:

  https://github.com/go-gitea/gitea/pull/17846

as a potentially breaking change that may impact our use of ssh. We
attempt to update our Dockerfile to use the correct gitea command script
to address this but we should likely test replication before landing
this update.

The changelog is quite large and I haven't been able to fully examine it
for impacts. Reviewers are encouraged to look it over and find items we
should address. Additionally once this is reliably building we should
hold a node and inspect it directly.

Change-Id: I0bf7400d43583a8e8b54581225c70cba53007876
2022-03-14 14:57:00 -07:00
Clark Boylan
048a918a61 Upgrade gitea to 1.15.3
We move robots.txt to custom/ instead of custom/public/ as
custom/public/ is now served at /assets/ via the gitea webserver and we
need robots.txt at the root. Related to this we update image urls to be
prefixed with AssetUrlPrefix in their paths so that if this path changes
against in the future we should automatically accomodate that.

Change-Id: I8ce5fe8ff342617ff156a401be8418d593fd35c4
2021-09-27 12:54:52 -07:00
Clark Boylan
bcc6e77440 Update gitea to 1.14.4
This makes a number of changes and in depth testing is probably
warranted.

  * Bump the golang version to 1.16 to match upstream's dockerfile
    golang version.
  * Bump the nodejs version to latest stable which is v16.x and
    consume it from the buster repo since our image is based on buster.
  * Bump the gitea version to 1.14.4.
  * Rename all of the opendev-.*.png logo files to logo-.*.png as the
    names of these files are no longer customizable. The reason for this
    is the user settable json manifest has been removed.
    * We keep opendev-sm.png because Gerrit apparently loads this?
  * Update html templates to be in line with 1.14.4's templates.
  * Use the gitea `admin user create` command instead of `admin
    create-user`. While I can't find removal or deprecation notices for
    the previous command the current docs note you should use the new
    version and the old one is failing in CI.

Change-Id: I0a05ebb963cca5be88aeb2f859bfbeefa0f9c8e0
2021-07-12 11:04:36 -07:00
Clark Boylan
0d95d6114a Update gitea to 1.13.1
This bumps our golang image up to buster-1.15 from buster-1.14 as gitea
bumps their minimum to 1.13 and I figure we should keep up to date.

The templates are updated to accomodate the new gitea templates. Primary
changes here are removal of icon sizes when specified and using imported
templates to simplify bits of code we weren't changing anyway.

We install openssh-server from buster-backports on our gitea-ssh image.
The reason for this is we pull in gitea's sshd_config from gitea itself
and the updated gitea wants to set options that older openssh in buster
proper doesn't support. Accomodate this with the newer openssh found in
backports.

We add a new favicon.svg to override the new default gitea svg favicon
which is served otherwise.

One other thing to call out is that gitea 1.13.0 added support for
kanban and similar project management tooling. We have explicitly
disabled this along with the wiki, issues and pull requests via
app.ini's repository.DISABLE_REPO_UNITS setting. You can find out more
about this setting here:

  https://docs.gitea.io/en-us/config-cheat-sheet/#repository-repository

Change-Id: I4c483f90c7495ee1f80eacd2c79c38836aa6f483
2021-01-07 10:40:00 -08:00
Clark Boylan
1770a25c8a Small repo template cleanups in Gitea
This improves the comments around why we've cleaned up some repo
functionality and also removes the activity button. The activity data
gitea is aware of is not a complete picture and is likely to be
misleading. Avoid misleading people by removing that button.

Change-Id: If7546f95421efdd897f2949e4f89a08d53289ce8
2020-06-19 15:26:06 -07:00
Clark Boylan
4f405f13f5 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
2020-06-19 09:09:16 -07:00
Monty Taylor
385e89d21e Upgrade gitea to 1.11.1
Gitea build needs npm now, so add the installation.

Change-Id: I250dbedf5fb0b30f5f80d23ff67f0b445ce3eb9d
2020-02-25 15:10:51 -06:00
Monty Taylor
b3e5f0cab0 Update gitea to v1.10.0
1.10 introduces a PASSWORD_COMPLEXITY setting with a default value
of lower,upper,digit,spec - which requires passwords to have an
upper, lower, digit and special character. Our example password does
not have this, so set the PASSWORD_COMPLEXITY setting. We could
alternately leave it at the default and ensure that our passwords
meet the spec.

The sshd_config file is templated now, so we can set the listen port
via env var.

Change-Id: I6e4b595eabb9c6885d78fff1109ea9f602e89ef7
2019-12-04 07:54:49 -06:00
Thierry Carrez
16c06894ef Fix recently-introduced "Proposed changes" link
I'm bad at Gitea templates, so the recently-introduced "proposed
changes" tab is active-selected (while it should never be) and the link
is missing the repository name.

This should fix it...

Change-Id: I02adc8ebd012adc233a37223480d14517c7f3c98
2019-11-08 04:18:02 +01:00
Thierry Carrez
67408f6ead [opendev][gitea] Add a link to open changes
Gitea is quickly becoming the public face of Opendev, however it can
be difficult for visitors to understand how to propose changes (or
access already-proposed changes), and then assume everything on opendev
is read-only (which is the exact opposite of what we want to convey).

In the spirit of further integrating Opendev tooling, add a link to
on every repository to open proposed changes on Gerrit.

NB: the link is not I18n-ilized since there is no simple way to add a
new string there, and I did not want to use teh "Pull requests"
terminology.

Change-Id: I851a1e7d25556194947198a8f5534542d167c7f8
2019-11-07 01:51:15 +00:00
Monty Taylor
a4643fdef6 Update gitea to 1.9.5
This reverts commit c53c87621fc553ba96174f97dcdaf540a516d94c.

Change-Id: I616ad7c631b72ebd704cce1ab4a6d5f1ca188285
2019-11-02 09:15:05 +09:00
Monty Taylor
c53c87621f Revert "Update gitea to 1.9.4"
Also Revert "Update gitea build to golang 1.13 on buster-slim"

1.9.4 has a bug where doing a get as an unauthenticated user
results in a 500:

http://paste.openstack.org/show/785534/

A pull request has been submitted upstream:

https://github.com/go-gitea/gitea/pull/8653

This reverts commit 1993d985d037a24f31c85026d8add2a8d23b4d9a.
This reverts commit cedb272a9bcbc044180b5caef81567673b0434ff.

Change-Id: I75c117d0dc851f7b3c389a19ad0c8e233886b250
2019-10-24 09:17:32 +09:00
Monty Taylor
cedb272a9b Update gitea to 1.9.4
This is the latest release from upstream. We're not
currently running with any additional patches, although
we did submit one for the atomic updating of repo counts. That
patch will be in 1.10.

There is only one change to the templates we've customized
since the ref we're running from. That is included in the
repo/header.tmpl.

Change-Id: Id426ce6072e127a08810b9fbb109445d36bef2d9
2019-10-23 17:13:20 +09:00
Joshua Hesketh
9d51994f41 Remove misplaced html tag
Change-Id: Ifcca3ec33a4486ebcecf941c9817e92af34b84a4
2019-05-30 13:33:45 -07:00
James E. Blair
70b8118ab0 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>
2019-05-21 12:16:21 -05:00
Monty Taylor
48bbcc1dd5 Remove releases link from gitea
We don't want to offer links to tarballs of git exports. For the
overwhelming majority of repos, this is a bogus tarball and people
already have the issue of mistakenly trying to use them on github.

In order to bring these back, we'd want to amend the release process
to either also upload tarballs to gitea (probably once we have gitea
back in k8s) - or maybe be able to create Release objects in gitea
that point to external release storage. We probably also want to
write an upstream patch to allow configuring a repo to never show
an autogenerated git export style release.

Change-Id: Idd02d5816b7d04c9a5dcd55fd1d527379d341b92
Story: 2004627
Task: 29848
2019-03-05 19:51:10 +00:00
Zuul
939453adac Merge "Update to gitea 1.7.1" 2019-02-14 20:54:30 +00:00
Monty Taylor
fe078ed994 Rewrite #nXXX to #LXXX in incoming gitea urls
We can't rewrite hashes with mod_rewrite, as they are client-side
and are not sent to the server. Instead, put in a javascript snippet
to rewrite them in the format that gitea is looking for.

We only need to handle single lines, as cgit doesn't handle ranges.

Change-Id: I6226e420838a88276a86e406c40f6707eb090310
2019-02-07 00:46:57 +00:00
Monty Taylor
ffa3c326c1 Update to gitea 1.7.1
1.7.1 has been released. Let's use it.

Change-Id: I421dd444a5b0adfc3a7deeeff2177b73fef039fc
2019-02-06 09:29:39 -08:00
Monty Taylor
24b0c1b9d2 Add modified repo header template
This removes the activity link, which uselessly shows PR and Issue
activity, as well as the fork, start and watch buttons.

Change-Id: Id40eae211ec9b5165cfc0e38e668ce962cf98d9a
2019-02-05 18:52:21 +00:00