Commit graph

4464 commits

Author SHA1 Message Date
Neil Hanlon
a95a5b43bf
fix(backend/kubernetes): Ensure valid naming of name field (#1661)
- Kubernetes v1.26 on VKE causes error when creating persistent volume
claim because of uppercase characters in name field

This patch is trivial just in order to get it working - happy to
implement differently.

The error in question:

```
The PersistentVolumeClaim "wp-01G1131R63FWBSPMA4ZAZTKLE-0-clone-0" is invalid: metadata.name: Invalid value: "wp-01G1131R63FWBSPMA4ZAZTKLE-0-clone-0": a lowercase RFC 1123 subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character (e.g. 'example.com', regex used for validation is '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*')
```
2023-03-21 20:00:45 +01:00
Weblate
7c56d7246d Translated using Weblate (Russian)
Currently translated at 100.0% (302 of 302 strings)

Translated using Weblate (German)

Currently translated at 100.0% (302 of 302 strings)

Co-authored-by: Leonid Maslakov <root@lcomrade.su>
Co-authored-by: qwerty287 <ndev@web.de>
Translate-URL: http://translate.woodpecker-ci.org/projects/woodpecker-ci/ui/de/
Translate-URL: http://translate.woodpecker-ci.org/projects/woodpecker-ci/ui/ru/
Translation: Woodpecker CI/UI
2023-03-21 16:31:32 +00:00
qwerty287
88d2486ab2
Various UI improvements (#1663)
https://github.com/woodpecker-ci/woodpecker/issues/1314#issuecomment-1475128683

https://github.com/woodpecker-ci/woodpecker/issues/1314#issuecomment-1477858832
(2.)

and the last two tasks from
https://github.com/woodpecker-ci/woodpecker/issues/1314#issue-1418804461

---------

Co-authored-by: Anbraten <anton@ju60.de>
2023-03-21 17:31:24 +01:00
Anbraten
f13ffc2c8f
Save agent-id for tasks and add endpoint to get agent tasks (#1631)
Save which agent is running a task. This is now visible in the admin UI
in the queue and in the agent details screen.

# changes
- [x] save id of agent executing a task
- [x] add endpoint to get tasks of an agent for #999 
- [x] show assigned agent-id in queue
- [x] (offtopic) use same colors for queue stats and icons (similar to
the ones used by pipelines)
- [x] (offtopic) use badges for queue labels & dependencies


![image](https://user-images.githubusercontent.com/6918444/226541271-23f3b7b2-7a08-45c2-a2e6-1c7fc31b6f1d.png)
2023-03-21 15:10:43 +02:00
Lauris BH
46452fbd84
Update Go dependencies and minimal Go version to 1.20 (#1650)
Signed-off-by: 6543 <6543@obermui.de>
Co-authored-by: 6543 <6543@obermui.de>
2023-03-21 00:48:15 +01:00
Weblate
60733c5cb9 Translated using Weblate (Russian)
Currently translated at 100.0% (295 of 295 strings)

Translated using Weblate (German)

Currently translated at 100.0% (295 of 295 strings)

Translated using Weblate (Indonesian)

Currently translated at 100.0% (285 of 285 strings)

Translated using Weblate (Latvian)

Currently translated at 100.0% (285 of 285 strings)

Translated using Weblate (German)

Currently translated at 100.0% (285 of 285 strings)

Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: Leonid Maslakov <root@lcomrade.su>
Co-authored-by: Linerly <linerly@protonmail.com>
Co-authored-by: Weblate <noreply@weblate.org>
Co-authored-by: qwerty287 <ndev@web.de>
Translate-URL: http://translate.woodpecker-ci.org/projects/woodpecker-ci/ui/de/
Translate-URL: http://translate.woodpecker-ci.org/projects/woodpecker-ci/ui/id/
Translate-URL: http://translate.woodpecker-ci.org/projects/woodpecker-ci/ui/lv/
Translate-URL: http://translate.woodpecker-ci.org/projects/woodpecker-ci/ui/ru/
Translation: Woodpecker CI/UI
2023-03-20 20:17:56 +00:00
6543
e28b43ab19
Only inject netrc to trusted clone plugins (#1352)
Co-authored-by: qwerty287 <ndev@web.de>
Co-authored-by: 6543 <6543@obermui.de>
2023-03-20 21:17:49 +01:00
Lauris BH
7870c29f5f
Implement visual display of queue statistics (#1657)
Light mode:

![attels](https://user-images.githubusercontent.com/165205/226354030-5769ddce-3727-441a-8ecb-c6cc3cf70529.png)

Dark mode:

![attels](https://user-images.githubusercontent.com/165205/226353854-51b2da0a-b35a-4f61-bf28-e21179164a05.png)
2023-03-20 18:08:53 +01:00
Anbraten
2337f1854a
Add queue details UI for admins (#1632)
# Changes
- Adds an admin view to see the whole work-queue of the server. 
- The admin can also pause / resume the queue. 
- The view is reloading data every 5 seconds automatically.
- The task model from queue got removed in favor of the one from models.
2023-03-20 04:50:56 +01:00
Lauris BH
4d5c59556e
Update frontend dependencies (#1655)
Also fixes bug that wrong message is displayed when updating user
2023-03-20 00:07:18 +01:00
6543
ed78ba78fc
gofump don't touch code generated files (#1654)
`make format` did touch code generated files witch creates a mess from
time to time ...

this change it ...
2023-03-19 22:56:16 +01:00
6543
92614dfb1e
Agent check gRPC version against server (#1653)
close #1114

As long as the `VersionResponse` type is not changed the check will
fail/pass gracefully

example output:
```
{"level":"error","error":"GRPC version mismatch","time":"2023-03-19T19:49:09+01:00","message":"Server version next-6923e7ab does report grpc version 2 but we only understand 1"}
GRPC version mismatch
```
2023-03-19 22:42:21 +01:00
qwerty287
f582ad3159
Various enhancements in configuration (#1645)
- backends: move to cli flags instead of os.Getenv
- ssh: support 2fa with key and password
- allow to set grpc jwt secret (solves todo)
- allow to set default and max timeout (solves todo)

Closes https://github.com/woodpecker-ci/woodpecker/issues/896
Closes https://github.com/woodpecker-ci/woodpecker/issues/1131
2023-03-19 20:24:43 +01:00
6543
56e6639396
Refactor nits (#1652)
-
https://github.com/woodpecker-ci/woodpecker/pull/1641/files#r1141405630
-
ade8e6d010 (r105091268)
-
https://github.com/woodpecker-ci/woodpecker/pull/1647/files#r1141410010

---------

Co-authored-by: Anbraten <anton@ju60.de>
2023-03-19 18:32:19 +01:00
Weblate
e74c256571 Translated using Weblate (Russian)
Currently translated at 100.0% (282 of 282 strings)

Translated using Weblate (Indonesian)

Currently translated at 100.0% (282 of 282 strings)

Translated using Weblate (German)

Currently translated at 100.0% (282 of 282 strings)

Co-authored-by: Leonid Maslakov <root@lcomrade.su>
Co-authored-by: Linerly <linerly@protonmail.com>
Co-authored-by: qwerty287 <ndev@web.de>
Translate-URL: http://translate.woodpecker-ci.org/projects/woodpecker-ci/ui/de/
Translate-URL: http://translate.woodpecker-ci.org/projects/woodpecker-ci/ui/id/
Translate-URL: http://translate.woodpecker-ci.org/projects/woodpecker-ci/ui/ru/
Translation: Woodpecker CI/UI
2023-03-19 12:53:04 +00:00
qwerty287
ade8e6d010
Various fixes and improvements (#1643)
- allow repo names to be case-insensitive
- improve backend error handling on DB get errors (record not found ->
404, else -> 500)
- replace magic numbers of http response codes
- unify the look and feel of cancel / save buttons on forms and view
them in one line

---------

Co-authored-by: Lauris BH <lauris@nix.lv>
2023-03-19 13:52:58 +01:00
qwerty287
42a115e19e
Add PR pipeline list (#1641)
Instead of viewing PR pipelines in the branches lists, add a separate
list for them. The API endpoint for PRs supports pagination (thus I
added a lot of pagination-related stuff), the UI doesn't yet though.


![wp](https://user-images.githubusercontent.com/80460567/226099133-bb4935d6-c357-4d73-8465-9157e25c0d82.png)

Closes #1619 

Extends this part of #1640

---------

Co-authored-by: Anbraten <anton@ju60.de>
2023-03-19 10:43:57 +01:00
qwerty287
37dc8a46e0
Drop coding support (#1644)
Coding support is likely broken and nobody will ever fix it. Also it
looks like nobody wants to use it, otherwise we would have get some bug
reports.

---------

Co-authored-by: 6543 <6543@obermui.de>
2023-03-19 09:36:04 +01:00
qwerty287
7ddc18348f
Only grant privileged to plugins (#1646)
Closes https://github.com/woodpecker-ci/woodpecker/issues/1525

Co-authored-by: Anbraten <anton@ju60.de>
2023-03-19 03:07:10 +01:00
Weblate
51168db9fd Translated using Weblate (Russian)
Currently translated at 100.0% (264 of 264 strings)

Translated using Weblate (Indonesian)

Currently translated at 100.0% (264 of 264 strings)

Translated using Weblate (French)

Currently translated at 100.0% (264 of 264 strings)

Translated using Weblate (German)

Currently translated at 100.0% (264 of 264 strings)

Co-authored-by: Leonid Maslakov <root@lcomrade.su>
Co-authored-by: Linerly <linerly@protonmail.com>
Co-authored-by: Michael <misc+weblatewoodp@zarb.org>
Co-authored-by: qwerty287 <ndev@web.de>
Translate-URL: http://translate.woodpecker-ci.org/projects/woodpecker-ci/ui/de/
Translate-URL: http://translate.woodpecker-ci.org/projects/woodpecker-ci/ui/fr/
Translate-URL: http://translate.woodpecker-ci.org/projects/woodpecker-ci/ui/id/
Translate-URL: http://translate.woodpecker-ci.org/projects/woodpecker-ci/ui/ru/
Translation: Woodpecker CI/UI
2023-03-18 20:49:18 +00:00
Anbraten
25e2c8055c
UI improvements (#1640) 2023-03-18 21:49:12 +01:00
Anbraten
277a839157
Add users UI for admins (#1634)
Co-authored-by: Lauris BH <lauris@nix.lv>
2023-03-18 21:21:20 +01:00
Anbraten
fa5b0fb96e
Fix linter (#1647) 2023-03-18 20:35:27 +01:00
qwerty287
af2ef30205
Fix button margin if button doesn't have text (#1642) 2023-03-18 12:00:49 +01:00
Anbraten
e98601df91
Correct pipeline loading (#1639)
closes #1583
2023-03-18 06:04:53 +01:00
6543
9945e27c01
pipeline compiler: handle nil entrys in settings list (#1626)
close #1609
2023-03-17 08:54:53 +01:00
Lukas
1b43b0bf20
Add pull request labels as environment variable (#1321)
Closes #1308 

Co-authored-by: Anbraten <anton@ju60.de>
2023-03-17 03:43:04 +01:00
6543
7e3bf2202c
Return 404 if pipeline not exist and handle 404 errors in WebUI (#1627) 2023-03-17 02:10:51 +01:00
Anbraten
1947408eba
Fix panel height (#1629) 2023-03-16 13:00:41 +01:00
6543
9c8c610cd4
Changelog v0.15.7 (#1622) (#1623)
Frontport #1622
2023-03-14 15:56:45 +01:00
Hayden
1c1c08831f
docs: update docs to include plugin repositories (#1596)
Closes #1536 

Co-authored-by: 6543 <6543@obermui.de>
2023-03-14 03:42:53 +01:00
Hayden
c60c59bd65
fix: apply permissions when flatPermissions enabled (#1603)
Closes #1582 

When `WOODPECKER_FLAT_PERMISSIONS=true` workaround is applied all
permissions are set to false (default) and query never returns any
matches.

This fixes it by always assigning Pull/Push/Admin to true when flatPermissions is enabled.
2023-03-14 03:42:11 +01:00
Alexander Matyushentsev
ee969979c6
fix: backend auto-detection should be consistent (#1618)
Closes https://github.com/woodpecker-ci/woodpecker/issues/1617

The `woodpecker exec` auto-detects the backend by iterating over a map
of backends. However, since Go 1 the runtime randomizes map iteration
order, so a random backend might be chosen during each execution.

PR changes to auto-detection to iterate over the backends list with
predefined priority: `docker`, `local`, `ssh`, `kubernetes`.

---------

Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2023-03-13 09:07:41 +02:00
Alexander Matyushentsev
5e1171d7a7
fix: docker backend should not close 'engine.Tail' result (#1616)
Closes https://github.com/woodpecker-ci/woodpecker/issues/1615

The error described in
https://github.com/woodpecker-ci/woodpecker/issues/1615 is happening
because `Tail` method of the docker backend closes the instance of
`io.ReadCloser` it returns in `defer` function. As a result anything
that try to read data returned by `Tail` method eventually will attempt
to read from closes reader and get an error:


2171212c5a/pipeline/backend/docker/docker.go (L229)

The fix is just don't close returned reader and let the consumer of
`Tail` method do it. Good thing is that `Tail` is used only in one place
and reader is correctly closed:


2171212c5a/pipeline/pipeline.go (L231-L237)

Example of `woodpecker exec` output using pipeline from
https://github.com/woodpecker-ci/woodpecker/issues/1615 with the fix:

```
woodpecker exec .woodpecker.yaml
[step1:L0:0s] + echo step1
[step1:L1:0s] step1
[step2:L0:0s] + echo step2
[step2:L1:0s] step2
```

Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
Co-authored-by: Lauris BH <lauris@nix.lv>
2023-03-12 16:01:09 +01:00
Alexander Matyushentsev
9288670c61
feat: expose unprotected metrics endpoint (#1614)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: Anbraten <anton@ju60.de>
2023-03-12 09:41:10 +01:00
Lukas
2171212c5a
Fix gitea development setup (#1613) 2023-03-11 07:08:00 +01:00
Lukasz
dc90f97524
Persist DepStatus of tasks (#1610) 2023-03-11 01:58:28 +01:00
Lauris BH
f1f722645c
Update dependencies golang/x libs (#1612) 2023-03-10 19:23:07 +01:00
Weblate
97605cfb46 Translated using Weblate (Finnish)
Currently translated at 4.5% (12 of 263 strings)

Translated using Weblate (Russian)

Currently translated at 100.0% (263 of 263 strings)

Translated using Weblate (Indonesian)

Currently translated at 100.0% (263 of 263 strings)

Translated using Weblate (French)

Currently translated at 100.0% (263 of 263 strings)

Translated using Weblate (Spanish)

Currently translated at 23.5% (62 of 263 strings)

Translated using Weblate (German)

Currently translated at 82.1% (216 of 263 strings)

Co-authored-by: Leonid Maslakov <root@lcomrade.su>
Co-authored-by: Linerly <linerly@protonmail.com>
Co-authored-by: Michael <misc+weblatewoodp@zarb.org>
Co-authored-by: Skyler Mäntysaari <sm+woodpecker-ci@skym.fi>
Co-authored-by: Yoel nunez <y.nunez@floms.com>
Co-authored-by: qwerty287 <ndev@web.de>
Translate-URL: http://translate.woodpecker-ci.org/projects/woodpecker-ci/ui/de/
Translate-URL: http://translate.woodpecker-ci.org/projects/woodpecker-ci/ui/es/
Translate-URL: http://translate.woodpecker-ci.org/projects/woodpecker-ci/ui/fi/
Translate-URL: http://translate.woodpecker-ci.org/projects/woodpecker-ci/ui/fr/
Translate-URL: http://translate.woodpecker-ci.org/projects/woodpecker-ci/ui/id/
Translate-URL: http://translate.woodpecker-ci.org/projects/woodpecker-ci/ui/ru/
Translation: Woodpecker CI/UI
2023-03-08 06:30:13 +00:00
Weblate
2697663180 Added translation using Weblate (Finnish)
Co-authored-by: Skyler Mäntysaari <sm+woodpecker-ci@skym.fi>
2023-03-06 08:01:25 +00:00
Weblate
94a972ef3b Translated using Weblate (Russian)
Currently translated at 100.0% (262 of 262 strings)

Translated using Weblate (Indonesian)

Currently translated at 100.0% (262 of 262 strings)

Translated using Weblate (French)

Currently translated at 100.0% (262 of 262 strings)

Co-authored-by: Leonid Maslakov <root@lcomrade.su>
Co-authored-by: Linerly <linerly@protonmail.com>
Co-authored-by: Michael <misc+weblatewoodp@zarb.org>
Translate-URL: http://translate.woodpecker-ci.org/projects/woodpecker-ci/ui/fr/
Translate-URL: http://translate.woodpecker-ci.org/projects/woodpecker-ci/ui/id/
Translate-URL: http://translate.woodpecker-ci.org/projects/woodpecker-ci/ui/ru/
Translation: Woodpecker CI/UI
2023-03-06 06:33:09 +00:00
Hayden
72784bc11a
Add note about docker image cleanup (#1597)
Closes #1532

Adds notes about images not being cleaned up by wood-pecker and provides
examples on how you can automate the cleanup. Also provides a warning
that these are destructive actions.

<img width="1020" alt="CleanShot 2023-03-03 at 09 36 35@2x"
src="https://user-images.githubusercontent.com/64056131/222800658-f610d488-f8ea-4aca-8ed0-f26e44be1884.png">

---------

Co-authored-by: Anbraten <anton@ju60.de>
2023-03-06 07:33:02 +01:00
Alexander Matyushentsev
d35ab57f80
Add confirm for secret deletion (#1604)
Closes https://github.com/woodpecker-ci/woodpecker/issues/1483

PR adds a confirmation dialog that warns user before deleting a secret. 


https://user-images.githubusercontent.com/426437/222985225-9e14ddac-6c5a-4aed-ac89-cc6562180ac6.mov


Using just basic
[window.Confirm](https://developer.mozilla.org/en-US/docs/Web/API/Window/confirm)
since it is used in
[other](https://github.com/search?q=repo%3Awoodpecker-ci%2Fwoodpecker+confirm%28&type=code)
places. Any objections to switch to proper dialog component in a
separate PR?

Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2023-03-06 07:07:40 +01:00
Hayden
73c47bd2ff
Add collapsable support to panel elements (#1601)
Closes #1312

Updates the `Panel` component to support collapsing 

## Example



https://user-images.githubusercontent.com/64056131/222880570-6611fdd7-4577-4ed5-9798-fce829a4a752.mp4

---------

Co-authored-by: Anbraten <anton@ju60.de>
2023-03-05 07:50:04 +01:00
Hayden
0148151f3d
Add cancel button on secrets tab (#1599) 2023-03-04 13:03:35 +01:00
Hayden
a2f226f7f9
fix: return 404 on badge request for inactive repo (#1600)
closes #1427 with suggested edit.
2023-03-04 11:36:13 +01:00
John Olheiser
9d90b1ffb7
Update when-path for Gitea (#1598)
As title, looks like it should have been updated at the same time as the
other notice.
2023-03-03 15:43:05 -06:00
Weblate
15a50bc0a3 Translated using Weblate (Polish)
Currently translated at 97.3% (254 of 261 strings)

Co-authored-by: Marcin Puc <tranzystorek.io@protonmail.com>
Translate-URL: http://translate.woodpecker-ci.org/projects/woodpecker-ci/ui/pl/
Translation: Woodpecker CI/UI
2023-03-01 17:29:37 +00:00
Anbraten
0bcbcb354f
Rename multi pipelines to workflows (#1285)
Co-authored-by: 6543 <6543@obermui.de>
2023-02-28 18:52:53 +01:00
Anbraten
c5f14180fb
Change issue template labels (#1593) 2023-02-28 18:31:40 +01:00