34 Commits (35ac2bb6a678106b470468d5f250b29dd6598e94)

Author SHA1 Message Date
Earl Warren d0dfb8a495 [CI] Forgejo Actions based release process (squash) size optimization
(cherry picked from commit 3c653ff7428dbf898a5131b5c817ce3b13ec0591)
8 months ago
Earl Warren b84f01d369 [CI] Forgejo Actions based release process
Refs: https://codeberg.org/forgejo/website/pulls/230
(cherry picked from commit 87d56bf6c73d726dae8aafbc7e147969f1899931)

[CI] Forgejo Actions based release process (squash)

base64 -w0 to avoid wrapping when the doer name is long as it creates
a broken config.json

(cherry picked from commit 9efdc27e49bdfb3e62401baf27b224385f9f3e5e)

[CI] Forgejo Actions based release process (squash) generate .xz files and sources

Generate .xz files
Check .sha256
Generate the source tarbal

(cherry picked from commit 7afec520c4b1032d7e67a05a41e4e2913bcd9312)

[CI] Forgejo Actions based release process (squash) release notes

(cherry picked from commit d8f4f4807b28297b318d2f555a76d0efef762cf7)

[CI] Forgejo Actions based release process (squash) publish and sign release

(cherry picked from commit a52778c74785fe57cdee3b64b4c6c8a326471532)
(cherry picked from commit cf2ec6274094ac7aebda71d54c64581f528df00a)

[CI] Forgejo Actions based release process (squash) version

