Commit graph

4670 commits

Author SHA1 Message Date
Ovidiu Calbajos 609ba481b5
Support for k8s serviceAccount and nodeSelector (#1842)
Add the possiblity to specify the Kubernetes serviceAccount and/or
nodeSelector to be used on individual steps for Kubernetes executor
2023-06-12 16:00:59 +02:00
6543 b5b3b95721
Print ongoing alive sign for migrations after 20s (#1846) 2023-06-10 12:59:15 +03:00
6543 7bae68758f
[Docs] Fix schema to replace "tag" by "ref"-filter (#1841)
#1820 followup
2023-06-09 12:43:12 +02:00
Ben Cordero 3158980d3e
Get workflow id from clone steps (#1839)
When in local mode, `getWorkflowIDFromStep` can handle normal steps with
a name like `wp_01h2a6qggwz68zekrkbwqq9rny_0_step_0`.

However, it will fail on clone (unless `skip_clone: true`) with an
`invalid step name` error.

```
invalid step name wp_01h2a2ebppp43bwjdfdsyj1m6m_0_clone
```

This patch handles either `_stage_` or `_clone` as the separator that
the local backend can use to extract the workflowID.
2023-06-08 03:33:23 +02:00
qwerty287 5d74174bc3
Drop old columns (#1838) 2023-06-07 19:22:44 +02:00
6543 7e708874ae
Rename yaml pipeline to steps (#1833)
Adjust pipeline-config to match
[Terminology](https://woodpecker-ci.org/docs/next/usage/terminology)
2023-06-07 12:04:37 +02:00
6543 101e684059
make in_docker work again (#1830) 2023-06-06 18:29:40 +02:00
Anbraten 556607b525
Rework log streaming and related functions (#1802)
closes #1801
closes #1815 
closes #1144
closes  #983
closes  #557
closes #1827
regression of #1791

# TODO
- [x] adjust log model
- [x] add migration for logs
- [x] send log line via grpc using step-id
- [x] save log-line to db
- [x] stream log-lines to UI
- [x] use less structs for log-data
- [x] make web UI work
  - [x] display logs loaded from db
  - [x] display streaming logs
- [ ] ~~make migration work~~ -> dedicated pull (#1828)

# TESTED
- [x] new logs are stored in database
- [x] log retrieval via cli (of new logs) works
- [x] log streaming works (tested via curl & webui)
- [x] log retrieval via web (of new logs) works

---------

Co-authored-by: 6543 <6543@obermui.de>
2023-06-06 09:52:08 +02:00
6543 971cb52032
Rename pipeline frontend types (#1829)
this adjust the packages that parse the yaml-config-file to match
[Terminology](https://woodpecker-ci.org/docs/next/usage/terminology)
2023-06-06 09:14:21 +02:00
qwerty287 b82ed13586
Database migrations run in seperate sessions and commit on success right away (#1822)
This isolates single migration tasks from each other.
The migration itself is now not atomic anymore but each single migration
now on it's own.
This takes load away from databases, as new sessions have a committed
schema available.

We also disable xorm.cache, as the speed improvements are minor but
invalid cache caused by schema changes did happen already in the past.

---------
Reverts #1817
Closes #1821

---------

Co-authored-by: 6543 <6543@obermui.de>
2023-06-06 03:27:17 +02:00
6543 f81b447638
remove undocumented docker specific option (#1825) 2023-06-05 17:30:32 +02:00
6543 ea895baf83
Resolve built-in variables for global when filter (#1790)
addresses
bd461477bd

close  #1244, close #1580

---------

Co-authored-by: Anbraten <anton@ju60.de>
2023-06-05 00:15:07 +02:00
6543 c919f32e0b
[Docs] Remove never implemented "tag"-filter and document "ref"-filter to do the same (#1820)
close #1211
2023-06-04 12:13:32 +02:00
6543 79c8da2f32
Drop tarball release (#1819)
close #1262
2023-06-04 05:09:10 +02:00
6543 d1213afdc8
[Docs] use redocusaurus to display swagger file (#1818)
https://redocusaurus.vercel.app/

followup of  #1782

---------

Co-authored-by: Anbraten <anton@ju60.de>
2023-06-04 05:07:39 +02:00
Stephen Muth 2941e508b3
Allow setting resources for kubernetes on a per-step basis (#1767)
This add a simple implementation of requests/limits for individual
steps. There is no validation of what the resource actually is beyond
checking that it can successfully be converted to a Quantity, so it can
be used for things other than just memory/CPU.

close #1809
2023-06-04 00:50:08 +02:00
Martin W. Kirst 14177635b6
Update swagger API specification (#1782)
# Summary

This PR drops the outdated former swagger.yaml/json and introduced
automatic API document generation from Go code.
The generated code is also used to generate documentation/markdown for
the community page,
as well as enable the Woodpecker server to serve a Swagger Web UI for
manual tinkering.

I did opt-in for gin-swagger, a middleware for the Gin framework, to
ease implementation and have a sophisticated output.
This middleware only produces Swagger v2 specs. AFAIK the newer OpenApi
3x tooling is not yet that mature,
so I guess that's fine for now.

## Implemenation notes

- former swagger.json files removed
- former // swagger godocs removed
- introduced new dependency gin-swagger, which uses godoc annotations on
top of Gin Handler functions.
- reworked Makefile to automatically generate Go code for the server
- introduce new dependency go-swagger, to generate Markdown for
documentation purposes
- add a Swagger Web UI, incl. capabilities for manual API exploration
- consider relative root paths in the implementation
- write documentation for all exposed API endpoints
- incl. API docs in the community website (auto-generated)
- provide developer documentation, for the Woodpecker authors
- no other existing logic/code was intentionally changed

---------

close #292

---------

Co-authored-by: qwerty287 <80460567+qwerty287@users.noreply.github.com>
Co-authored-by: 6543 <6543@obermui.de>
2023-06-03 21:38:36 +02:00
qwerty287 b9731d8da9
Fix missing table name (#1817)
Bug from #1806 

We don't need the sync because the step_machine is there since the model
was added the first time so it mill *always* be in the table
2023-06-03 20:24:37 +02:00
6543 317bd24abb
Define Glossary (#1800)
based on
https://github.com/woodpecker-ci/woodpecker/issues/745#issuecomment-1313401427

close  #1724

---------

Co-authored-by: qwerty287 <80460567+qwerty287@users.noreply.github.com>
Co-authored-by: Anbraten <anton@ju60.de>
2023-06-03 16:39:56 +02:00
Thomas Anderson 0ba7ed4128
Added Hardware Requirements documentation (#1812)
Closes #1742 

```
PS C:\> kubectl top pod -n scm
NAME                                 CPU(cores)   MEMORY(bytes)
gitea-0                              1m           324Mi
postgres-0                           3m           55Mi
woodpecker-agent-6f475dc7c8-z494d    1m           20Mi
woodpecker-server-79545f8dd5-hl68l   1m           25Mi
```

---------

Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: Anbraten <anton@ju60.de>
2023-06-03 16:36:34 +02:00
qwerty287 6e6f36ee3a
Add "Installing Woodpecker CI in your personal homelab" post (#1811) 2023-06-03 09:21:51 +02:00
qwerty287 b59d654f45
Do not use oauth client without token (#1803)
Closes https://github.com/woodpecker-ci/woodpecker/issues/1370
2023-06-03 03:03:06 +02:00
6543 259d970faf
Update .changelog.yml to account regression lable (#1808) 2023-06-02 15:16:09 +02:00
Patrick Schratz 3d0338315f
Revert to docker 20.10.x for API 1.41 compatibility (#1792)
fix #1786

---------

Co-authored-by: 6543 <6543@obermui.de>
2023-06-02 15:09:38 +02:00
qwerty287 36870d1797
Drop step_machine column (#1806)
Bug 3 in #1712 

Was changed in f13ffc2c8f
2023-06-02 14:39:29 +02:00
Xavier Maillard f683c62748
Fix Gitea version constraint to get files changed on PR (#1805) 2023-06-02 12:41:49 +02:00
Xavier Maillard 9813411c69
Fix nil pointer in repo repair (#1804)
Address **Bug 2** from the following issue
https://github.com/woodpecker-ci/woodpecker/issues/1712
2023-06-02 12:25:09 +02:00
Weblate 71d7a467f9 Translated using Weblate (German)
Currently translated at 100.0% (310 of 310 strings)

Co-authored-by: admin <owners@woodpecker-ci.org>
Translate-URL: http://translate.woodpecker-ci.org/projects/woodpecker-ci/ui/de/
Translation: Woodpecker CI/UI
2023-06-01 14:58:12 +00:00
qwerty287 dc3f7d61ea
Update Gin (#1797)
Fixes the security issue (we aren't affected)

Closes #1756
2023-06-01 08:25:17 +02:00
qwerty287 f91ee5d23a
Remove MSSQL specific code and cleanups (#1796)
We don't have MSSQL support

---------

Co-authored-by: Anbraten <anton@ju60.de>
2023-05-31 21:27:57 +02:00
6543 524611cf00
Add Forge Metadata (#1789)
close  #1787
2023-05-31 18:30:41 +02:00
6543 a1943aa49e
Buildin Env Vars, use _URL for all links/urls (#1794)
based on https://framadate.org/jVSQHwIGfJYy82IL

close #1793
2023-05-31 18:03:38 +02:00
Anbraten c464f857ae
Remove unused file system api (#1791)
Co-authored-by: 6543 <6543@obermui.de>
2023-05-31 18:03:03 +02:00
6543 f5a85d21be
Drop ".drone.yml" as default pipeline config (#1795)
it did make sense to have it still supported within v0.15.0,

but as we move future away and with the release of v1.0.0
we should not give the appearance of still support the original drone
v0.8 config
2023-05-31 16:02:20 +02:00
qwerty287 540ad108df
Fix static assets with subpath (#1783)
Closes #1773
2023-05-30 17:25:18 +02:00
Weblate 9b3929b7fa Translated using Weblate (French)
Currently translated at 100.0% (310 of 310 strings)

Co-authored-by: Michael <misc+weblatewoodp@zarb.org>
Translate-URL: http://translate.woodpecker-ci.org/projects/woodpecker-ci/ui/fr/
Translation: Woodpecker CI/UI
2023-05-28 16:58:09 +00:00
runephilosof-karnovgroup ca32517624
PipelineLog.vue: Make it possible to link to a log line (#1775)
Set id attribute of lines to make it possible to link to a pipeline
line, like it was in version 0.9. For instance
https://woodpecker.example.com/org/repo/1#L7
2023-05-28 11:38:27 +03:00
Weblate 5a8e8e2891 Translated using Weblate (Italian)
Currently translated at 29.3% (91 of 310 strings)

Co-authored-by: Andrea Zucchelli <zukka77@gmail.com>
Translate-URL: http://translate.woodpecker-ci.org/projects/woodpecker-ci/ui/it/
Translation: Woodpecker CI/UI
2023-05-26 22:58:13 +00:00
Weblate dd644da3cc Translated using Weblate (Polish)
Currently translated at 100.0% (310 of 310 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-05-23 14:58:08 +00:00
qwerty287 c111fbfd14
Add "Replace Ansible Semaphore with Woodpecker CI" video (#1772) 2023-05-22 23:50:01 +02:00
6543 375e352a84
Add MkDocs Plugin (#1770)
https://codeberg.org/woodpecker-plugins/mkdocs
2023-05-21 07:54:23 +02:00
6543 1a79d30555
Add Trivy Plugin (#1769) 2023-05-21 00:21:34 +02:00
Dessalines 90371ff5d0
Add Android CI example to awesome woodpecker (#1763)
Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: qwerty287 <80460567+qwerty287@users.noreply.github.com>
Co-authored-by: Anbraten <anton@ju60.de>
2023-05-18 12:10:05 +02:00
Patrick Schratz d13a8744ce
Add nodeSelector using platform for kubernetes (#1737)
Co-authored-by: Anbraten <anton@ju60.de>
2023-05-18 11:21:20 +02:00
Patrick Schratz 820cec9466
Update alpine images to 3.18 (#1765)
Fresh out of the oven! Tested with custom images, no issues encountered.

Co-authored-by: qwerty287 <80460567+qwerty287@users.noreply.github.com>
2023-05-18 10:08:35 +02:00
Anbraten cfb53cb995
Redirect to new pipeline (#1761)
Co-authored-by: qwerty287 <80460567+qwerty287@users.noreply.github.com>
2023-05-17 19:33:28 +02:00
Anbraten 435f5ae207
Improve local backend (#1762)
Co-authored-by: 6543 <6543@obermui.de>
2023-05-17 14:53:23 +02:00
Weblate 4504677233 Translated using Weblate (Russian)
Currently translated at 100.0% (310 of 310 strings)

Translated using Weblate (Indonesian)

Currently translated at 100.0% (310 of 310 strings)

Co-authored-by: Leonid Maslakov <root@lcomrade.su>
Co-authored-by: Linerly <linerly@protonmail.com>
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-05-16 13:18:22 +00:00
qwerty287 02913fa7b6
Add reset token button (#1755)
Closes #696
2023-05-14 18:48:33 +02:00
Anbraten 1f9d943564
Add agent functions (#1754) 2023-05-14 16:46:54 +02:00