Commit Graph

213 Commits (e5ec7a086f649751f4496e69ea64ba18aecdb73d)

Author SHA1 Message Date
6543 246902cd63
use next gen codecov uploader (#18443) 2022-01-30 03:21:15 +01:00
techknowlogick 84145e45c5
Remove golang vendored directory (#18277)
* rm go vendor

* fix drone yaml

* add to gitignore
2022-01-14 18:16:05 -05:00
techknowlogick b24a965b81
no need for docker image mirror (#18031)
Co-authored-by: zeripath <art27@cantab.net>
2021-12-19 16:53:15 -05:00
techknowlogick 6255ff8c6b
update xgo to use 1.17 (#17915) 2021-12-05 19:48:38 -05:00
wxiaoguang e4b95de388
Prepare and check test env during CI (#17725)
This PR should resolve the permission problems during CI, if the uid doesn't match, a more clear message is shown.

*  CI fails with unknown permission problems #17710

The new drone step dependencies:

(root)prepare-test-env -> (gitea)build -> (gitea)test
2021-11-19 13:58:34 +08:00
techknowlogick f0bd1e9896
Add protection to disable Gitea when run as root (#17168)
Co-authored-by: delvh <dev.lh@web.de>
Co-authored-by: 6543 <6543@obermui.de>
2021-10-07 10:52:08 +02:00
6543 70d8d64cb8
CI: migrate from 'plugins/s3:1' to 'woodpeckerci/plugin-s3:latest' (#17234)
- this fixes the CI release upload issues, as the docker image for this is freshly built (unlike the mostly unmaintained "official" drone plugins), thus containing current CA certs needed for letsencrypt since 2021-09-31.
- woodpecker is a drone-ci fork maintained partially by @6543. it's API compatible with current drone plugins afaik
2021-10-06 13:58:11 +02:00
6543 7815f244d6
CI: rm unit-test-race step since its now coverd by unit-test too (#16856)
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2021-08-29 09:42:56 +08:00
Mura Li b60e814055
Enable race detector for CI (#1441)
* Enable race detector by default

Set RACE_ENABLED=0 to disable it when release

* Disable race detector for release builds

* use `true`

* fix

* debug issue

* fix

* verbose

* clean

* Fix wrong merge

* Fix coverage merge

Co-authored-by: Mura Li <typeless@users.noreply.github.com>
Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2021-08-26 16:50:04 +08:00
techknowlogick 274aeb3a9e
build with go1.17 (#16707)
Co-authored-by: Lauris BH <lauris@nix.lv>
2021-08-17 08:31:28 -04:00
zeripath 806aa870cb
Switch back to node 16 (#16624)
Now that node 16.6.1 is out we can (if desired) switch back to node 16.

This PR proposes changing drone to run node:16

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

Co-authored-by: Lauris BH <lauris@nix.lv>
2021-08-05 01:46:19 +02:00
zeripath 35735bbef9
Upgrade to golang-jwt 3.2.2 (#16590)
* Upgrade to golang-jwt 3.2.2

Upgrade to the latest version of golang-jwt

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

* Forcibly replace the 3.2.1 version of golang-jwt/jwt and increase minimum Go version

Using go.mod we can forcibly replace the 3.2.1 version used by goth to 3.2.2.

Further given golang-jwt/jwts stated policy of only supporting supported go versions
we should just raise our minimal version of go to 1.16 for 1.16 as by time of release
1.15 will be out of support.

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

* update minimal go required

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

* update config.yaml

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

Co-authored-by: 6543 <6543@obermui.de>
2021-08-03 14:32:01 -04:00
6543 24366eddec
[CI] Use node v14 instead of node v16 untill it will pass again (#16595)
* for CI release: use node 14 (lts) to build until 16 do fail

* all in for node v14.x
2021-08-02 03:47:29 +02:00
zeripath e3b6526922
Use node:16.5 for frontend instead of node:16 (#16591)
* Disable frontend testing

Jest does not appear to work on the latest node 16.6.0 and fails with an inscrutable
message.

I have been unable to work out what the problem is. This PR simply disables the
test-frontend part in the makefile.

Another alternative would be to drop node to node 14 - which is the LTS for node.

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

* actually just tell on 16.5 instead

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

* Use node 16.5 instead of 16

Signed-off-by: Andrew Thornton <art27@cantab.net>
2021-08-01 17:33:02 +03:00
6543 4b512abf5b
CI: Add unit-test-race (#16470) 2021-07-17 22:46:20 +02:00
techknowlogick 7b31aae414
revert to use alpine 3.13 (#16451)
Co-authored-by: zeripath <art27@cantab.net>
2021-07-16 09:54:39 +08:00
techknowlogick e180456983
Change docker tag logic (#16421)
* Change docker logic

* Apply suggestions from code review

Co-authored-by: Kyle D. <kdumontnu@gmail.com>

* docs

Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: Kyle D. <kdumontnu@gmail.com>
2021-07-14 18:08:43 +01:00
6543 5b1d0a7701
Replace `plugins/docker` with `techknowlogick/drone-docker`in ci (#16407)
* plugins/docker -> techknowlogick/drone-docker

* It is multi-arch
2021-07-12 15:20:44 -04:00
techknowlogick 061a8e7bb9
Alpine 3.14 released (#16170)
Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: zeripath <art27@cantab.net>
2021-07-07 15:43:00 -04:00
techknowlogick d4ae87ea32
Run compliance on amd64 infra (#16232)
* Run compliance on amd64 infra

* Update .drone.yml
2021-06-23 01:36:27 -04:00
Patrick Schratz d957a1569a
Bump `postgres` and `mysql` versions (#15710)
* bump postgres and mysql DB versions

* posgres test against v10

Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2021-05-21 18:11:48 -04:00
silverwind 9b7d692e9e
Use node 16 on release tasks too (#15936)
Forgot these in https://github.com/go-gitea/gitea/pull/15804.
2021-05-20 16:37:20 -04:00
silverwind 9545c345a8
Update JS dependencies, use Node 16 (#15804)
- Update all JS dependencies to latest version
- Use Node 16 on CI
- Add new lint rules
- Add some gitignore entries for debug files

Co-authored-by: Lauris BH <lauris@nix.lv>
2021-05-13 11:12:36 -04:00
techknowlogick ffbd0fef06
change s3 bucket name (#15847) 2021-05-12 15:08:33 -04:00
techknowlogick 2dc3e4edc8
point appleboy/drone-git-push to use updated primary branch 2021-05-10 20:27:56 -04:00
techknowlogick ab77a24f18
update branch in CI and docs (#15631) 2021-05-04 12:16:23 -04:00
silverwind 0991f9aa42
Stop packaging node_modules in release tarballs (#15273)
- Don't package node_modules in tarballs, they are not cross-platform
  anymore and npm cache should not be messed with directly. Instead,
  require an internet connection to rebuild the UI, which is not necessary
  in the general use case because prebuilt UI files are shipped in the
  public directory.
- Simplify the fomantic build and make the target phony. We don't need
  anything more for something that is rarely ran.
- Use regular tar again to build tarballs and add variable for excludes
- Disable annoying npm update notifications

Fixes: https://github.com/go-gitea/gitea/pull/14578
Fixes: https://github.com/go-gitea/gitea/pull/15256
Fixes: https://github.com/go-gitea/gitea/pull/15262

Co-authored-by: 6543 <6543@obermui.de>
2021-04-09 01:08:14 -04:00
silverwind 0d1a5e0ffc
Add frontend testing, require node 12 (#15315)
- Add basic frontend unit testing infrastructure using jest in ESM mode
- Rename 'make test' to 'make test-backend'
- Introduce 'make test-frontend' and 'make test' that runs both
- Bump Node.js requirement to v12. v10 will be EOL in less than a month.
- Convert all build-related JS files to ESM.

I opted to run frontend tests run as part of the compliance pipeline because
they complete fast and are not platform-specific like the golang tests.
2021-04-08 12:41:57 +02:00
Lunny Xiao 42efa14f51
Introduce esbuild on webpack (#14578)
* Vendor node mods as cache; fix esbuild/fomantic offline build

* Fix --exclude; use bsdtar for consistent globbing

* Fall back to GNU tar; forward-compatible for APT 2.0

* Avoid having extd. attrs with bsdtar

* Dependency and misc. optimizations

* Remove extra code after esbuild-loader update

Co-authored-by: Mike L <cl.jeremy@qq.com>
2021-04-02 02:11:04 +02:00
wULLSnpAXbWZGYDYyhWTKKspEQoaYxXyhoisqHf 51ea8dd444
chore: bump minio to RELEASE.2021-03-12T00-00-47Z (#15006)
* chore: bump minio to RELEASE.2021-03-12T00-00-47Z

-    image: minio/minio:RELEASE.2021-01-16T02-19-44Z
+    image: minio/minio:RELEASE.2021-03-12T00-00-47Z

Signed-off-by: wULLSnpAXbWZGYDYyhWTKKspEQoaYxXyhoisqHf <a_mirre@utb.cz>
2021-03-17 08:40:52 +00:00
a1012112796 a44b2d01d2
CI: pre install git last verson and git lfs in test (#14681)
link:
https://hub.docker.com/r/gitea/test_env
Source:
https://gitea.com/gitea/test_env/src/branch/master/Dockerfile

Signed-off-by: a1012112796 <1012112796@qq.com>
2021-03-12 03:04:43 +01:00
techknowlogick faf775c552
drone workspace path 2021-02-28 23:57:58 -05:00
techknowlogick 1e95b389c0
drone workspace base 2021-02-28 23:25:09 -05:00
techknowlogick d801a158c5
use gomod support w/ xgo (#14836) 2021-03-01 11:43:55 +08:00
techknowlogick 47f6a4ec3f
go1.16 (#14783) 2021-02-28 18:08:33 -05:00
techknowlogick 428d0edcb0
Exclude running docker build on cron tasks (#14778) 2021-02-23 04:55:35 +01:00
6543 1d63e17de8
CI: translation update as cron task (#14774) 2021-02-23 07:16:02 +08:00
techknowlogick d2ea21d0d8
Use caddy's certmagic library for extensible/robust ACME handling (#14177)
* use certmagic for more extensible/robust ACME cert handling

* accept TOS based on config option

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

Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: Lauris BH <lauris@nix.lv>
2021-01-25 01:37:35 +02:00
wULLSnpAXbWZGYDYyhWTKKspEQoaYxXyhoisqHf 4f608ad31f
chore: bump minio to RELEASE.2021-01-16T02-19-44Z (#14445)
-    image: minio/minio:RELEASE.2020-10-09T22-55-05Z
+    image: minio/minio:RELEASE.2021-01-16T02-19-44Z
2021-01-24 22:46:08 +08:00
a1012112796 93a734b3b5
CI: skip build steps for cron update works (#14443)
Signed-off-by: a1012112796 <1012112796@qq.com>
2021-01-24 13:21:33 +01:00
a1012112796 6764e8f7b8
CI: Update license & gitignore by cron (#14419)
do generate-license & generate-gitignore by cron

close #12684

Signed-off-by: a1012112796 <1012112796@qq.com>
2021-01-23 03:53:13 +01:00
techknowlogick b708968694
upgrade to alpine 3.13 (#14343) 2021-01-20 05:21:01 +01:00
techknowlogick d1581a4563
Add compliance check for windows to ensure cross platform build (#14260)
* Add compliance check for windows to ensure cross platform build

* no race condition

* woops. meant to change windows, not arm64

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2021-01-05 21:16:37 -05:00
Lunny Xiao a1c9e8f266
Fix windows build error (#14263)
* fix build

* take flash error message back and fix more windows lint error

* performance optimization

* own step to check lint for windows

Co-authored-by: 6543 <6543@obermui.de>
2021-01-06 09:38:00 +08:00
zeripath 511f6138d4
Use native git variants by default with go-git variants as build tag (#13673)
* Move last commit cache back into modules/git

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

* Remove go-git from the interface for last commit cache

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

* move cacheref to last_commit_cache

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

* Remove go-git from routers/private/hook

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

* Move FindLFSFiles to pipeline

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

* Make no-go-git variants

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

* Submodule RefID

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

* fix issue with GetCommitsInfo

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

* fix GetLastCommitForPaths

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

* Improve efficiency

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

* More efficiency

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

* even faster

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

* Reduce duplication

* As per @lunny

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

* attempt to fix drone

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

* fix test-tags

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

* default to use no-go-git variants and add gogit build tag

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

* placate lint

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

* as per @6543

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

Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2020-12-17 22:00:47 +08:00
silverwind e82150d41b
Reduce number of docker pulls on ci (#13739)
Should reduce errors like https://drone.gitea.io/go-gitea/gitea/32989/7/2
by only pulling each distinct image once per pipeline.

Co-authored-by: zeripath <art27@cantab.net>
2020-11-28 16:59:05 -05:00
techknowlogick c178a36438
use registry mirror for docker-in-docker (#13438)
Co-authored-by: Lauris BH <lauris@nix.lv>
2020-11-06 02:35:10 -05:00
Antoine GIRARD bcb94ed589
fix docker rootless manifest (#13386) 2020-11-02 14:50:13 -05:00
techknowlogick 543697e61e
Set auto-tag to false on rootless manifest (#13383)
Current overrides rootful container
2020-11-01 11:30:01 +00:00
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
2020-10-31 20:58:22 -04:00