use Actions environment variables in Makefile (#25319) (#25318)

uses Actions variable to determine the version. But Forgejo builds
happen in a container where they are not available. Do not use them.

Also verify the version of the binary is as expected for sanity check.

(cherry picked from commit 6decf111a132a869f9e5c6f4d20e368b8f74309f)
(cherry picked from commit 206d0b3886b2d56b585bf552e53d952b35f07284)

[CI] read STORED_VERSION_FILE if available

(cherry picked from commit af74085ebf51c91a51db865a66667fca511838d5)

[CI] backward compatible executable compilation

Add a new static-executable target to use in Dockerfiles and restore
the $(EXECUTABLE) target to what it was before to for backward
compatibility.

The release process now builds static executables instead of
dynamically linked ones which makes them more portable. It changes the
requirements at compile time and is not backward compatible. In
particular it may break packaging that rely on the target that
currently creates a dynamically linked executable.

(cherry picked from commit 84d02a174a4398b1f8ee62e08db5483a9859650f)
(cherry picked from commit 854be47328cc0283119dfb78f9ba0b8306c85f75)

[CI] Forgejo Actions based release process (squash) doc / ca / verbosity

- Document workflow
- Increase verbosity if VERBOSE=true
- Download the Certificate Authority if behind the VPN

(cherry picked from commit 168d5d586904835762d213b2b8815b458a38c78f)
(cherry picked from commit 8756c9a72a40830441124256b7382f900a1052f8)
(cherry picked from commit 2dad7ef20f3bf9ebe2425e2e28b66a4ca21c6786)

[CI] Forgejo Actions based release process (squash) add assets sources-tarbal

Refs: https://codeberg.org/forgejo/forgejo/issues/1115
(cherry picked from commit 5531d01f1981df665f5b8f642e9241e8ea4f4578)

[CI] Forgejo Actions based release process (squash) add assets sources-tarbal

bindata.go is a file, not a directory

Refs: https://codeberg.org/forgejo/forgejo/issues/1115
(cherry picked from commit bd88a4477817be34ea86ebb2f460b9fe8ab5f1b7)
(cherry picked from commit b408085138c578dfaacafbd4b7719ca926456855)

[CI] Forgejo Actions based release process (squash) public/assets moved

(cherry picked from commit d8c921d5a643ed05f2935348531996fe4d08c654)
(cherry picked from commit f29e50b1a09b1a22fc2dbdb77e9a1def1196175b)

[CI] Fix release notes link

- Use substitution to replace all dots with dashes.
- Resolves https://codeberg.org/forgejo/forgejo/issues/1163

(cherry picked from commit 96783728f53a072915cace392aa269adfe9a5c73)
(cherry picked from commit c8d8bf8996beb650cd86cafb110e85e1e05917a0)

[CI] pin go v1.20 for testing

Refs: https://codeberg.org/forgejo/forgejo/issues/1228
(cherry picked from commit fd4b5a013ee0f31453b623d12001a8b810cd7ebc)
(cherry picked from commit 00bb15f57f2ae5a11abc8b044ed99dc949e812a7)

Conflicts:
	Dockerfile
	Dockerfile.rootless
	see https://codeberg.org/forgejo/forgejo/pulls/1303
(cherry picked from commit 6e2be54a6d95412ce770d4bab1a39c77591f44dc)
(cherry picked from commit 346c418b4a8c0e1f8c9aace44b00373a4bf76732)
(cherry picked from commit 49061f8422cb6aa9ddc14edb507f50477624eb7a)
(cherry picked from commit 8229d59b7e1ba61959de6ecd95d9dd49bc2436dc)
(cherry picked from commit 70d45d919309d8127551c8ad44538a730b795638)

[CI] Forgejo Actions based release process (squash) need node 18

(cherry picked from commit 722b1f45902ecca3179a92700a2f5c1080422a04)
(cherry picked from commit a91d786169fb4694aed4af68792437a0a67de3fa)

[CI] Forgejo Actions based release process (squash) fix indentation

(cherry picked from commit fbdf9d6abb88fd5def3d0ced488a4dd72655d433)
(cherry picked from commit 2deff90a13397339796ac5a94d63b0d8cd9760a9)
(cherry picked from commit 5710a27fda58093f0db1605585e730c314b933f5)

[CI] Forgejo Actions based release process (squash) FQIN for docker

Refs: https://codeberg.org/forgejo/forgejo/issues/1600
(cherry picked from commit f63d38deb6a9933ce996a61a099f4b79e9171581)

[CI] Forgejo Actions based release process (squash) use forgejo-curl.sh

(cherry picked from commit c0c3ef506fa500cb9626034c5e00913b3c31e08c)
(cherry picked from commit 933ca7ec5dcab55c8593dee4a6cd13281502c41e)

Conflicts:
	Dockerfile
	Dockerfile.rootless
	https://codeberg.org/forgejo/forgejo/pulls/1691
8 months ago
Earl Warren e585db9a97
[CI] Forgejo Actions based release process
Refs: https://codeberg.org/forgejo/website/pulls/230
(cherry picked from commit 87d56bf6c73d726dae8aafbc7e147969f1899931)

[CI] Forgejo Actions based release process (squash)

base64 -w0 to avoid wrapping when the doer name is long as it creates
a broken config.json

(cherry picked from commit 9efdc27e49bdfb3e62401baf27b224385f9f3e5e)

[CI] Forgejo Actions based release process (squash) generate .xz files and sources

Generate .xz files
Check .sha256
Generate the source tarbal

(cherry picked from commit 7afec520c4b1032d7e67a05a41e4e2913bcd9312)

[CI] Forgejo Actions based release process (squash) release notes

(cherry picked from commit d8f4f4807b28297b318d2f555a76d0efef762cf7)

[CI] Forgejo Actions based release process (squash) publish and sign release

(cherry picked from commit a52778c74785fe57cdee3b64b4c6c8a326471532)
(cherry picked from commit cf2ec6274094ac7aebda71d54c64581f528df00a)

[CI] Forgejo Actions based release process (squash) version

use Actions environment variables in Makefile (#25319) (#25318)

uses Actions variable to determine the version. But Forgejo builds
happen in a container where they are not available. Do not use them.

Also verify the version of the binary is as expected for sanity check.

(cherry picked from commit 6decf111a132a869f9e5c6f4d20e368b8f74309f)
(cherry picked from commit 206d0b3886b2d56b585bf552e53d952b35f07284)

[CI] read STORED_VERSION_FILE if available

(cherry picked from commit af74085ebf51c91a51db865a66667fca511838d5)

[CI] backward compatible executable compilation

Add a new static-executable target to use in Dockerfiles and restore
the $(EXECUTABLE) target to what it was before to for backward
compatibility.

The release process now builds static executables instead of
dynamically linked ones which makes them more portable. It changes the
requirements at compile time and is not backward compatible. In
particular it may break packaging that rely on the target that
currently creates a dynamically linked executable.

(cherry picked from commit 84d02a174a4398b1f8ee62e08db5483a9859650f)
(cherry picked from commit 854be47328cc0283119dfb78f9ba0b8306c85f75)

[CI] Forgejo Actions based release process (squash) doc / ca / verbosity

- Document workflow
- Increase verbosity if VERBOSE=true
- Download the Certificate Authority if behind the VPN

(cherry picked from commit 168d5d586904835762d213b2b8815b458a38c78f)
(cherry picked from commit 8756c9a72a40830441124256b7382f900a1052f8)
(cherry picked from commit 2dad7ef20f3bf9ebe2425e2e28b66a4ca21c6786)

[CI] Forgejo Actions based release process (squash) add assets sources-tarbal

Refs: https://codeberg.org/forgejo/forgejo/issues/1115
(cherry picked from commit 5531d01f1981df665f5b8f642e9241e8ea4f4578)

[CI] Forgejo Actions based release process (squash) add assets sources-tarbal

bindata.go is a file, not a directory

Refs: https://codeberg.org/forgejo/forgejo/issues/1115
(cherry picked from commit bd88a4477817be34ea86ebb2f460b9fe8ab5f1b7)
(cherry picked from commit b408085138c578dfaacafbd4b7719ca926456855)

[CI] Forgejo Actions based release process (squash) public/assets moved

(cherry picked from commit d8c921d5a643ed05f2935348531996fe4d08c654)
(cherry picked from commit f29e50b1a09b1a22fc2dbdb77e9a1def1196175b)

[CI] Fix release notes link

- Use substitution to replace all dots with dashes.
- Resolves https://codeberg.org/forgejo/forgejo/issues/1163

(cherry picked from commit 96783728f53a072915cace392aa269adfe9a5c73)
(cherry picked from commit c8d8bf8996beb650cd86cafb110e85e1e05917a0)

[CI] pin go v1.20 for testing

Refs: https://codeberg.org/forgejo/forgejo/issues/1228
(cherry picked from commit fd4b5a013ee0f31453b623d12001a8b810cd7ebc)
(cherry picked from commit 00bb15f57f2ae5a11abc8b044ed99dc949e812a7)

Conflicts:
	Dockerfile
	Dockerfile.rootless
	see https://codeberg.org/forgejo/forgejo/pulls/1303
(cherry picked from commit 6e2be54a6d95412ce770d4bab1a39c77591f44dc)
(cherry picked from commit 346c418b4a8c0e1f8c9aace44b00373a4bf76732)
(cherry picked from commit 49061f8422cb6aa9ddc14edb507f50477624eb7a)
(cherry picked from commit 8229d59b7e1ba61959de6ecd95d9dd49bc2436dc)
(cherry picked from commit 70d45d919309d8127551c8ad44538a730b795638)

[CI] Forgejo Actions based release process (squash) need node 18

(cherry picked from commit 722b1f45902ecca3179a92700a2f5c1080422a04)
(cherry picked from commit a91d786169fb4694aed4af68792437a0a67de3fa)

[CI] Forgejo Actions based release process (squash) fix indentation

(cherry picked from commit fbdf9d6abb88fd5def3d0ced488a4dd72655d433)
(cherry picked from commit 2deff90a13397339796ac5a94d63b0d8cd9760a9)
(cherry picked from commit 5710a27fda58093f0db1605585e730c314b933f5)

[CI] Forgejo Actions based release process (squash) FQIN for docker

Refs: https://codeberg.org/forgejo/forgejo/issues/1600
(cherry picked from commit f63d38deb6a9933ce996a61a099f4b79e9171581)

[CI] Forgejo Actions based release process (squash) use forgejo-curl.sh

(cherry picked from commit c0c3ef506fa500cb9626034c5e00913b3c31e08c)
(cherry picked from commit 933ca7ec5dcab55c8593dee4a6cd13281502c41e)

Conflicts:
	Dockerfile
	Dockerfile.rootless
	https://codeberg.org/forgejo/forgejo/pulls/1691
(cherry picked from commit 1068e48805de9d7464b41f32e1c5567d3747239a)

[CI] Forgejo Actions based release process (squash) size optimization

(cherry picked from commit 3c653ff7428dbf898a5131b5c817ce3b13ec0591)
(cherry picked from commit 398567fc0cf9edd0be49541339800af985e8b1b6)
8 months ago
Loïc Dachary b0250fd533
[CI] implementation: forgejo container images
(cherry picked from commit dd1971d4e60f37fb76daeb6cef8b1defcc957a34)
(cherry picked from commit 3981dbaf8c0dd74b0e82a7afc36809998ac775a2)
(cherry picked from commit 8dff3cc2d1)
(cherry picked from commit e7673e5d2237733e4e17b9386c4bb25bb88fe2e2)
(cherry picked from commit 326174064ba6dbd379ea82e9643e23fe684ad96f)
(cherry picked from commit eb769dbde4fb0d7a8a4bd74b6bcdf1f1f180f840)
(cherry picked from commit 335829ade20a187c7fd423909231d198a59545bd)
(cherry picked from commit 5e8e4f549d2224a00387764e93fdbde34e324c3d)

Conflicts:
	Dockerfile
	Dockerfile.rootless
(cherry picked from commit b777fc91d0ba5b1a061bd9cc57c4818a3357b42a)
(cherry picked from commit 02cda642ec7ce2b69de7f0ff4fb4f0d70941f54e)
(cherry picked from commit 96ef93f3bc1b618831f04e1ae5d5c7c74e2ed36c)
(cherry picked from commit aa424551f24364dd43d9b7739b723bb1d914eeaf)

Conflicts:
	Dockerfile
	Dockerfile.rootless
(cherry picked from commit e54fa86e4904047e5670e68a9dd89e76530564a4)
(cherry picked from commit 043fa6d6649272f14a65ee2c9cac15b090e66bc9)
(cherry picked from commit 805b16248015e8d7ab8c4f514969cff333d432c8)
(cherry picked from commit 86bf362a3c8386cc4530c0c4cba46097ed20d8af)
(cherry picked from commit 13e0007959fb5e2496b3bbec916036bd2a05a558)
(cherry picked from commit 00ff6f7cb3c54ae3a8ed2069b0dd0dddd98e7e6e)
(cherry picked from commit 95c7d8e883da495facfbac39db55b5b710ea25a7)
(cherry picked from commit fb033d2bb613c34b7f61c2bad14136f8f110081e)
(cherry picked from commit 1147910a552db9fdf7f4ef0a35e9b1d2405b0e69)
(cherry picked from commit 6590b6e99c9c31389f6b948976fba3fea8da7eb7)
(cherry picked from commit 78938113e4908df1d1e5181c1aa7605e7bc5747d)
(cherry picked from commit 57338224f172e30a72f03f565aa47876e1213e77)
(cherry picked from commit 4266cbcdd415de2deaea8620fe9b7b53866171ba)
(cherry picked from commit bdc766a5a2304fc1826649ac747a2724fed6e7ab)
(cherry picked from commit 6fb9ad85046fedf381a948906841098eb4ac010f)
(cherry picked from commit c4e6383240c4188fd65bf751aaf8f38466fe60e7)
(cherry picked from commit 490fa55b3abab2450073bc2358893687a06305cc)
(cherry picked from commit 802c8e72be88b342d3a285cd76a4d3207813d54f)
(cherry picked from commit 2b1efe20303be52f7ce142bafe48228822a1350c)
(cherry picked from commit fdcdd7389adafc25a158fc510256039e8f98bb2d)
(cherry picked from commit b9ae491650c7b8008149cda504439f092ba019ea)
(cherry picked from commit e7867c6512957822e6b9fde3dab2288714481f72)
(cherry picked from commit 0a43263fa6ad3dd7c20f7a7a8a60720d2a2ab7ea)
(cherry picked from commit 64bb6b89820d2202489151a84e00b62e8b580826)
(cherry picked from commit dcc1fd6292950fa0ce0cf932c62bc6e016d11b2f)
8 months ago
Patryk Krawaczyński 319414dd82
Dockerfile small refactor (#27757)
- Size and layer optimization,
- Maintaining consistency in definitions (comments, apk etc.),
8 months ago
techknowlogick 653e77fd22
bump go to 1.21 (#26608)
Co-authored-by: Giteabot <teabot@gitea.io>
10 months ago
Yevhen Pavlov bed6885448
Update to Alpine 3.18 (#24700)
This pull request is for updating the base docker images to build with the latest version of Alpine.
1 year ago
techknowlogick 6148e38b86
Hardcode path to docker images (#23955)
Fix #23954

This allows for building on platforms that don't have docker hub as the
default container registry.
1 year ago
zeripath 43405c35f0
Add Bash and Zsh completion scripts (#22646)
This PR adds contrib scripts for bash and zsh completion.

Simply call:

```bash
source contrib/autocompletion/bash_autocomplete
```

or for Zsh:

```bash
source contrib/autocompletion/zsh_autocomplete
```

Signed-off-by: Andrew Thornton <art27@cantab.net>

---------

Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: a1012112796 <1012112796@qq.com>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
1 year ago
techknowlogick cfb1cb1168
update to build with go1.20 (#22732)
as title

---------

Co-authored-by: Lauris BH <lauris@nix.lv>
1 year ago
Michael Kriese 84d2a820e5
Add dumb-init to rootless docker (#21775)
Add dumb-init as process reaper to the rootless image to reap defunct git processes.
2 years ago
flynnnnnnnnnn 350bc83d00
Update to Alpine 3.17 (#21904)
This pull request is for updating the base docker images to build with
the latest version of Alpine.
2 years ago
techknowlogick be824890e4
Switch to building with go1.19 (#20695) 2 years ago
luzpaz d29d6d1991
Fix various typos (#20338)
* Fix various typos

Found via `codespell -q 3 -S ./options/locale,./options/license,./public/vendor -L actived,allways,attachements,ba,befores,commiter,pullrequest,pullrequests,readby,splitted,te,unknwon`

Co-authored-by: zeripath <art27@cantab.net>
2 years ago
techknowlogick 0cbec3cd37
alpine 3.16 (#19797)
Co-authored-by: 6543 <6543@obermui.de>
2 years ago
techknowlogick ed1d95c55d
use go1.18 to build gitea (#19099)
* use go1.18 to build gitea& update min go version to 1.17

* bump in a few more places

* add a few simple tests for isipprivate

* update go.mod

* update URL to https://go.dev/dl/

* golangci-lint

* attempt golangci-lint workaround

* change version

* bump fumpt version

* skip strings.title test

* go mod tidy

* update tests as some aren't private??

* update tests
2 years ago
Grzegorz Alibożek 4563148a61
Upgrade Alpine from 3.13 to 3.15 (#18050)
* Upgrade alpine to 3.15

* Add executability test to entrypoint for too old dockers

Signed-off-by: Andrew Thornton <art27@cantab.net>

* Update docker/rootless/usr/local/bin/docker-entrypoint.sh

Co-authored-by: zeripath <art27@cantab.net>
2 years ago
techknowlogick d8ae769dda
update docker image to latest go version (#18048) 3 years ago
zeripath 7d0629adf8
Use shadowing script for docker (#17846)
Too many docker users are caught out by the default location for the
app.ini file being environment dependent so that when they docker exec
into the container the gitea commands do not work properly and require
additional -c arguments to correctly pick up the configuration.

This PR simply shadows the gitea binary using variants of the FHS
compatible script to make the command gitea have the default locations
by default.

Fix #14468
Reference #17497
Reference #12082
Reference #8941
... amongst others ...
Replace #17501

Signed-off-by: Andrew Thornton <art27@cantab.net>
3 years ago
wxiaoguang 6e2c64f27a
Fix docker rootless build (#17441) 3 years ago
zeripath 0277603878
chmod executables when copying to the docker (#17423)
Run chmod on the executables and the entrypoint when copying them to the
docker in dockerfile.

Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: Norwin <noerw@users.noreply.github.com>
Co-authored-by: delvh <dev.lh@web.de>
3 years ago
techknowlogick 274aeb3a9e
build with go1.17 (#16707)
Co-authored-by: Lauris BH <lauris@nix.lv>
3 years ago
techknowlogick 7b31aae414
revert to use alpine 3.13 (#16451)
Co-authored-by: zeripath <art27@cantab.net>
3 years ago
Jonathan Hult 615444dcbd
Fix #16387 - rootless Docker user (#16388)
Move comment to top of USER instruction
3 years ago
Tobias Florek 5e819ee1de
specify user in rootless container numerically (#16361)
* specify user in rootless container numerically

With kubernetes' PodSecurityPolicy set to runAsNonRoot it will not allow starting the container.  The error message is
```
Error: container has runAsNonRoot and image has non-numeric user (git), cannot verify user is non-root
```
The `USER` directive has to be numerical for that to work.

* mention the name of the uid/gid

Co-authored-by: 6543 <6543@obermui.de>
3 years ago
techknowlogick 061a8e7bb9
Alpine 3.14 released (#16170)
Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: zeripath <art27@cantab.net>
3 years ago
Steven 683cfe39ef
Change default TMPDIR path in rootless containers (#16077)
Signed-off-by: Steven Kriegler <61625851+justusbunsi@users.noreply.github.com>
3 years ago
Steven d6d2444f2a
Add curl to rootless docker image (#15908)
Signed-off-by: JustusBunsi <61625851+justusbunsi@users.noreply.github.com>

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
3 years ago
Martin Michaelis d576126286
Remove random password in Dockerfiles (#15362)
* Remove random password of git user in dockerfile

* Disable git user account in rootless dockerfile
3 years ago
techknowlogick 47f6a4ec3f
go1.16 (#14783) 3 years ago
Kyle D 61f347e349
Add environment-to-ini to docker image (#14762)
* Add environment-to-app.ini routine

* Call environment-to-ini in docker setup scripts

* Automatically convert section vars to lower case to match documentation

* Remove git patch instructions

* Add env variable documentation to Install Docker
3 years ago
techknowlogick b708968694
upgrade to alpine 3.13 (#14343) 3 years ago
Lauris BH 8c2b5feeae
When building rootless docker image move chown&chmod to build stage (#13578)
* When building rootless docker image move chown&chmod to build stage

Fixes #13577

* Fix command newlines

* Move chown to COPY command

* Seems to be working also without chmod

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
4 years ago
Antoine GIRARD fe458ce877
docker: rootless image (#10154)
* docker: rootless image

* improve docs + remove check for write perm on custom

* add more info on ssh passtrough

* Add comment for internal ssh server in container config
4 years ago