summaryrefslogtreecommitdiffstats
path: root/.drone.yml
Commit message (Collapse)AuthorAgeFilesLines
* Split CI pipelines (#23385)John Olheiser2023-03-101-126/+336
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - This PR attempts to split our various DB tests into separate pipelines. - It splits up some of the extra feature-related tests rather than having most of them in the MySQL test. - It disables the race detector for some of the pipelines as well, as it can cause slower runs and is mostly redundant when the pipelines just swap DBs. - It builds without SQLite support for any of the non-SQLite pipelines. - It moves the e2e test to using SQLite rather than PG (partially because I moved the minio tests to PG and that mucked up the test config, and partially because it avoids another running service) - It splits up the `go mod download` task in the Makefile from the tool installation, as the tools are only needed in the compliance pipeline. (Arguably even some of the tools aren't needed there, but that could be a follow-up PR) - SQLite is now the only arm64 pipeline, moving PG back to amd64 which can leverage autoscaler Should resolve #22010 - one thing that wasn't changed here but is mentioned in that issue, unit tests are needed in the same pipeline as an integration test in order to form a complete coverage report (at least as far as I could tell), so for now it remains in a pipeline with a DB integration test. Please let me know if I've inadvertently changed something that was how it was on purpose. --- I will say sometimes it's hard to pin down the average time, as a pipeline could be waiting for a runner for X minutes and that brings the total up by X minutes as well, but overall this does seem to be faster on average. --------- Signed-off-by: jolheiser <john.olheiser@gmail.com> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Don't run unnecessary steps when only docs changed (#23103)Lunny Xiao2023-02-271-0/+21
| | | | | Remove some unnecessary steps from drone when only docs changed. ref: https://drone.gitea.io/go-gitea/gitea/68090/1/3
* only trigger docs build and publish when docs changed (#22968)Lunny Xiao2023-02-201-4/+21
| | | | | | | | | | | Since drone plugin https://github.com/meltwater/drone-convert-pathschanged/ enabled, we can filter event with path in drone. Building docs will now only be triggered when documentations changed. --------- Co-authored-by: Jason Song <i@wolfogre.com>
* Adjust manifest to prevent tagging latest on rcs (#22811)zeripath2023-02-191-2/+136
|
* use drone secrets for s3 config (#22770)techknowlogick2023-02-051-12/+30
|
* update to build with go1.20 (#22732)techknowlogick2023-02-031-16/+16
| | | | | | | as title --------- Co-authored-by: Lauris BH <lauris@nix.lv>
* Update JS dependencies (#22538)silverwind2023-01-211-1/+1
| | | | | | | | | | - Update all JS dependencies - Add new eslint rules - Rebuild SVGs - Tested citation and build SVG changes are because of https://github.com/primer/octicons/pull/883. Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Add support for incoming emails (#22056)KN4CK3R2023-01-141-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | closes #13585 fixes #9067 fixes #2386 ref #6226 ref #6219 fixes #745 This PR adds support to process incoming emails to perform actions. Currently I added handling of replies and unsubscribing from issues/pulls. In contrast to #13585 the IMAP IDLE command is used instead of polling which results (in my opinion 😉) in cleaner code. Procedure: - When sending an issue/pull reply email, a token is generated which is present in the Reply-To and References header. - IMAP IDLE waits until a new email arrives - The token tells which action should be performed A possible signature and/or reply gets stripped from the content. I added a new service to the drone pipeline to test the receiving of incoming mails. If we keep this in, we may test our outgoing emails too in future. Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Run hugo via `go run` and lock its version (#22206)silverwind2022-12-211-4/+1
| | | | | | | | | | - Don't rely on obscure docker images like `plugins/hugo` - Lock down `hugo` to same version the image had used - Remove unnecessary verbosity in `trans-copy` - Rename `trans-copy` to `trans-copy.sh` Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: John Olheiser <john+github@jolheiser.com> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* fix: update libcurl in docs pipeline (#22203)John Olheiser2022-12-211-1/+2
| | | | | | updating libcurl fixes the mismatch between curl and libcurl Signed-off-by: jolheiser <john.olheiser@gmail.com> Co-authored-by: silverwind <me@silverwind.io>
* Update JS dependencies and eslint (#22190)silverwind2022-12-201-1/+1
| | | | | | | - Update all JS dependencies to latest version - Enable unicorn/prefer-node-protocol and autofix issues - Regenerate SVGs - Add some comments to eslint rules - Tested build, Mermaid and Katex rendering
* Update to Alpine 3.17 (#21904)flynnnnnnnnnn2022-12-021-1/+1
| | | | This pull request is for updating the base docker images to build with the latest version of Alpine.
* Update JS dependencies (#21881)silverwind2022-11-221-1/+1
| | | | | | | | - Update all JS deps - Regenerate SVGs - Add new eslint rules, fix issues - Tested Mermaid, Swagger, Vue, Webpack, Citation Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Consolidate security-check into checks-backend (#21882)silverwind2022-11-211-10/+0
| | | Also, run it via exact version instead of relying on global binary.
* Update JS dependencies and misc tweaks (#21583)silverwind2022-10-281-1/+1
| | | | | | | | | | | - Update all JS dependencies to latest version - Disable two redundant eslint rules - Adapt stylelint config to codebase - Regenerate SVGs - Make file editor spinner "reserve" height so page does not shift - Tested katex, swagger, monaco Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: 6543 <6543@obermui.de>
* Fix Drone pushing commits with wrong author info (#21450)Yarden Shoham2022-10-141-2/+6
| | | | | | | | | | | | | | | | | | | | | | I don't know how to test this so I'll explain my thought process: After a discussion with @techknowlogick in https://github.com/go-gitea/gitea/commit/cda2c38f4a61ef7f448be3efab5420d9974c8474 I saw the CI config has this block: https://github.com/go-gitea/gitea/blob/cda2c38f4a61ef7f448be3efab5420d9974c8474/.drone.yml#L618-L630 I don't know much about Drone but after looking at [appleboy/drone-git-push](https://github.com/appleboy/drone-git-push)'s source code, I think each setting becomes an environment variable (e.g. `remote` to `PLUGIN_REMOTE`, `commit_message` to `PLUGIN_COMMIT_MESSAGE` etc...). Take a look at the code block loading the author info: https://github.com/appleboy/drone-git-push/blob/a69878c00665277c53fb38d6c5980221cb687935/main.go#L32-L42 Two environment variables are listed for each setting. This PR forces both to have the same value. Signed-off-by: Yarden Shoham <hrsi88@gmail.com>
* Hook go-licenses into tidy again (#21353)silverwind2022-10-101-13/+3
| | | | | | | | | Running it as part of the build is really unnecessary because we have a valid output file in the repo and assuming go dependencies do not change unless go.mod also changes, tidy really is the best target to run the license generation after. Also, regenerate the file as I missed to do so during the chroma update, and mark all json files in assets as generated.
* Update JS dependencies and eslint config (#21388)silverwind2022-10-101-1/+1
| | | | | | | | - Update all JS dependencies and playwright image - Add new eslint rules, enable a few more, fix issues - Regenerate SVGs - Tested Vue and Swagger Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Bump playwright to 1.26.1 (#21357)Kyle D2022-10-081-1/+1
|
* Update go to 1.19 (#21361)zeripath2022-10-061-1/+1
| | | | | | | It appears that updating go to 1.19 for playwright was missed when we updated to go 1.19 elsewhere. Signed-off-by: Andrew Thornton <art27@cantab.net>
* chore(security): Support Go Vulnerability Management (#21139)Bo-Yi Wu2022-09-111-0/+10
| | | | | | | See https://go.dev/security/vuln/ Signed-off-by: Bo-Yi.Wu <appleboy.tw@gmail.com> Signed-off-by: Bo-Yi.Wu <appleboy.tw@gmail.com>
* Generate go-licenses during tidy again (#21108)silverwind2022-09-091-4/+14
| | | | | | | | | | | | | | We can not have the `frontend` target depend on golang because of they way drone is set up. Move the `go-licenses` generation back into `tidy` where it will now also be checked for consistency during `tidy-check`. (I assume all `main` branch builds should currently fail [like this](https://drone.gitea.io/go-gitea/gitea/60244/1/11)). The reasony why it shouldn't be treated the same as for example `go generate` is because output files are checked in. tidy is imho the optimal target to run this after. Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Rewrite go license generator in go (#21078)silverwind2022-09-071-3/+0
| | | | | | | | | | This removes the JS dependency in the checks pipeline. JSON output is different because the previous JS did indent the license data differently and a JSON key was changed, but the end result is the same as it gets re-indented by wepack. Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: zeripath <art27@cantab.net>
* Bump playwright test image to match version in package.json (#21097)Kyle D2022-09-071-1/+1
| | | | Bump the playwright test image to match version in package.json (so it doesn't re-download browsers setup)
* Add missing volume to test-e2e (#21079)silverwind2022-09-051-0/+3
| | | Without it, the deps-backend step before is useless as `go test` will not see the files in GOPATH and re-download them.
* Add go licenses to licenses.txt (#21034)silverwind2022-09-041-2/+7
| | | | | | | `make go-licenses` will generate `assets/go-licenses.json` which is then included in the webpack build. This step depends on both go and node being present, so unfortunately, I could not automate the generation by hooking it up to `tidy` as that target is triggered on CI where we do not have a docker image with both go an node. It should be ran from time to time, ideally after each go mod update.
* Kd/ci playwright go test (#20123)Kyle D2022-09-021-0/+69
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add initial playwright config * Simplify Makefile * Simplify Makefile * Use correct config files * Update playwright settings * Fix package-lock file * Don't use test logger for e2e tests * fix frontend lint * Allow passing TEST_LOGGER variable * Init postgres database * use standard gitea env variables * Update playwright * update drone * Move empty env var to commands * Cleanup * Move integrations to subfolder * tests integrations to tests integraton * Run e2e tests with go test * Fix linting * install CI deps * Add files to ESlint * Fix drone typo * Don't log to console in CI * Use go test http server * Add build step before tests * Move shared init function to common package * fix drone * Clean up tests * Fix linting * Better mocking for page + version string * Cleanup test generation * Remove dependency on gitea binary * Fix linting * add initial support for running specific tests * Add ACCEPT_VISUAL variable * don't require git-lfs * Add initial documentation * Review feedback * Add logged in session test * Attempt fixing drone race * Cleanup and bump version * Bump deps * Review feedback * simplify installation * Fix ci * Update install docs
* Switch to building with go1.19 (#20695)techknowlogick2022-08-071-13/+13
|
* Unbreak release pipeline (#20356)silverwind2022-07-141-2/+4
| | | | | | Downgrade release pipeline to node 16 until xgo updates its base OS to a version with a compatible glibc. Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Upgrade to Node 18 on CI (#20340)silverwind2022-07-131-9/+9
| | | | | | | | | * Upgrade to Node 18 on CI Should be pretty stable now. * restart ci Co-authored-by: 6543 <6543@obermui.de>
* Use Golang 1.18 for Gitea 1.17 release (#19918)wxiaoguang2022-06-101-1/+1
| | | | | | | Use Golang 1.18 (as minimal requirement) for Gitea 1.17 release, make sure the Golang version is still actively supported during Gitea 1.17 lifecycle. Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: 6543 <6543@obermui.de>
* Increment tests time out from 40m to 50m because sometimes the machine is ↵Lunny Xiao2022-06-051-3/+3
| | | | slow (#19887)
* Set safe dir for git operations in .drone.yml CI (#19641)techknowlogick2022-05-061-0/+10
| | | | | Our drone by necessity runs on git repositories not owned by the drone process. Unfortunately this means that git operations and thence CI builds will fail without the `safe.directory` option being set. See: https://drone.gitea.io/go-gitea/gitea/54632/2/8
* Use goproxy.io instead of goproxy.cn (#19242)Lunny Xiao2022-03-281-32/+32
|
* use go1.18 to build gitea (#19099)techknowlogick2022-03-161-13/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* Use `go run` for tool dependencies, require go 1.17 (#18874)silverwind2022-03-151-2/+11
| | | | | | | | | | This ensures the tools only run in the versions we've tested and it also does not polute PATH with those tools so they are truly isolated. This syntax of `go run` requires go 1.17, so the minimum version is set accordingly. Fixes: https://github.com/go-gitea/gitea/issues/18867 Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* allow overwrite artifacts for github releases (#18987)65432022-03-031-1/+2
|
* Reduce CI go module downloads, add make targets (#18708)silverwind2022-02-121-61/+194
| | | | | | | | | | | | | The CI currently downloads all go modules in each pipeline step because go modules reside outside the project directory. Fix this by introducing a volume for the `/go` directory [1] so modules are only downloaded once per pipeline using a new `deps-backend` make target. For completeness, I also included new `deps` and `deps-frontend` targets and the frontend one is also triggered explicitly on CI where needed. [1] https://docs.drone.io/pipeline/kubernetes/examples/language/golang/#dependencies
* Fix pushing to 1-x-dev docker tag (#18578)zeripath2022-02-031-0/+127
| | | | | | | | | | | | | | | | | | | | | | | | | | * Fix pushing to 1-x-dev docker tag It appears that #18551 and #18573 have a mistake in that raymond does not have an {{else}} on {{#equal}}. This PR notes that Sprig has a hasPrefix function and so we use this with another if. Signed-off-by: Andrew Thornton <art27@cantab.net> * Fix pushing to 1-x-dev docker tag (part 2) Although we now have the manifest working, we need to create the images. Here we adjust the .drone.yml to force building of the images Signed-off-by: Andrew Thornton <art27@cantab.net> * Fix pushing to 1-x-dev docker tag OK now we have the images building we should make sure that the main ones stays dev and the release/v* ones become *-dev-* Signed-off-by: Andrew Thornton <art27@cantab.net> * Apply suggestions from code review
* Make docker gitea/gitea:v1.16-dev etc refer to the latest build on that ↵zeripath2022-02-031-0/+1
| | | | | | | | | | | | | | | | branch (#18551) * Make docker gitea/gitea:v1.16-dev etc refer to the latest build on that branch One of the problems with our current docker tagging is that although we have strict version tags, latest and dev we do not have a way for docker users to track the current release branch. This PR simply suggests that we use the 1.x-dev tag for these and we build and push these. This will give users who want or need unreleased bug fixes the option of tracking the pre-release version instead of simply jumping to dev. Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: KN4CK3R <admin@oldschoolhack.me> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* point to s3 endpoint directly (#18497)techknowlogick2022-01-311-3/+3
| | | Co-authored-by: 6543 <6543@obermui.de>
* upload to github & s3 at same time (#18475)techknowlogick2022-01-301-0/+4
|
* use next gen codecov uploader (#18443)65432022-01-301-1/+1
|
* Remove golang vendored directory (#18277)techknowlogick2022-01-141-24/+24
| | | | | | | * rm go vendor * fix drone yaml * add to gitignore
* no need for docker image mirror (#18031)techknowlogick2021-12-191-18/+0
| | | Co-authored-by: zeripath <art27@cantab.net>
* update xgo to use 1.17 (#17915)techknowlogick2021-12-051-2/+2
|
* Prepare and check test env during CI (#17725)wxiaoguang2021-11-191-14/+34
| | | | | | | | | | 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
* Add protection to disable Gitea when run as root (#17168)techknowlogick2021-10-071-3/+21
| | | | Co-authored-by: delvh <dev.lh@web.de> Co-authored-by: 6543 <6543@obermui.de>
* CI: migrate from 'plugins/s3:1' to 'woodpeckerci/plugin-s3:latest' (#17234)65432021-10-061-3/+3
| | | | - 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
* CI: rm unit-test-race step since its now coverd by unit-test too (#16856)65432021-08-291-11/+0
| | | Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>