Commit graph

4607 commits

Author SHA1 Message Date
6543 94f2331a4c
Make sure step passed into go routine exist and does not change (#1903)
just a tiny code improvement
2023-07-06 20:19:10 +02:00
runephilosof-karnovgroup 5d72060bbd
Fix selected line highlighting (#1922)
Also, extract logic to function
2023-07-06 19:49:21 +02:00
Guillaume REMBERT 0cf602a1f6
Add Kubernetes and Dockle Plugins (#1930)
Add Kubernetes Deployments and StatefulSet update and Dockle Scan Plugins.

For Kubernetes plugin, I based on the Drone unmaintened Kubernetes
plugin and took the statefulset management evolutions. I added sync/wait
and force redeploy capabilities + updates dependencies

For Dockle plugin, I took example on Trivy plugin.
2023-07-04 20:28:43 +02:00
Ell 10313e79a0
Added Nextcloud Upload plugin (#1927)
Add plugin [Nextcloud Upload](https://github.com/Ellpeck/WoodpeckerPlugins/tree/main/nextcloud-upload) to the official plugin list.

there's already an official plugin that allows uploading
files using WebDAV, but my plugin has two Nextcloud-specific additions
that aren't part of the regular WebDAV spec:
- The ability to chunk uploads, which is necessary for larger files if
Nextcloud is hosted behind Cloudflare (which restricts uploads to a
maximum of 100MB)
- The ability to apply Nextcloud tags, which allows automatically
categorizing items and using Nextcloud's Retention plugin to easily
auto-remove older artifacts.
2023-07-03 19:47:10 +02:00
Thomas Anderson 3386696d71
Added agent registration docs (#1921)
---------

Co-authored-by: 6543 <6543@obermui.de>
2023-07-03 15:44:16 +02:00
runephilosof-karnovgroup a4cfa3a242
Jump to linked log line (#1852)
Co-authored-by: Patrick Schratz <patrick.schratz@gmail.com>
Co-authored-by: 6543 <6543@obermui.de>
2023-07-03 15:06:10 +02:00
6543 ae2bfe666f
Overwrite web dep version (#1919)
This reverts commit b49cf64949 and
e6d646bc7b.

and close  #1900
2023-07-03 07:52:25 +02:00
Thomas Anderson b616a822a0
Fixed when:evaluate on non-standard (non-CI*) env vars (#1907)
Makes it possible to evaluate `when` constraint on custom environment
variables.
2023-07-02 23:45:22 +02:00
Thomas Anderson 2ba64dcb7d
Removed env vars filtering (#1913)
Closes #1911
2023-07-02 19:14:59 +02:00
Timo Tomasini eb5c48a85f
Store agent ID in config file (#1888) 2023-07-02 17:22:05 +02:00
qwerty287 0e25d6d35a
pnpm update (#1902)
Using a simple `pnpm update` didn't fix any of the issues in #1900 but
it fixes some vulnerabilities shown with `pnpm audit`. I didn't try to
force-update `semver` to fix the security vulnerability there.

---------

Co-authored-by: 6543 <6543@obermui.de>
2023-07-02 12:47:36 +02:00
qwerty287 9dc839b946
Fix default value (#1916)
From #1784 and #1898
2023-07-02 10:50:59 +02:00
Anbraten 3d435a9cb7
Fix log view (#1874)
closes #1857
closes #1520
closes #1879 
- fixes unicode log lines as reported in matrix

---------

Co-authored-by: 6543 <6543@obermui.de>
2023-07-01 18:55:00 +02:00
Epsilon_02 3714e9c218
Add TODO-Checker plugin (#1906)
Co-authored-by: qwerty287 <80460567+qwerty287@users.noreply.github.com>
2023-07-01 08:26:53 +02:00
6543 3f534cfff6
Optimize pipeline and switch to "steps" (#1901) 2023-06-30 13:32:17 +02:00
Patrick Schratz 44b54db475
Document k8s volume usage (#1896) 2023-06-29 19:22:33 +02:00
6543 b49cf64949
let new bugfix be published (2) 2023-06-29 17:21:06 +02:00
6543 e6d646bc7b
let new bugfix be published 2023-06-29 17:09:33 +02:00
Weblate 74c0e99aa9 Translated using Weblate (Italian)
Currently translated at 31.6% (98 of 310 strings)

Translated using Weblate (German)

Currently translated at 100.0% (310 of 310 strings)

Co-authored-by: Andrea Zucchelli <zukka77@gmail.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/it/
Translation: Woodpecker CI/UI
2023-06-29 15:01:08 +00:00
qwerty287 cd982fcbd1
Fix pipeline status calculation/reporting (#1898)
Closes #1895 
Regression of #1784
2023-06-29 14:56:01 +02:00
6543 e1c31df6c6
Refactor AgentFindByToken (#1891)
followup of #1890
2023-06-28 06:59:58 +02:00
Anbraten b57b6f27f6
Fix empty agent token (#1890)
Using an empty token for an agent was returning the first agent from the
database as the orm is not adding where clauses for empty strings of a
model when querying.

# Huge thanks for reporting and explaining the issue ❤️ 

- Dominik Heidler
- Timo Tomasini
2023-06-28 01:22:19 +02:00
Michalis Zampetakis 456725dde7
Add pull-request implementation for bitbucket forge (#1889) 2023-06-27 23:40:28 +02:00
qwerty287 3033abc3b4
Add own workflow model (#1784)
Closes #1287

---------

Co-authored-by: 6543 <6543@obermui.de>
2023-06-27 18:01:18 +02:00
Michalis Zampetakis b1787f82dc
Fix bitbucket forge add repo (#1887)
The workspace is a required field for ivoking bitbucket's API. While
workspace is not available it must be fetched through the Repos func.

Fixes #1882
2023-06-26 23:55:21 +02:00
runephilosof-karnovgroup 1fa0212731
Add minimum usage for CLI v0.15.x to docs (#1878)
Co-authored-by: 6543 <6543@obermui.de>
2023-06-25 23:38:25 +02:00
Benedikt Kleiner a958049485
sync repo permissions on login (#1853)
if indeed a bug, fixes #1851 after re-log

close #1666
2023-06-24 10:08:34 +02:00
qwerty287 eaae6b44c7
Remove default event filter (#1880)
Closes https://github.com/woodpecker-ci/woodpecker/issues/1863
2023-06-21 18:12:20 +02:00
qwerty287 5c587a3243
Add security section to docs (#1877) 2023-06-21 16:59:57 +02:00
qwerty287 c3c1d3bcb5
Return after error (#1875)
This allows you to work around the max timeout on the server.
2023-06-19 17:46:48 +02:00
Thomas Anderson 0c3021473f
Added Woodpecker Host Config used for Webhooks (#1869)
When SCM and Woodpecker are deployed in the same cluster, I want that
SCM requests Woodpecker directly by internal URL.


![Webhook-host-diagram](https://github.com/woodpecker-ci/woodpecker/assets/127358482/c4689d55-839a-4731-95b3-5734ba561e5f)
 
This PR adds optional URL used for Webhook calls.
2023-06-18 14:47:40 +02:00
6543 6ab9f802d1
Fix links in docs (#1859) 2023-06-13 18:58:26 +02:00
Benedikt Kleiner 182a236793
logs stream: fix url parameter (#1858)
was missed during #1691
2023-06-13 14:40:40 +02:00
6543 6be61e6c9a
logs table migration: skip on corrupted json and fail later (#1856)
enhance  #1828
2023-06-13 12:50:11 +03:00
Anbraten ff01a9ff1d
Access repos by their ids (#1691)
closes #1295 
closes #648

# TODO
- [x] add new routes with `:repoID`
- [x] load repo in middleware using `:repoID` if present
- [x] update UI routes `:owner/:name` to `:repoID`
- [x] load repos using id in UI
- [x] add lookup endpoint `:owner/:name` to `:repoID`
- [x] redirect `:owner/:name` to `:repoID` in UI
- [x] use badge with `:repoID` route in UI
- [x] update `woodpecker-go`
- [x] check cli
- [x] add migrations / deprecation notes
- [x] check if #648 got solved directly
- [x] Test
  - [x] create repo
  - [x] repo pages
  - [x] ui redirects
  - [x] forge status links
2023-06-13 01:07:52 +02:00
runephilosof-karnovgroup e3593cd9a4
01-getting-started.md: fix WOODPECKER_HOST example (#1849) 2023-06-12 23:22:00 +02:00
6543 5139624cf8
Migrate old logs to new database schema (#1828)
address new models based on #1802
2023-06-12 22:43:14 +02:00
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