93 Commits

Author SHA1 Message Date
Monty Taylor
acd0307fc5 Upgrade gitea to 1.10.3
The latest from the 1.10 series is 1.10.3.

Change-Id: I294b5f31ef6fc30b36c79e521554f03af33d4be9
2020-02-04 13:13:51 -06:00
Monty Taylor
6689ee968e Bump gitea version to 1.10.2
Change-Id: If29f2a4bdb95819433cde4cf9f4b5315222de4b0
2020-01-06 09:05:13 -06:00
Zuul
5497d9365c Merge "Add some details on where to find things to homepage" 2019-12-05 09:54:53 +00: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
Ian Wienand
9f6df6deaf gitea: Use 1.9.6
We are seeing issues with hanging git connections discussed in [1].
It is suggested to upgrade to gitea 1.9.6; do that.

[1] https://github.com/go-gitea/gitea/issues/9006

Change-Id: Ibbbe73b5487d3d01a8d7ba23ecca16c2264973ca
2019-11-19 13:48:42 +11:00
Zara
1d07e57ab8 Add some details on where to find things to homepage
The homepage mentions a lot of technologies that OpenDev use, but
doesn't link to any of the running instances. This commit
adds links to review.opendev.org, etherpad.openstack.org and
the configuration for the opendev homepage itself, so that
it's easier to find things and to experience the technologies
it refers to.

Change-Id: Ia041ebbc558539955238bb4fdb4da868bf6f1dd8
2019-11-15 10:16:09 +00: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
1993d985d0 Update gitea build to golang 1.13 on buster-slim
buster is the new debian release, use it. And use the
slim image, rather than the full, because we can.

Upstream is now building with 1.13 - follow suit.

Update the FROM lines to use explicit paths to images.

Change-Id: I42f7cea1365b8bb0af56861f38107cbdffd130b0
2019-10-23 17:13:21 +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
Clark Boylan
05e0ffdebc Collect gitea sshd logs
Currently we don't have any logs from our gitea sshd processes because
sshd logs to syslog by default and /dev/log isn't in our containers. You
can ask sshd nicely to log to stderr instead with the -e flag which
docker will pick up and store for us.

Update the sshd command to include -e then use testinfra to check we
collect logs and they are accssible from docker.

Change-Id: Ib7d6d405554c3c30be410bc08c6fee7d4363b096
2019-08-06 13:42:25 -07:00
Joshua Hesketh
9d51994f41 Remove misplaced html tag
Change-Id: Ifcca3ec33a4486ebcecf941c9817e92af34b84a4
2019-05-30 13:33:45 -07:00
James E. Blair
d74c9fd62a Revert "Add tab to link from repo page to gerrit changes"
This reverts commit fe1b3cee80982fa1ec9c084196dd3b19b3f27f44.

We suspect this may be the cause of some templates going all weird:

* times are showing up as "ago%!(EXTRA string=months%!(EXTRA int64=8))"
* many strings are now showing up as lower cased (eg "explore")

Also, the link to gerrit for nova is "project:openstack/" and is
missing the "nova" portion of the name.

Change-Id: I72a06efd118ad0eae231f5ddf1a9888cb8d35aba
2019-05-29 10:10:17 -07:00
Zuul
3cbd1ac93d Merge "Update opendev website to be more present tense" 2019-05-29 16:12:07 +00:00
Joshua Hesketh
fe1b3cee80 Add tab to link from repo page to gerrit changes
This goes to the open changes for the currently viewed repo.

Change-Id: I671d81cbeeb271284e783227de2c66baedfbcb83
2019-05-24 05:22:19 +00:00
Monty Taylor
300f798c29 Update opendev website to be more present tense
Since we're doing the rollout, talking about it in the future tense
is no longer necessary.

Change-Id: Ia9ce9c11d8e38d003095047fa9dff300a147021c
2019-05-23 07:33:23 +00:00
James E. Blair
ead3f63649 Switch to upstream and upgrade gitea to current master (pre-1.9.0)
The current gitea master has our change to avoid indexing extra
refs, so we can start replicating refs/changes and refs/notes to
it.  It also fixes a bug we observed when viewing the index of
the starlingx/integ repo.

This also switches us back to the upstream repo, though since
we're using an intermediate commit, the version displayed in
the web ui will be "6eb53ac570ab9af51fc9cbd79f1db782edce57e0".

The docker entrypoint script has moved, so the Dockerfile is updated
to reflect that.

Change-Id: I47769fc1ca62a39122d96a1fc0c1bfc2caca6a4f
2019-05-22 15:14:01 -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
James E. Blair
5923d9130e Upgrade to gitea 1.7.4
Change-Id: I5a962fedd7ff8362a5117706ddefaf2eaa21e29d
2019-03-15 09:09:42 -07:00
James E. Blair
58476a051a Use OpenDev icon in gitea
This should cause the OpenDev logo to be used in the navbar and all
of the favicon/pwa locations.

