86 Commits (0285c997749457cb6f67c5f3ca68e62721b53023)

Author SHA1 Message Date
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
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
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
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
techknowlogick 061a8e7bb9
Alpine 3.14 released (#16170)
Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: zeripath <art27@cantab.net>
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
Antoine GIRARD 7cb22d6439
Revert "Dockerfile: Support socat use cases (#13208)" (#13369)
This reverts commit ff50274ff3.
4 years ago
Begley Brothers (Development) ff50274ff3
Dockerfile: Support socat use cases (#13208)
* Dockerfile: Support socat use cases

In some contexts it is necessary to provide access to Gitea via TCP ports and unix sockets.
Gitea (`gitea web`) can be configured to listen for connections via unix-socket or TCP port, but not both.
When Gitea is installed to the host this limitation can be worked around by installing socat on the host.
When running Gitea from a container this limitation cannot be workaround.

Add socat to Gitea container.

* Removed version

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
4 years ago
Antoine GIRARD 14e718695a
Update Dockerfile (#12922) 4 years ago
techknowlogick bd7d6a3d73
go1.15 (#12475)
* go1.15

* update makefile xgo version

* fix vet issue

* update docs to version of go in use

* add TODO for asyncpreemptoff

Co-authored-by: Lauris BH <lauris@nix.lv>
4 years ago
Cirno the Strongest 594db7fb43
Fix missing CGO_EXTRA_FLAGS build arg for docker (#11782)
Co-authored-by: zeripath <art27@cantab.net>
4 years ago
techknowlogick a3b185d54c
Alpine 3.12 (#11720)
* increase alpine to 3.12

* Update .drone.yml
4 years ago
Cirno the Strongest c9187b8116
Add gnupg to Dockerfile (#11365)
Co-authored-by: zeripath <art27@cantab.net>
4 years ago
techknowlogick 2fa1078911
go 1.14 (#10467) 4 years ago
silverwind fa6ea60c55
Frontend build improvements, fix Fomantic build (#10576)
- add package-lock.json to webpack/fomantic prereqs making them always rebuild when dependencies change.
- remove FOMANTIC_EVIDENCE. It seemed better to just track a few output files instead.
- delete fomantic output files before build to prevent possible bugs in fomantic's build.
- resolve WEBPACK_SOURCES only once for performance
- reorder variables for clarity
- use clean-all in Dockerfile
- detect busybox for find syntax

Fixes: https://github.com/go-gitea/gitea/issues/10569
Fixes: https://github.com/go-gitea/gitea/issues/10565
Fixes: https://github.com/go-gitea/gitea/issues/10570
Fixes: https://github.com/go-gitea/gitea/issues/10568
4 years ago
techknowlogick d86e587186
alpine 3.11 (#9440) 5 years ago
Lunny Xiao 48be1889cd Fix latest docker image haven't include static files. (#9252)
* add warnging on docs

* fix docs
5 years ago
silverwind d9c67a8c90 Add Node.js build dep, remove built js/css files (#9114)
- Added Node.js as build dependency and removes build files from git.
- Added version checks for both Go and Node.js.
- Overhauled the js/css make target to only run when needed.
- Merged the `generate` make target into `build` as per suggestion.

Fixes: https://github.com/go-gitea/gitea/issues/6782
Fixes: https://github.com/go-gitea/gitea/issues/9216
5 years ago
techknowlogick 3f5cdfe359 use go 1.13 (#8088)
* use go 1.13

* use go 1.13 in gomod file

* Update Makefile

* update swagger deps
5 years ago
Antoine GIRARD cd238bc415 build: use GOPROXY and disable download on some steps (#7745)
* build: use GOPROXY

* disable download vendor on some steps
5 years ago
techknowlogick 8db4541ecf
Alpine 3.10 (#7256) 5 years ago
Jakob Ackermann dab38c375d [docker] drop the docker Makefile from the image (#6507) 5 years ago
techknowlogick 96f1720d69
Use golang 1.12 to build in dockerfile (#6285) 5 years ago
techknowlogick 4a747aef7b
Upgrade alpine to 3.9 (#5909) 5 years ago
techknowlogick 5c13ba8d2e
Upgrade alpine to 3.8 (#5423) 6 years ago
Stanislav fa165621ed Update golang version in Dockerfile (#5246) 6 years ago
Mura Li 25c49cf930 Update build tags for sqlite_unlock_notify (#5144) 6 years ago
techknowlogick c3bbf43970 Fix docker build (#4358)
/app/gitea/gitea is the file, and /usr/local/bin is where the symlink will be located
6 years ago
Tao Wang 823318bfbe Add missing path in the Docker app.ini template (#2181) 6 years ago
Antoine GIRARD 0e26db8bcd Docker multi-stage (#2927)
* Setup docker multi-stage and little sugar at it

* Make codacy happy ?

* Revert back to what the official docker documentation suggest

Codacy don't seems to follow https://docs.docker.com/engine/reference/builder/#maintainer-deprecated

* Update golang version
6 years ago
Antoine GIRARD 23ffdf42c8 Update alpine to 3.7 (#3121) 7 years ago
Antoine GIRARD dac0f14f34 Docker multi-arch base (#1985)
* Create docker/manifest/base.yml

serve as base for build docker image for most platform (386,amd64,arm,arm64)

* Add make task docker-multi-arch-push-manifest

To update references of a multi-arch image on docker registry.

* Use SED_INPLACE generic sed command

* Delete Dockerfile.aarch64

Delete Dockerfile.rpi

* Use gitea/gitea-base as base

and replace deprecated MAINTAINER by LABEL (https://docs.docker.com/engine/reference/builder/#maintainer-deprecated)

* Fix rebase

* Use sapk/gitea-base as base

* Split makefile for docker

* Fix version to v3.6

Could use in later version edge of alpine official library that support multi-arch for armhf.

* Remove sapk/gitea-base and use directly new official alpine multi-arch
7 years ago
Tao Wang d545e32b56 Add environment variable support for Docker image (#2201)
* Add `gettext` dependencies as we need `envsubst` command;
* Modified s6's gitea setup script, instead of `cp` the template if no
`app.ini` exist, it will substitude the envvars and generate the new
`app.ini`;
* Make `/docker/etc/templates/app.ini` a template contains environment
variables;

Signed-off-by: Tao Wang <twang2218@gmail.com>
7 years ago