Commit Graph

251 Commits

Author SHA1 Message Date
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
techknowlogick 76ac83402b
Clean up mysql service in drone (#13145) 2020-10-14 17:44:18 -04:00
wULLSnpAXbWZGYDYyhWTKKspEQoaYxXyhoisqHf 0e4f663126
chore: update minio image version (#13109)
* 2020-05-16 --> 2020-10-09
2020-10-12 16:45:20 +08:00
techknowlogick 482b0e6d47
Bump min required golang to 1.13 (#12717)
* Bump min required golang to 1.13

* Update config.yaml

* Update Makefile

* per silverwind feedback

* per silverwind

Co-authored-by: zeripath <art27@cantab.net>
2020-09-04 14:12:01 -04:00
Lunny Xiao 9bc69ff26e
Support elastic search for code search (#10273)
* Support elastic search for code search

* Finished elastic search implementation and add some tests

* Enable test on drone and added docs

* Add new fields to elastic search

* Fix bug

* remove unused changes

* Use indexer alias to keep the gitea indexer version

* Improve codes

* Some code improvements

* The real indexer name changed to xxx.v1

Co-authored-by: zeripath <art27@cantab.net>
2020-08-30 19:08:01 +03:00
techknowlogick 125ffb87f0
go1.15 on windows (#12589)
* go1.15 on windows

* update xgo to use node14
2020-08-24 17:46:41 -04:00
silverwind f19cac41d2
Use Node 14 on CI (#12512)
* Use Node 14 on CI

Node 14 is sufficiently stable now, use it on CI.

* also run build on node 14

Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Co-authored-by: zeripath <art27@cantab.net>
2020-08-20 12:30:56 -04:00
Lunny Xiao 62e6c9bc6c
Add a storage layer for attachments (#11387)
* Add a storage layer for attachments

* Fix some bug

* fix test

* Fix copyright head and lint

* Fix bug

* Add setting for minio and flags for migrate-storage

* Add documents

* fix lint

* Add test for minio store type on attachments

* fix test

* fix test

* Apply suggestions from code review

Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com>

* Add warning when storage migrated successfully

* Fix drone

* fix test

* rebase

* Fix test

* display the error on console

* Move minio test to amd64 since minio docker don't support arm64

* refactor the codes

* add trace

* Fix test

* remove log on xorm

* Fi download bug

* Add a storage layer for attachments

* Add setting for minio and flags for migrate-storage

* fix lint

* Add test for minio store type on attachments

* Apply suggestions from code review

Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com>

* Fix drone

* fix test

* Fix test

* display the error on console

* Move minio test to amd64 since minio docker don't support arm64

* refactor the codes

* add trace

* Fix test

* Add URL function to serve attachments directly from S3/Minio

* Add ability to enable/disable redirection in attachment configuration

* Fix typo

* Add a storage layer for attachments

* Add setting for minio and flags for migrate-storage

* fix lint

* Add test for minio store type on attachments

* Apply suggestions from code review

Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com>

* Fix drone

* fix test

* Fix test

* display the error on console

* Move minio test to amd64 since minio docker don't support arm64

* don't change unrelated files

* Fix lint

* Fix build

* update go.mod and go.sum

* Use github.com/minio/minio-go/v6

* Remove unused function

* Upgrade minio to v7 and some other improvements

* fix lint

* Fix go mod

Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com>
Co-authored-by: Tyler <tystuyfzand@gmail.com>
2020-08-18 12:23:45 +08:00
silverwind d285b5d35a
Add 'checks' Make and CI tasks (#12352)
* Add 'checks' Make and CI tasks

Introduce new "checks" targets that perform tasks that we've been piling
onto the linting tasks. This will make the linter tasks faster and
hopefully encourage some users to use them locally.

* add checks to --help

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2020-08-16 17:43:09 -04:00
techknowlogick eb60a5d054
Build windows using golang 1.14 (#12489) 2020-08-13 22:29:00 -04:00
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>
2020-08-13 10:11:24 -04:00
techknowlogick 0cc21fb72d
use community codecov drone plugin (#12468) 2020-08-10 22:02:09 -04:00
techknowlogick a3b185d54c
Alpine 3.12 (#11720)
* increase alpine to 3.12

* Update .drone.yml
2020-06-03 16:32:51 -04:00
silverwind 50475fff06
Skip frontend build where unnecessary (#11159)
The testing pipelines and build-backend steps do not depend on
frontend files, skip their build for them.
2020-04-20 15:13:38 -04:00
Jordan 5c092eb0ef
Add support for migrating from Gitlab (#9084)
* First stab at a Gitlab migrations interface.

* Modify JS to show migration for Gitlab

* Properly strip out #gitlab tag from repo name

* Working Gitlab migrations!
Still need to figure out how to hide tokens/etc from showing up in opts.CloneAddr

* Try #2 at trying to hide credentials.
CloneAddr was being used as OriginalURL.
Now passing OriginalURL through from the form and saving it.

* Add go-gitlab dependency

* Vendor go-gitlab

* Use gitlab.BasicAuthClient
Correct CloneURL.
This should be functioning!
Previous commits fixed "Migrated from"
from including the migration credentials.

* Replaced repoPath with repoID globally.
RepoID is grabbed in NewGitlabDownloader

* Logging touchup

* Properly set private repo status.
Properly set milestone deadline time.
Consistently use Gitlab username for 'Name'.

* Add go-gitlab vendor cache

* Fix PR migrations:
- Count of issues is kept to set a non-conflicting PR.ID
- Bool is used to tell whether to fetch Issue or PR comments

* Ensure merged PRs are closed and set with the proper time

* Remove copyright and some commented code

* Rip out '#gitlab' based self-hosted Gitlab support

* Hide given credentials for migrated repos.

CloneAddr was being saved as OriginalURL.

Now passing OriginalURL through from the form and
saving it in it's place

* Use asset.URL directly, no point in parsing.
Opened PRs should fall through to false.

* Fix importing Milestones.
Allow importing using Personal Tokens or anonymous access.

* Fix Gitlab Milestone migration if DueDate isn't set

* Empty Milestone due dates properly return nil, not zero time

* Add GITLAB_READ_TOKEN to drone unit-test step

* Add working gitlab_test.go.
A Personal Access Token, given in env variable GITLAB_READ_TOKEN
is required to run the test.

* Fix linting issues

* Add modified JS files

* Remove pre-build JS files

* Only merged PRs are marged as merged/closed

* Test topics

* Skip test if gitlab is inaccessible

* Grab personal token from username, not password.
Matches Github migration implementation

* Add SetContext() to GitlabDownloader.

* Checking Updated field in Issues.

* Actually fetch Issue Updated time from Gitlab

* Add Gitlab migration GetReviews() stub

* Fix Patch and Clone URLs

* check Updated too

* fix mod

* make vendor with go1.14

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2020-04-19 23:44:11 +08:00
guillep2k 23163e98a3
Use /tmp for test repositories (#11126)
* Add option to use /tmp for test repositories

* Fix exit status

* Add feedback about using tmp repos

Co-authored-by: Guillermo Prandi <guillep2k@users.noreply.github.com>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2020-04-19 14:17:02 +03:00
John Olheiser 1648bf2b60
Turn off go modules for xgo and gxz (#10963)
* Turn off go modules for xgo and gxz

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* Add test release for PR

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* Try with go modules off

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* Revert Makefile, force a release test

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* Turn on GOPROXY for release

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* CI

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* CI

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* Final commit

Signed-off-by: jolheiser <john.olheiser@gmail.com>
2020-04-06 12:48:55 +08:00
Lunny Xiao 686850e21f
Fix cross compile (#10952)
* Fix cross compile

* Add test for cross compile

* Fix drone

* Fix drone

* Also prevent CC environment not to generate

Co-authored-by: zeripath <art27@cantab.net>
2020-04-05 20:28:18 +08:00
Lunny Xiao 4f63f283c4
Rename scripts to build and add revive command as a new build tool command (#10942)
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2020-04-03 22:29:12 +03:00
silverwind ad4026431b
Add 'make lint', restructure 'compliance' pipeline (#10861)
- Added 'lint', 'lint-frontend', 'lint-backend' targets
- Added 'lint-frontend', 'lint-backend' ci steps and restructure the
  'compliance' pipeline to have a clear separation between frontend and
  backend and use parallelism where possible. Also, the main build
  pipelines now depend on 'compliance' so they will skip if it fails.
- Added dependencies on ci steps so they skip when 'compliance' fails
- Moved JS linters to devDependencies
- Removed deprecated 'js' and 'css' targets
2020-03-29 12:56:58 +01:00
techknowlogick 2fa1078911
go 1.14 (#10467) 2020-03-20 10:29:31 -04:00
Antoine GIRARD 263c859558
Use better wording for release pipeline and steps (#10701) 2020-03-11 10:03:20 +08:00
Lunny Xiao 6618348e23
cross compile using go 1.13.x (#10684) (#10697)
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2020-03-10 16:36:59 +01:00
zeripath a6dc8f7caa
Revert "Do docker releases for pushes to release branches (#10330)" (#10345)
This reverts commit 69f80fd9f6.
2020-02-18 20:46:21 +00:00
zeripath 69f80fd9f6
Do docker releases for pushes to release branches (#10330)
Co-authored-by: Lauris BH <lauris@nix.lv>
2020-02-18 10:24:09 +00:00
Antoine GIRARD 5a46ec647b
fix: set explicit POSTGRES_PASSWORD for pgsql on drone CI (#10302) 2020-02-16 22:46:29 +02:00
Lunny Xiao 5dbf36f356
Issue search support elasticsearch (#9428)
* Issue search support elasticsearch

* Fix lint

* Add indexer name on app.ini

* add a warnning on SearchIssuesByKeyword

* improve code
2020-02-13 14:06:17 +08:00
silverwind 1019913eab move CSS build to webpack (#9983)
- added new 'make webpack' target
- deprecated 'make js' and 'make css'
- extend webpack config to load the less files
- updated docs

I had to rename the source file of `arc-green.less` to avoid generating
a useless JS entrypoint via webpack-fix-style-only-entries which would
not work with different source/destination filenames. I hear that there
should be cleaner solutions possible once we upgrade to Webpack 5.

Co-authored-by: zeripath <art27@cantab.net>
2020-01-28 07:30:39 +00:00
zeripath 20d637a0f8
Enforce tests do not change files in source tree (#9625) 2020-01-26 20:07:12 +00:00
silverwind 15af6bec60 combine make calls on drone (#9979)
* combine make calls on drone

combine most make calls on drone into one command. this should give a
speedup of about 5-15 seconds per make invocation because make only
needs to resolve file globs once.

* combine timeout calls as well
2020-01-25 16:42:38 +00:00
techknowlogick e6730c9f18
Frontport: Fix regression with tag test running (#9941) (#9942) 2020-01-22 16:25:41 -05:00
Antoine GIRARD 99aad09bd0
Filter locales under 25% (#9893)
* Create update-locales.sh

* Update .drone.yml

* fix file perms +x
2020-01-21 17:26:17 +01:00
techknowlogick c437e8e930 run translations pipeline on arm server (#9865) 2020-01-19 10:17:57 +01:00
Antoine GIRARD 8dd5ab2a14 ci: simplify tag/release by always running coverage (#9774)
* ci: simplify tag/release by always running coverage

* use mod and vendor for unit test coverage

* remove not needed lfs for unit test
2020-01-16 19:21:35 +00:00
Antoine GIRARD 11885daaa0
tests: configure github remaining limit + read token (#9800)
* ci: configure remaining github limmit

* prepend with github since package is common to all migrations

* add RefreshRate

* Update github.go

* add missing space

* go fmt

* Read env variable GITHUB_READ_TOKEN for token

* Update .drone.yml
2020-01-16 16:15:44 +01:00
techknowlogick 6b1fa12359
use arm drone agent for docs (#9776) 2020-01-15 00:59:13 -05:00
Antoine GIRARD 203e063846 ci: move some integration tests on arm64 (#9747) 2020-01-14 23:33:54 -05:00
Antoine GIRARD fd761708fe
ci: run notify on arm64 (#9762)
* ci: run notify on arm64

Free one jobs on amrd64

* Update .drone.yml

* Update .drone.yml

* Update .drone.yml

Based on: https://github.com/appleboy/drone-discord/blob/master/.drone.yml#L339

* improve trigger

Co-authored-by: techknowlogick <matti@mdranta.net>
2020-01-15 03:14:21 +01:00
Antoine GIRARD ebaf33873f
ci: use new mssql image (#9720)
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2020-01-14 13:06:49 +01:00
Antoine GIRARD b787aafc17
ci: re-ordering Drone CI for optimizing time (#9719)
* ci: try re-ordering for optimizing time

* ci: try re-ordering for optimizing time

* ci: try re-ordering for optimizing time

* ci: try re-ordering for optimizing time

* ci: try re-ordering for optimizing time

* ci: try re-ordering for optimizing time

* ci: try offloading mysql8 to arm64

* Revert "ci: try offloading mysql8 to arm64"

This reverts commit c60de5db1c.

* ci: try offloading pgsql to arm64

* ci: activate ldap on arm64

* ci: test mysql8 in place pgsql arm64

* chore: clean un-needed move

* typo

* ci: revert runnning mysql on arm64

* ci: run compliance on arm

* chore: limit change

* chore: readd maybe need for release fetch-tags

* ci: remove docker-linux-amd64-dry-run

* ci: remove docker-linux-amd64-dry-run

* Revert "ci: remove docker-linux-amd64-dry-run"

This reverts commit 0715f65b11.

Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2020-01-13 11:40:10 +01:00
Antoine GIRARD 2ecf98ed2d ci: use docker image for golangci-lint (#9737) 2020-01-12 16:26:13 -05:00
techknowlogick d86e587186
alpine 3.11 (#9440) 2019-12-26 19:52:32 -05:00
silverwind 7217b703e9 Combine Drone release steps (#9338)
* Combine Drone release steps

Fixes missing JS/CSS because drone did unwanted parallelization of the
js/css task and the generate task. Combined the tasks into one and made
'make release' work standalone.

Fixes: https://github.com/go-gitea/gitea/issues/9324
Fixes: https://github.com/go-gitea/gitea/issues/9362

* move js/css to generate dependencies

* remove unneccessary go-all target

* remove go target as well
2019-12-15 13:06:36 -05:00
techknowlogick c34fdf7e33
prebuild CSS/JS before xgo release binaries (#9293)
* prebuild CSS/JS before xgo release binaries

* Update .drone.yml

* Update Makefile

* update per @lafriks feedback
2019-12-08 17:24:17 -05:00
silverwind 3f42934b9a Remove explicit 'generate' calls, fix release task (#9288)
* Remove more explicit 'generate' calls

`generate` is now implicit during `build` since #9114, it is no longer
necessary or desired to specify it explicitely.

* add js,css,generate dependencies to release task

* remove generate warning as per @lunny
2019-12-08 18:56:59 +02:00
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
2019-12-05 11:41:38 +08:00
Gary Kim 9feab29405 Check compiled files during build (#9042)
Signed-off-by: Gary Kim <gary@garykim.dev>
2019-11-16 14:15:07 +00:00
techknowlogick 3f5cdfe359 use go 1.13 (#8088)
* use go 1.13

* use go 1.13 in gomod file

* Update Makefile

* update swagger deps
2019-09-12 14:58:32 +03:00
Antoine GIRARD e54814dcaa activate sum.golang.org check (#7782) 2019-08-08 12:38:23 +03:00
Antoine GIRARD cd238bc415 build: use GOPROXY and disable download on some steps (#7745)
* build: use GOPROXY

* disable download vendor on some steps
2019-08-05 00:58:16 +03:00
Antoine GIRARD c1b09c30f0 drone: a test for compat with 32 bit (#7707) 2019-08-01 14:00:12 -04:00
Antoine GIRARD d4667a4949 drone/docker: prepare multi-arch release + provide arm64 image (#7571)
* drone/docker: prepare multi-arch release

* Add docker-linux-arm64 pipeline

* add arm 64 build to manifest

* tag dry-run + indent

* Fix notify dependency
2019-07-24 13:21:12 -04:00
Antoine GIRARD acf6bd42c4 drone/docker: Use a more standard format (#7480)
* drone/docker: Use a more standard format

Based on the plugin drone structure itself : ebce953fc4/.drone.yml (L9)
Use autotag : http://plugins.drone.io/drone-plugins/drone-docker/#autotag

* use latest plugins/docker:linux-amd64

* remove useless cache_from

* Don't depends on translations step
2019-07-17 10:47:34 -04:00
Antoine GIRARD aaf8c9f047 don't make release-version deps on transalations since translations is only triggered by push on master (#7496) 2019-07-17 14:12:32 +08:00
techknowlogick d7fccb29de Fetch refs for successful testing for tag (#7388)
* Fetch refs for successful testing for tag

Fix #7382

* Update .drone.yml
2019-07-09 03:24:52 +01:00
Lunny Xiao 87404d7c0b Use vendors when go generate (#7340)
* use vendors when go generate

* update docs about golang minimal requirement from 1.9 to 1.11

* fix build
2019-07-06 23:00:41 -04:00
techknowlogick 5f25558ac2 fix updated drone file (#7336) 2019-07-01 10:32:50 +03:00
Bo-Yi Wu e5a4d784e8 chore: update drone format to 1.0 (#6602)
* chore: update drone format to 1.0

* Converted old drone config

Signed-off-by: konrad <konrad@kola-entertainments.de>

* Moved translations to seperate pipeline

Signed-off-by: konrad <konrad@kola-entertainments.de>

* Split the steps in multiple pipelines and add dependencies

Signed-off-by: konrad <konrad@kola-entertainments.de>

* format

Signed-off-by: konrad <konrad@kola-entertainments.de>

* Fixed step depenednecies

Signed-off-by: konrad <konrad@kola-entertainments.de>

* Fixed discord notify

Signed-off-by: konrad <konrad@kola-entertainments.de>

* Exclude translations and docs pipelines from prs

Signed-off-by: konrad <konrad@kola-entertainments.de>

* Fixed exclude prs

Signed-off-by: konrad <konrad@kola-entertainments.de>

* Fixed exclude prs

Signed-off-by: konrad <konrad@kola-entertainments.de>

* Moved releases to seperate pipeline

Signed-off-by: konrad <konrad@kola-entertainments.de>

* Re-trigger drone

Signed-off-by: konrad <konrad@kola-entertainments.de>

* Disable release step

Signed-off-by: konrad <konrad@kola-entertainments.de>

* Fixed depending step

Signed-off-by: konrad <konrad@kola-entertainments.de>

* Adopted dependencies

Signed-off-by: konrad <konrad@kola-entertainments.de>

* Changed pipeline conditions

Signed-off-by: konrad <konrad@kola-entertainments.de>

* Replaced pipeline conditions with triggers

Signed-off-by: konrad <konrad@kola-entertainments.de>

* Fixed coverage step

Signed-off-by: konrad <konrad@kola-entertainments.de>

* Import changes from #7331

Signed-off-by: konrad <konrad@kola-entertainments.de>

* Add comment for lowest go version

Signed-off-by: konrad <konrad@kola-entertainments.de>

* Exclude fetch-tags from prs

Signed-off-by: konrad <konrad@kola-entertainments.de>

* Re-added comment about no tags

Signed-off-by: konrad <konrad@kola-entertainments.de>

* Removed unneeded conditions

Signed-off-by: konrad <konrad@kola-entertainments.de>

* Moved release version and release latest to different pipelines

Signed-off-by: konrad <konrad@kola-entertainments.de>

* Fixed depending pipeline

Signed-off-by: konrad <konrad@kola-entertainments.de>

* Removed the conditions for all services

Signed-off-by: konrad <konrad@kola-entertainments.de>
2019-06-30 19:53:41 -04:00
techknowlogick 8db4541ecf
Alpine 3.10 (#7256) 2019-06-20 19:47:51 -04:00
silverwind a71cabbd53 add 'npm' and 'npm-update' make targets and lockfile (#7246)
* add 'npm' and 'npm-update' make targets and lockfile

- `make npm` installs and updates node_modules, triggered automatically
   on `make css` and `make js` as it completes reasonably fast and
   ensures consistent modules.
- `make npm-update` updates all dependencies to their latest version,
   regenerates `node_modules` from scratch and updates
   `package-lock.json`. It uses npm modules `updates` written by yours
   truly to find the latest version of each dependency.

* add suggested make dependencies

* remove package-lock.json during npm-update

* regenerate package-lock.json
2019-06-18 22:59:47 -04:00
kolaente f9ec2f89f2 Add golangci (#6418) 2019-06-12 15:41:28 -04:00
Nick Meyer 5d3177dbb6 Exclude pull_request from fetch-tags step, fixes #7108 (#7120)
Signed-off-by: Nick Meyer <nick@e3b0c442.io>
2019-06-05 09:17:17 +08:00
Mura Li 5a722ae812 Timeout test commands without complicated tricks (#7020) 2019-05-26 00:13:01 +01:00