Commit graph

519 commits

Author SHA1 Message Date
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
qwerty287 ff1f51d6a9
Rename engine to backend (#2950)
rename based on https://woodpecker-ci.org/docs/usage/terminiology

---------

Co-authored-by: 6543 <6543@obermui.de>
2023-12-14 19:20:47 +01:00
qwerty287 360b41f961
Remove separate root path config (#2943) 2023-12-13 15:51:18 +01:00
Robert Kaussow 6de5922408
Fix skipped pipelines model (#2923)
Fixes: https://github.com/woodpecker-ci/woodpecker/issues/2901

---------

Co-authored-by: Lauris BH <lauris@nix.lv>
2023-12-12 22:30:52 +02:00
runephilosof-karnovgroup adb2c82790
Update go module path for major version 2 (#2905)
https://go.dev/doc/modules/release-workflow#breaking

Fixes https://github.com/woodpecker-ci/woodpecker/issues/2913 fixes
#2654
```
runephilosof@fedora:~/code/platform-woodpecker/woodpecker-repo-configurator (master)$ go get go.woodpecker-ci.org/woodpecker@v2.0.0
go: go.woodpecker-ci.org/woodpecker@v2.0.0: invalid version: module contains a go.mod file, so module path must match major version ("go.woodpecker-ci.org/woodpecker/v2")
```

---------

Co-authored-by: qwerty287 <80460567+qwerty287@users.noreply.github.com>
2023-12-08 08:15:08 +01:00
qwerty287 7bacbd5699
Migrate to Xormigrate (#2711)
Co-authored-by: Anbraten <anton@ju60.de>
2023-11-28 10:31:54 +01:00
Michalis Zampetakis 981384b79a
Change PullRequest Index to ForgeRemoteID / string type (#2823)
Co-authored-by: Patrick Schratz <patrick.schratz@gmail.com>
Co-authored-by: qwerty287 <80460567+qwerty287@users.noreply.github.com>
Co-authored-by: Anbraten <anton@ju60.de>
2023-11-26 00:52:52 +01:00
qwerty287 342b25826c
Rename link to url (#2812)
As of https://woodpecker-ci.org/docs/next/usage/terminiology#conventions
2023-11-14 17:12:12 +01:00
qwerty287 fd77b2e9d7
Fix repo owner filter (#2808)
and move to server config instead of middleware

cc @xoxys 

closes #2784
2023-11-12 14:39:41 +01:00
6543 5a7b689e30
Switch to go vanity urls (#2706)
Co-authored-by: Anbraten <anton@ju60.de>
2023-11-07 08:04:33 +01:00
qwerty287 d284aeb545
Fix default status (#2715)
Regression #2695

probably closes #2716
2023-11-03 13:00:34 +01:00
Anbraten 5ff006614f
Enhance linter and errors (#1572)
Co-authored-by: 6543 <m.huber@kithara.com>
Co-authored-by: qwerty287 <80460567+qwerty287@users.noreply.github.com>
2023-11-03 11:44:03 +01:00
Thomas Anderson 3620c84da4
Unregister stateless agents from server on termination (#2606)
Closes #2027

---------

Co-authored-by: 6543 <6543@obermui.de>
2023-11-02 01:53:47 +02:00
qwerty287 abb2f280eb
Unique status for matrix (#2695)
implement this fix but with an additional field on workflows to not
change the workflow name

closes #1840 
closes #713

---------

Co-authored-by: 6543 <6543@obermui.de>
2023-11-01 17:28:02 +01:00
6543 ebe0307c6b
Let the backend engine report the current platform (#2688)
if you run woodpecker-agent on windows and connect it to an docker
daemon, there could be two different platforms possible, as you can
switch from linux to windows mode and visa versa


---
*Sponsored by Kithara Software GmbH*
2023-11-01 15:38:37 +01:00
runephilosof-karnovgroup 4647e64f13
Report problems with listening to ports and exit (#2102)
Co-authored-by: qwerty287 <80460567+qwerty287@users.noreply.github.com>
Co-authored-by: Anbraten <anton@ju60.de>
2023-11-01 11:44:08 +01:00
qwerty287 e74115027b
Add some tests (#2652)
and some cleanups
2023-10-28 13:37:54 +02:00
qwerty287 aeb7bcb26a
Remove WOODPECKER_DOCS config (#2647) 2023-10-25 15:05:19 +02:00