Change-Id: Id1acfa8214744381fb8e4e2e9779502dde3565e0
2019-03-15 09:01:29 -07:00
James E. Blair
b228fec4c6 Use opendev logos
The stacked opendev logo is added to the home page as an svg.

A 120x120 ping is added as the gitea icon.  It appears in several
places throughout gitea source code, and therefore it's easier to
just replace it using the same filename and format rather than
updating the templates with a new filename.

Change-Id: I888b8913c7b6a1045975f10240d744d09b9355b0
2019-03-08 15:26:15 -08: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
Monty Taylor
3b39a5f216 Remove Sign In link from gitea
We don't have any auth system connected to this right now.

Change-Id: I1e4a4ac991ca93f099da5a5a7f352441440acd18
2019-03-01 20:02:26 +00:00
James E. Blair
f74ff2bdb7 Have gitea sshd listen on 222
This will allow us to use host networking since it won't conflict
with existing services.

Change-Id: Ie08d626508cd115561161ac1b60ced538a1c9c67
2019-02-19 11:46:32 -08:00
Zuul
939453adac Merge "Update to gitea 1.7.1" 2019-02-14 20:54:30 +00:00
Zuul
643865daa6 Merge "Update to gitea v1.6.3" 2019-02-13 21:39:37 +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
394e8f829f Update to gitea v1.6.3
Change-Id: Id362bc5031e42b19fc6fb4ae0b2890e2f196be66
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
James E. Blair
bfbf0e347b Add gitea image jobs
Add jobs to build, upload, and promote a gitea image to Docker Hub.
This produces two images (gitea and openssh) from a single Dockerfile
via a multi-stage build.

Change-Id: I8e6136787f75cd69b881b7ac715418c86d356872
2019-01-16 11:28:17 -08:00
James E. Blair
9e6a4d327e Remove all docker image building jobs
These will be re-added in followup changes based on the new
zuul-jobs roles.

Change-Id: I0c0691afb180903c573cc1a9eb39590fa58e7ca6
2019-01-16 11:28:07 -08:00
Monty Taylor
d1a2dfa6f5 Add support for per-image build-arg settings
Change-Id: Ia14397389be0c7178c1879844cd675a3d291a3d0
2019-01-15 09:27:16 -08:00
James E. Blair
a546e25e76 Delete change tags from docker image repos
Whenever we promote an image, delete the change tag for that image
in Docker Hub, and also delete any change tags older than 24 hours
in order to keep the Docker Hub image registry tidy.

Change-Id: Id4654c893963bdb0a364b1132793fe4fb152bf27
2019-01-14 16:51:13 -08:00
Zuul
6d0b6aa3d4 Merge "Put opendev website content onto gitea homepage" 2019-01-14 16:05:08 +00:00
James E. Blair
2059b73584 Fix image promote playbook
This job has no nodes; the playbook needs to run on localhost.
The only tasks use the uri module without local files, so should
be safe.

Change-Id: Ic012426a66be3b85efe9af35089addf1316dfa63
2019-01-11 13:39:07 -08:00
James E. Blair
b4471fb2b6 Fix docker image builds
The credentials secret needs to be associated with the playbook
that uses it.

Also, add build-image-jinja-init to check, this was accidentally
omitted earlier.

Change-Id: I527a26781a716f9307539e4a486d6b79b32f25fd
2019-01-11 12:06:36 -08:00
James E. Blair
899a2023d2 Use promote pipeline for system-config images
Upload an image to dockerhub with a change-specific tag in every
gate job, and then, if the change lands, re-tag the image in
dockerhub.

Change-Id: Ie57fc342cbe29d261d33845829b77a0c1bae5ff4
2019-01-11 08:22:19 -08:00
James E. Blair
3321ccf958 Put opendev website content onto gitea homepage
So that we can host this on opendev.org, we want the content to
be the content from the current website.

Change-Id: Ifaaef48a29210d76ae84709476754a231fa7be4a
Co-Authored-By: Monty Taylor <mordred@inaugust.com>
2019-01-10 18:55:33 +00:00
James E. Blair
83237bc01e Add jinja-init Dockerfile
This creates a jinja-init image based on
https://github.com/ObjectifLibre/jinja-init

We can use this image as an "init container" in k8s to template out
config files using configmaps and secrets.

It also adds a gitea-init Dockerfile, which will require the
jinja-init image to be published first.

Change-Id: I88e14c4f0d868f99aa0a0316e6b9e24c2a8fea68
2019-01-10 10:53:48 -08:00
James E. Blair
3ce494abab Add gitea dockerfile
Change-Id: Iae2c4cbd174212e97445dd3080e2b85be730c5c4
Story: 2004627
2019-01-10 10:53:48 -08:00