Commit graph

126 commits

Author SHA1 Message Date
Anbraten
918985c508
Add timestamp for last work done by agent (#3844) 2024-07-01 10:34:47 -07:00
Anbraten
2fa9432ef8
Cleanup state reporting (#3850) 2024-07-01 11:20:55 +02:00
qwerty287
92cd0d04a3
Unify DB tables/columns (#3806)
Co-authored-by: Anbraten <6918444+anbraten@users.noreply.github.com>
2024-06-27 09:32:06 +02:00
Anbraten
fbb96ff8f5
Add api for forges (#3733) 2024-06-20 13:08:54 +02:00
qwerty287
91b122e1ce
Native forgejo support (#3684)
Co-authored-by: Robert Kaussow <xoxys@rknet.org>
Co-authored-by: John Olheiser <john.olheiser@gmail.com>
2024-06-01 11:23:19 +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
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
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
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
Robert Kaussow
a779eed3df
Enable golangci linter gomnd (#3171) 2024-03-15 18:00:25 +01:00
qwerty287
cb3efd2cd9
Simplify store interfaces (#3437)
Use `store.Store` interface if possible.
2024-02-25 10:37:10 +01:00
Anbraten
82e1ce937c
Refactor internal services (#915) 2024-02-11 18:42:33 +01:00
qwerty287
e1521ef460
Set correct link for commit (#3368)
Closes https://github.com/woodpecker-ci/woodpecker/issues/2657
Closes https://github.com/woodpecker-ci/woodpecker/issues/906
2024-02-11 10:44:50 +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
2eec1ce909
Fix agent updating (#3287) 2024-01-28 12:29:56 +01:00
Lukas
94b882fb95
Add spellcheck config (#3018)
Part of #738 

```
pnpx cspell lint --gitignore '{**,.*}/{*,.*}'
```

---------

Co-authored-by: Anbraten <anton@ju60.de>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: 6543 <6543@obermui.de>
2024-01-27 21:15:10 +01:00
Anbraten
0b5eef7d1e
Improve secret availability checks (#3271) 2024-01-27 20:59:44 +01:00
qwerty287
5e2f7d81b3
Clean up models (#3228) 2024-01-22 07:56:18 +01:00
6543
7b29d1da49
Make PipelineConfig unique again (#3215)
fix https://github.com/woodpecker-ci/woodpecker/issues/3093

reverts https://github.com/woodpecker-ci/woodpecker/pull/3128
2024-01-18 23:50:29 +02:00
qwerty287
001b5639a6
Use assert for test (#3201)
instead of `if`s
2024-01-14 19:33:58 +01:00
Robert Kaussow
7756c60a33
Enable golangci linter stylecheck (#3167)
This PR only fixes error string formatting, log message strings are
still mixed upper/lowercase (see
https://github.com/woodpecker-ci/woodpecker/pull/3161#issuecomment-1885140649)
and I'm not aware of a linter to enforce it.
2024-01-10 22:56:42 +01:00
qwerty287
106508a094
Make config linking non-unique (#3128)
closes https://github.com/woodpecker-ci/woodpecker/issues/3093
2024-01-07 16:12:27 +01:00
qwerty287
ef1d286596
Allow PR secrets to be used on close (#3084)
closes https://github.com/woodpecker-ci/woodpecker/issues/3071

1. If a secret can be used on PRs, it can also be used on PR close.
2. If no events are set, disallow access to secret. This was different
before, secrets without any event set were allowed for all events.
3. Compare strings instead of patterns.

---------

Co-authored-by: 6543 <6543@obermui.de>
2023-12-31 21:43:24 +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
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
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
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
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
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
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
Jannik Heuer
0fbf8cfc85
Fix secret image filter regex (#2674) 2023-10-31 13:15:13 +01:00
qwerty287
e74115027b
Add some tests (#2652)
and some cleanups
2023-10-28 13:37:54 +02:00
Anbraten
f44aa8a6fd
Remove plugin-only option from secrets (#2213) 2023-10-24 20:38:47 +02:00
qwerty287
22dfd2ef62
Refactor pipeline parsing and forge refreshing (#2527)
- refactor pipeline parsing
- do not parse the pipeline multiple times to perform filter checks, do
this once and perform checks on the result directly
    - code deduplication
- refactor forge token refreshing
    - move refreshing to a helper func to reduce code

---------

Co-authored-by: Anbraten <anton@ju60.de>
2023-10-08 14:05:06 +02:00
Sebastian P
07094558a8
fix: change config.config_data column type to longblob in mysql (#2434)
See
https://github.com/woodpecker-ci/woodpecker/pull/2418#discussion_r1320832841
for context.
2023-09-10 22:24:51 +02:00
Sebastian P
47b9dab016
Fix: change tasks.task_data column type to longblob in mysql (#2418)
Fix #2206 

Changes are copied and adapted from #1050
2023-09-10 13:33:48 +02:00
qwerty287
81ead7cbf2
Support user secrets (#2126) 2023-08-21 15:04:12 +02:00
qwerty287
4d83ea0de8
Add SSH clone URL env var (#2198)
to improve https://github.com/woodpecker-ci/plugin-git/pull/75
2023-08-12 17:39:13 +02:00
qwerty287
8cdac56d8f
Check for correct license header (#2137) 2023-08-10 11:06:00 +02:00
Anbraten
e5d5ec8b47
Use id to access orgs (#1873)
closes #1743 

fixes: setting secrets for own user namespace

- create org in database
- use orgID for org related APIs

Co-authored-by: 6543 <6543@obermui.de>
2023-07-21 19:45:32 +02:00
6543
1b646a28b4
Index stepID for logEntries so loading time decrease significantly (#2006)
speedup from 2min loading to 0.01sec :D

got missed by  #1802
2023-07-17 02:35:20 +03:00
6543
b54f6ebad6
Let pipeline-compiler export step types (#1958) 2023-07-11 15:53:05 +02:00