Commit graph

536 commits

Author SHA1 Message Date
Dan 6132136d55
Fix oauth file envvars (#3726)
Co-authored-by: Anbraten <6918444+anbraten@users.noreply.github.com>
2024-05-27 11:22:31 +02:00
6543 42f2734308
cspell lint go code (#3706) 2024-05-24 22:35:04 +02:00
renovate[bot] 37ea906958
fix(deps): update golang-packages (#3713)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: qwerty287 <qwerty287@posteo.de>
2024-05-23 17:37:21 +02:00
Anbraten 5527d9bf86
Cleanup server env settings (#3670)
Co-authored-by: Robert Kaussow <mail@thegeeklab.de>
Co-authored-by: Robert Kaussow <xoxys@rknet.org>
2024-05-15 15:45:08 +02:00
Robert Kaussow 89e100cfd1
Add godot linter to harmonitze toplevel comments (#3650) 2024-05-13 22:58:21 +02:00
6543 378ec1a67a
Make retry count of config fetching form forge configure (#3699)
Co-authored-by: qwerty287 <80460567+qwerty287@users.noreply.github.com>
2024-05-13 19:43:45 +02:00
Fernando Barbosa e6bda2c2b3
Support github deploy task (#3512)
Co-authored-by: qwerty287 <80460567+qwerty287@users.noreply.github.com>
2024-05-02 18:56:19 +02:00
Anbraten dbd91d3884
Cleanup api docs and ts api-client options (#3663) 2024-05-01 11:50:41 +02:00
Robert Kaussow d0057736f1
Add DeletePipeline API (#3506)
This is just a first step, the final goal is to have an API endpoint to
prune Repo Pipelines older than the given date.

@woodpecker-ci/maintainers Can I get some feedback if this is the right
direction?

---------

Co-authored-by: 6543 <m.huber@kithara.com>
2024-04-25 10:59:17 +02:00
Robert Kaussow 9972c24924
Add filter options to GetPipelines API (#3645)
Separate this change from
https://github.com/woodpecker-ci/woodpecker/pull/3506

I would like to get at least this change into v2.5.0 if possible.

---------

Co-authored-by: qwerty287 <80460567+qwerty287@users.noreply.github.com>
2024-04-25 09:37:42 +02:00
Anbraten d494b6a959
Use forge from db (#1417)
This is the first step towards support for multiple forges (#138). It
inserts a forge using the currently existing env varaibles into db and
uses this forge from db later on in all places of the code.

closes #621

addresses #138 

# TODO
- [x] add forges table
- [x] add id of forge to repo
- [x] use forge of repo
- [x] add forge from env vars to db if not exists
- [x] migrate repo.ForgeID to the newly generated forge
- [x] support cache with forge from repo
- [x] maybe add forge loading cache? (use LRU cache for forges, I expect
users to have less than 10 forges normally)

---------

Co-authored-by: qwerty287 <80460567+qwerty287@users.noreply.github.com>
2024-04-16 08:04:55 +02:00
qwerty287 00f0fcd416
Rework addons (use rpc) (#3268)
Co-authored-by: Anbraten <6918444+anbraten@users.noreply.github.com>
2024-04-15 10:04:21 +02:00
Thomas Anderson b8763a8f34
Step logs removing API and Button (#3451)
Closes #3444
closes #1272

---

Admin:
![Screenshot 2024-02-27
1](https://github.com/woodpecker-ci/woodpecker/assets/127358482/285b2daa-9a37-4bd8-a11e-c4b7ced20e5a)
![Screenshot 2024-02-27
2](https://github.com/woodpecker-ci/woodpecker/assets/127358482/891ff2f8-71b5-4687-80a7-e3e4b1cb4e41)
![Screenshot 2024-02-27
3](https://github.com/woodpecker-ci/woodpecker/assets/127358482/362dbfe9-ac63-4be4-a4bb-f4e5140d54a5)

User:
![Screenshot 2024-02-27
4](https://github.com/woodpecker-ci/woodpecker/assets/127358482/b2f3db6b-5ec3-4e06-a508-61dd07a69d60)
2024-04-15 01:50:50 +02:00
qwerty287 eaf10611eb
Allow to disable deployments (#3570)
…but if they're enabled, allow for all events. Also add warning that you
should only enable it if you trust the users with push access.

closes #3559

---------

Co-authored-by: Robert Kaussow <xoxys@rknet.org>
2024-04-02 22:03:37 +02:00
Aumetra Weisman 20b84a1aee
Add flag to only access public repositories on GitHub (#3566) 2024-03-29 14:36:48 +01:00
qwerty287 326069c983
Fix flag name (#3534)
and remove two unused flags

should close https://github.com/woodpecker-ci/woodpecker/issues/3528
2024-03-21 21:39:16 +01:00
qwerty287 fbdfa14a00
Allow separate gitea oauth URL (#3513)
closes https://github.com/woodpecker-ci/woodpecker/issues/3470

---------

Co-authored-by: Robert Kaussow <xoxys@rknet.org>
2024-03-21 11:37:02 +01:00
Robert Kaussow a779eed3df
Enable golangci linter gomnd (#3171) 2024-03-15 18:00:25 +01:00
zowhoey ad507d8ee4
Move generic agent flags to cmd/agent/core (#3484) 2024-03-15 11:31:35 +01:00
Anbraten 03c891eb93
Cli setup command (#3384)
Co-authored-by: Robert Kaussow <xoxys@rknet.org>
2024-03-13 11:08:22 +01:00
smainz 65a429d24a
Fix usage of WOODPECKER_DATABASE_DATASOURCE_FILE (#3404)
fixes #3389

Set variable to let server detect if it's deployed within a container
image.
Set the default database connection based on this.

---------

Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: Anbraten <6918444+anbraten@users.noreply.github.com>
2024-02-26 20:12:41 +01:00
Thor Anker Kvisgård Lange 364d708923
Add bitbucket datacenter (server) support (#2503)
This pull-requests re-introduces the Bitbucket Server support with a
more or less complete rewrite of the forge implementation. We have a lot
of on-premises git repositories hosted in Bitbucket Server and need a CI
solution for running that and Woodpecker looks promising.

The implementation is based on external Bitbucket Server REST client
library which we are maintaining and have created in another context.
Besides the original support for Bitbucket the re-implementation also
adds support for handling Bitbucket pull-request events.
2024-02-20 15:58:02 +01:00
Anbraten 30b92edc99
Cli updater (#3382) 2024-02-19 09:16:27 +01:00
Robert Kaussow 6abeff0165
Remove empty strings from slice before parsing agent config (#3387)
Fixes: https://github.com/woodpecker-ci/woodpecker/issues/3385
2024-02-14 23:22:31 +01:00
Anbraten 82e1ce937c
Refactor internal services (#915) 2024-02-11 18:42:33 +01:00
qwerty287 f369d2c543
Lint for event filter and deprecate exclude (#3222)
Closes https://github.com/woodpecker-ci/woodpecker/discussions/2174

- return bad habit error if no event filter is set
- If this is applied, it's useless to allow `exclude`s on events.
Therefore, deprecate it together with `include`s which should be
replaced by `base.StringOrSlice` later.
2024-02-10 17:33:05 +01:00
Anbraten 6785806873
Fix backend detection (#3353)
closes #3352
2024-02-09 00:04:43 +01:00
qwerty287 f92f8b17a3
Make agent usable for external backends (#3270) 2024-02-08 16:33:22 +01:00
qwerty287 9df572ef31
Add release event trigger (#3226)
Supersedes #764 

Bitbucket does not support release webhooks.

---------

Co-authored-by: Patrick Schratz <patrick.schratz@gmail.com>
2024-01-30 17:39:00 +01:00
qwerty287 5e2f7d81b3
Clean up models (#3228) 2024-01-22 07:56:18 +01:00
qwerty287 b82790d54c
Remove some interfaces (#3220) 2024-01-19 16:20:35 +01:00
qwerty287 001b5639a6
Use assert for test (#3201)
instead of `if`s
2024-01-14 19:33:58 +01:00
qwerty287 b9f6f3f9fb
Replace goimports with gci (#3202)
`gci` seems to be much more strict.
2024-01-14 18:22:06 +01:00
Robert Kaussow f813badcf9
Enable golangci linter contextcheck (#3170)
Split out from https://github.com/woodpecker-ci/woodpecker/pull/2960
2024-01-11 22:15:15 +01:00
qwerty287 b0a2b1cf2d
Lowercase all log strings (#3173)
from #3161

---------

Co-authored-by: 6543 <6543@obermui.de>
2024-01-11 19:17:07 +01:00
qwerty287 00df53e941
Clean up logging (#3161)
- use `Err` method instead of format strings
- use `Msg` if no format string is used
2024-01-10 20:57:12 +01:00
qwerty287 12c40eb957
Enable gocritic and don't ignore globally (#3159)
Use `nolint` directives instead.

From #2960
2024-01-10 15:34:44 +01:00
qwerty287 f3420716ab
Fix startup panic (#3160)
introduced by #3129
2024-01-10 13:50:49 +01:00
qwerty287 768fd71841
Enable some linters (#3129)
Mostly those that did not require much work.

From #2960

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-01-09 21:35:37 +01:00
qwerty287 0c05c38ddd
Move cmd/common to shared (#3092) 2023-12-31 23:29:56 +01:00
6543 74f6824d03
Add option to disable version check in admin web UI (#3040)
Co-authored-by: qwerty287 <80460567+qwerty287@users.noreply.github.com>
2023-12-27 22:16:15 +01:00
qwerty287 e575ffe72d
Add some tests (#3030) 2023-12-27 10:36:49 +01:00
Anbraten f01ac3f0a3
Add pull request closed event (#2684)
- [x] updates docs
- [x] adjust UI
  - [x] show correct icon
  - [x] show correct link (to pr)
  - [x] add as option in secret edit
- [x] parse webhook
- [x] update tests
  - [x] github merged
  - [x] github closed
  - [x] gitea merged
  - [x] gitea closed
  - [x] bitbucket merged
  - [x] bitbucket closed
  - [x] gitlab merged
  - [x] gitlab closed

closes #286
2023-12-26 19:22:52 +01:00
Patrick Schratz df73d2c475
Document WOODPECKER_LOG_FILE (#3022)
Missed from #2115 

Also rephrased the description a bit.

---------

Co-authored-by: qwerty287 <80460567+qwerty287@users.noreply.github.com>
2023-12-26 11:18:05 +01:00
6543 3f1f563180
fix and lint swagger file (#3007)
Co-authored-by: qwerty287 <ndev@web.de>
2023-12-24 15:50:01 +01:00
qwerty287 04d1f9ff5f
Support more addon types (#2984)
Actually support all types that can be possible.

Closes https://github.com/woodpecker-ci/woodpecker/discussions/2520
2023-12-24 13:26:23 +01:00
qwerty287 9d9bcbf363
Hide PR tab if PRs are disabled (#3004)
Closes https://github.com/woodpecker-ci/woodpecker/issues/2988
2023-12-24 11:04:18 +02:00
qwerty287 dfc2c265b1
Support go plugins for forges and agent backends (#2751)
As of #2520 

Support to load new forges and agent backends at runtime using go's
plugin system. (https://pkg.go.dev/plugin)

I also added a simple example addon (a new forge which just prints log
statements), it should be removed later of course, but you can see an
example.

---------

Co-authored-by: Michalis Zampetakis <mzampetakis@gmail.com>
Co-authored-by: Anbraten <anton@ju60.de>
2023-12-20 14:26:57 +01:00
6543 2e7610379e
Update slogan & logo (#2962)
- Update woodpecker slogan to repo too
  we are not just a simple fork anymore 🎉
- use https://github.com/woodpecker-ci/design/blob/main/logo/non-square.svg
2023-12-19 14:12:18 +01:00
Anbraten 16803d6217
Show secrets from org and global level (#2873)
Co-authored-by: qwerty287 <80460567+qwerty287@users.noreply.github.com>
2023-12-16 10:29:13 +01:00