1
0
mirror of https://codeberg.org/crowci/crow.git synced 2025-08-06 09:22:46 +03:00
Commit Graph

250 Commits

Author SHA1 Message Date
Jack Gleeson
918f41ddc0 Add default option for allowing pull requests on repositories (#4873) 2025-02-23 18:22:43 +01:00
pat-s
901a614246 feat: add log purge setting as repo setting (#34)
follow-up #10 (which was a git hickup)

![image](/attachments/a7655406-b492-4912-873b-d3d6f692be9e)

![image](/attachments/fe365dce-65dd-40cc-aeb8-3d9ca95a52ad)

## Behaviour

Log purging is attempted in an asynchronous process before a new pipeline of a specific repo is started.
It does so by

1. Getting all existing pipelines
2. Filtering by `keepMin` and `keepDuration` settings
3. Calling `LogDelete` for all remaining pipelines

Deleting only logs instead of the full pipeline (which `crow-cli pipeline purge` does) is preferred to keep historic pipeline information. Storing this in the DB is just a single line and doesn't contain much content (in contrast to logs).

## Defaults

- No minimum count is kept (`CROW_DEFAULT_LOGS_PIPELINES_KEEP_MIN`)
- All pipelines of the last 90 days (per repo) are kept (`CROW_DEFAULT_LOGS_KEEP_DURATION`)

## Todo

- [x] implement purge call during pipeline start
- [x] add settings to DB column and repo settings
- [x] tests
- [x] think about defaults
- [x] Currently the purge happens on all pipelines in scope, including ones which have already been cleared. To avoid these unnecessary calls, which also will add up for repos with many pipelines, an indicator is needed which allows filtering these pipelines out.

fix #9

Co-authored-by: crowci-bot <admin@crowci.dev>
Reviewed-on: https://codeberg.org/crowci/crow/pulls/34
Co-authored-by: pat-s <patrick.schratz@gmail.com>
Co-committed-by: pat-s <patrick.schratz@gmail.com>
2025-02-19 21:19:13 +00:00
pat-s
a554f93226 refactor: frontend error handler & notification system (#56)
- Use title and message in error message
- Errors: don't auto-remove popup, force click
- Show API method and endpoint in error message title
- Use black/white bg and notification type color only on the side
- Return errors as JSON instead of strings. Include the api endpoint in the error message.
- improve error messages when missing access token
- improve pipeling config load error messages
- Error messages are shown for 9s (instead of 3)
- remove custom `notifyError` function
- Increase popup width from 300px to 340px

Co-authored-by: crowci-bot <admin@crowci.dev>
Co-authored-by: Anbraten <6918444+anbraten@users.noreply.github.com>
Co-authored-by: qwerty287 <80460567+qwerty287@users.noreply.github.com>
Reviewed-on: https://codeberg.org/crowci/crow/pulls/56
Co-authored-by: pat-s <patrick.schratz@gmail.com>
Co-committed-by: pat-s <patrick.schratz@gmail.com>
2025-02-19 16:04:31 +00:00
Lauris BH
b829fc2f3b feat: Optimize repository list loading to return also latest pipeline info (#4814) 2025-02-10 10:43:12 +01:00
pat-s
7673d5253f refactor: migrate import paths from github to codeberg 2025-01-31 14:57:57 +01:00
pat-s
54bda8cd7e chore: rename 'bad_habit' to 'Best practice' 2025-01-21 22:55:28 +01:00
pat-s
d628db511a chore: support both woodpecker.sqlite and crow.sqlite 2025-01-20 19:59:31 +01:00
pat-s
4c4c01e6f5 refactor: more env var changes and renamings 2025-01-19 16:22:04 +01:00
pat-s
81d89cc79f fix: grpc renamings 2025-01-19 13:41:56 +01:00
Patrick Schratz
f262ab5c08 refactor: add CROW_ vars (#21) 2025-01-19 13:01:18 +01:00
Patrick Schratz
8662981d65 rebrand (#20) 2025-01-18 17:36:17 +01:00
Patrick Schratz
38f39eeede refactor: use .crow (#8) 2025-01-18 01:23:51 +01:00
Patrick Schratz
5e0dc2688f refactor: use own import paths (#5) 2025-01-17 00:36:19 +01:00
qwerty287
97d24ee1c9 Remove deprecated API field (#4676) 2025-01-08 16:40:53 +01:00
qwerty287
7d64138855 Do not start metrics collector if metrics are disabled (#4667) 2025-01-05 13:46:08 +02:00
qwerty287
7c31bcf327 Revert volumes/network list (#4656)
Co-authored-by: Robert Kaussow <xoxys@rknet.org>
Co-authored-by: Patrick Schratz <patrick.schratz@gmail.com>
2025-01-04 11:56:26 +01:00
qwerty287
fdfabe6368 Support Git as only VCS (#4346)
Co-authored-by: Patrick Schratz <patrick.schratz@gmail.com>
2024-12-27 22:49:19 +01:00
qwerty287
81b74025d4 Update Go imports paths (#4605)
Co-authored-by: Robert Kaussow <mail@thegeeklab.de>
2024-12-22 10:44:34 +01:00
qwerty287
b4f5d625c6 Don't log DB passwords (#4583)
Co-authored-by: Robert Kaussow <mail@thegeeklab.de>
2024-12-18 15:46:36 +01:00
qwerty287
355ebcd508 Drop native Let's Encrypt support (#4541) 2024-12-09 18:54:36 +01:00
Robert Kaussow
289239d1b3 Add status filter to list pipeline API (#4494) 2024-12-01 05:35:05 +01:00
6543
52fb493495 Add filter to list repository pipelines API (#4416) 2024-11-28 22:33:52 +01:00
6543
3da4240c45 Trim space to all config flags that allow to read value from file (#4468) 2024-11-28 10:44:41 +02:00
qwerty287
5bb7cef08b Allow to set custom trusted clone plugins (#4352)
Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: Thomas Anderson <127358482+zc-devs@users.noreply.github.com>
Co-authored-by: Anbraten <6918444+anbraten@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-11-26 14:27:05 +01:00
Anbraten
07c8765b72 Cleanup openapi generation (#4331)
Co-authored-by: oauth <woodpecker-bot@obermui.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-11-23 09:17:19 +01:00
Patrick Schratz
196e2b6acf Improve project settings descriptions (#4410)
Co-authored-by: Robert Kaussow <mail@thegeeklab.de>
Co-authored-by: qwerty287 <80460567+qwerty287@users.noreply.github.com>
Co-authored-by: Anbraten <anton@ju60.de>
Co-authored-by: Anbraten <6918444+anbraten@users.noreply.github.com>
Co-authored-by: 6543 <6543@obermui.de>
2024-11-22 09:28:41 +01:00
Anbraten
5e2fa8164b Extend approval options (#3348) 2024-11-18 14:49:12 +01:00
Lauris BH
5699d22a55 Add server configuration option to add default set of labels for workflows that has no labels specified (#4326) 2024-11-14 22:23:42 +01:00
6543
04e8309e60 Add server config to disable user registered agents (#4206) 2024-11-11 18:51:14 +01:00
6543
6e38a950cd Add options to controll the database connections (open,idle,timeout) (#4212) 2024-11-05 15:03:22 +01:00
6543
3ab579c03f Move Queue creation behind new func that evaluates queue type (#4252) 2024-11-05 04:03:40 +01:00
6543
0b4654586f Add additionall error message on swagger v2 to v3 convert (#4254)
Co-authored-by: Anbraten <6918444+anbraten@users.noreply.github.com>
2024-11-02 10:32:09 +02:00
qwerty287
29474fc7d9 Split repo trusted setting (#4025) 2024-11-01 21:37:31 +01:00
Patrick Schratz
b0f52b9bc9 Correct spelling (#4279) 2024-10-29 17:43:54 +01:00
Patrick Schratz
785f2e6d6a Increase WOODPECKER_FORGE_TIMEOUT to fix config fetching for GitLab (#4262) 2024-10-27 11:21:40 +01:00
6543
f8cfda1ea9 Report custom labels set by agent admins back (#4141) 2024-10-06 17:13:41 +02:00
6543
febb8c5276 Implement org/user agents (#3539) 2024-09-30 12:33:16 +01:00
6543
6ad20ced5b Move docker resource limit settings from server to agent (#3174)
so you can set it per agent and not per server
2024-09-26 16:56:59 +01:00
6543
fcc57dfc38 Replay pipeline using cli exec by downloading metadata (#4103)
Co-authored-by: Anbraten <6918444+anbraten@users.noreply.github.com>
2024-09-25 07:20:51 +02:00
6543
4289853322 Fail gracefully on grpc listening error (#4118) 2024-09-16 19:40:09 +03:00
6543
41b2127e04 Don't expose task data via api (#4108) 2024-09-14 22:40:12 +02:00
6543
32d1ec7cec Remove all default privileged plugins (#4053) 2024-09-02 10:41:20 +02:00
6543
3c8204a0e0 Allow alter trusted clone plugins and filter them via tag (#4074) 2024-09-01 20:41:10 +02:00
6543
e4f954ef94 Remove all default 3rd party privileged plugins (#3918) 2024-08-31 19:04:47 +02:00
qwerty287
2081ca85db Refactor JSON and SDK fields (#3968) 2024-08-07 10:49:03 +02:00
Patrick Schratz
106b6e01c0 Overhaul README (#3995) 2024-08-05 01:27:25 +02:00
qwerty287
111eb7ef48 Fix dropped env vars (#3969)
Co-authored-by: 6543 <6543@obermui.de>
2024-07-25 17:17:09 +02:00
6543
659e925d0e Remove WOODPECKER_DEV_OAUTH_HOST and WOODPECKER_DEV_GITEA_OAUTH_URL (#3961)
Co-authored-by: qwerty287 <80460567+qwerty287@users.noreply.github.com>
2024-07-23 14:25:39 +02:00
6543
cd5f6f71a2 Migrate to github.com/urfave/cli/v3 (#2951) 2024-07-18 01:26:35 +02:00
6543
8aa3e5ec82 Disalow to set arbitrary environments for plugins (#3909) 2024-07-14 14:35:19 -07:00