Commit graph

41 commits

Author SHA1 Message Date
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
YR Chen
e1b574a4bc
Add runtimeClassName in Kubernetes backend options (#3474)
Resolves #3473

---------

Co-authored-by: Thomas Anderson <127358482+zc-devs@users.noreply.github.com>
2024-03-29 10:29:07 +01:00
qwerty287
f23d42b49e
Fix env schema (#3514)
closes #3510
2024-03-20 09:28:02 +01:00
qwerty287
de5c65939a
Deprecate alternative names on secrets (#3406)
Closes https://github.com/woodpecker-ci/woodpecker/discussions/2274

# deprecation of alternative names

Instead of
```yaml
secrets:
  - source: some_secret
    target: some_env
```
you now write:
```yaml
environment:
  some_env:
    from_secret: some_secret
```

Also, it's possible to use complex yaml objects in `environment`,
they're turned into json (just like `settings`).
2024-02-22 18:25:57 +01:00
qwerty287
5d3a503f98
Add link checking (#3371)
Closes https://github.com/woodpecker-ci/woodpecker/issues/3332
2024-02-12 15:00:33 +01:00
qwerty287
894ab51215
Fix schema links (#3369)
Closes https://github.com/woodpecker-ci/woodpecker/issues/2063
2024-02-11 09:53:02 +01:00
qwerty287
f369d2c543
Lint for event filter and deprecate exclude (#3222)
Closes https://github.com/woodpecker-ci/woodpecker/discussions/2174

- return bad habit error if no event filter is set
- If this is applied, it's useless to allow `exclude`s on events.
Therefore, deprecate it together with `include`s which should be
replaced by `base.StringOrSlice` later.
2024-02-10 17:33:05 +01:00
sinlov
134fb7900c
fix: update schema event_enum to remove error warning when.event (#3357)
change test case to check

fix #3356
2024-02-09 08:05:21 +01:00
qwerty287
6892a9ca57
Parse backend options in backend (#3227)
Currently, backend options are parsed in the yaml parser.
This has some issues:
- backend specific code should be in the backend folders
- it is not possible to add backend options for backends added via
addons
2024-02-08 18:39:32 +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
6543
6a6cb094fb
Add schema test for depends_on (#3205) 2024-01-15 08:54:27 +01:00
qwerty287
001b5639a6
Use assert for test (#3201)
instead of `if`s
2024-01-14 19:33:58 +01:00
Thomas Anderson
9bbc446009
Kubernetes AppArmor and seccomp (#3123)
Closes #2545

seccomp
https://kubernetes.io/docs/tutorials/security/seccomp/

https://github.com/kubernetes/enhancements/blob/master/keps/sig-node/135-seccomp/README.md

AppArmor
https://kubernetes.io/docs/tutorials/security/apparmor/

fddcbb9cbf/keps/sig-node/24-apparmor/README.md
Went ahead and implemented API from KEP-24 above.
2024-01-12 23:32:24 +01:00
6543
f8fb28e651
More docker backend test remove more undocumented (#3156)
remove Sysctls and IpcMode
2024-01-11 19:30:13 +01:00
qwerty287
f56f9cb1c0
Cleanups + prefer .yaml (#3069)
Co-authored-by: Robert Kaussow <xoxys@rknet.org>
2024-01-11 18:43:54 +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
5517d87dd6
Fix step depends_on as string in schema (#3099) 2024-01-01 12:16:36 +01:00
6543
8b47b3a978
make event in pipeline schema also a constraint_list (#3082) 2023-12-31 08:49:46 +01:00
qwerty287
7e2ea306c4
Remove workflow version again (#3052) 2023-12-28 14:34:13 +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
Anbraten
2b1e5f35de
Add depends_on support for steps (#2771)
Co-authored-by: 6543 <6543@obermui.de>
2023-12-24 12:14:30 +01:00
Nikolai Rodionov
b3541e314e
fix: Add backend_options to service linter entry (#2930)
I've tried setting resources for a service and have seen the linter
warning that is not supported, though the the pipeline was successful
and resources were actually set on the pod. So I assume it shouldn't be
a linter issue.

I"m also not sure if my change is correct, I only hope it is

## Some Context

A pipeline example (I've removed steps that are not related directly:
```yaml
---
steps:
  test:
    name: Test charts
    image: quay.io/helmpack/chart-testing
    environment:
      - DOCKER_HOST=tcp://docker:2375
    commands:
      - export PATH=$PWD/.bin:$PATH
      - apk update && apk add docker
      - kind create cluster --config kind.yaml
      - sed -i -E -e 's/localhost|0\.0\.0\.0/docker/g' ~/.kube/config
      - git fetch origin
      - |
        if [ -e .changed ]; then
          ct install --target-branch main --chart-dirs .
          ct install --target-branch main --chart-dirs . --upgrade
        fi

services:
  docker:
    image: docker:dind
    commands: dockerd -H tcp://0.0.0.0:2375 --tls=false
    privileged: true
    ports:
      - 2375
    backend_options:
      kubernetes:
        resources:
          requests:
            memory: 400Mi
            cpu: 100m
          limits:
            memory: 400Mi
            cpu: 100m
```

Pod description:
```
Containers:
  wp-01hhczdknafj81jv80gzjbgt93-0-services-0:
    Limits:
      cpu:     100m
      memory:  400Mi
    Requests:
      cpu:     100m
      memory:  400Mi
```

Warning in the Woodpecker UI:

```
[linter]woodpecker: services.dockerAdditional property backend_options is not allowed
```
2023-12-11 19:22:55 +01: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
Lauris BH
511cfec66a
Fix schema validation with array syntax for clone and services (#2920)
Co-authored-by: Robert Kaussow <xoxys@rknet.org>
Co-authored-by: Anbraten <anton@ju60.de>
2023-12-07 16:56:13 +01:00
Thomas Anderson
3adb98b287
Simple security context options (Kubernetes) (#2550) 2023-11-26 08:46:06 +01:00
Patrick Schratz
f3df6f8873
Add privileged schema definition (#2777)
Co-authored-by: 6543 <m.huber@kithara.com>
2023-11-09 19:31:08 +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
qwerty287
1bc4415075
Add workflow version (#2476)
Closes #1834

---------

Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: Anbraten <anton@ju60.de>
Co-authored-by: Lauris BH <lauris@nix.lv>
2023-11-06 01:37:02 +01:00
Anbraten
a0f2ee9506
Add deprecation warnings (#2725) 2023-11-04 15:30:47 +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
8cdac56d8f
Check for correct license header (#2137) 2023-08-10 11:06:00 +02:00
6543
10b1cfcd3b
Enhance local backend (#2017)
make local backend able to clone from private

---------
*Sponsored by Kithara Software GmbH*
Co-authored-by: Bruno BELANYI <bruno@belanyi.fr>
2023-08-07 15:39:58 +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
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
6543
204d05f447
Implement YAML Map Merge, Overrides, and Sequence Merge Support (#1720)
close  #1192
2023-04-29 14:49:41 +02:00
Anbraten
fa5b0fb96e
Fix linter (#1647) 2023-03-18 20:35:27 +01:00
6543
b15ca52a63
Move constrain to only have a single command in backend to run to dedicated backends (#1032)
at the moment we compile a script that we can pipe in as single command
this is because of the constrains the docker backend gives us.

so we move it into the docker backend and eventually get rid of it altogether
2022-10-31 00:26:49 +01:00
Zav Shotan
81dcdea2be
Add support for steps to be a list (instead of dict) (#826)
- Support for pipeline/containers as list
- Support for container name in logs (step.Name)

Co-authored-by: Zav Shotan <zshotan@bloomberg.net>
Co-authored-by: 6543 <6543@obermui.de>
2022-06-13 23:13:09 +02:00
John Olheiser
71b9179078
Move plugin config to root.pipeline.[step].settings (#464)
* Move Vargs to Settings

* Allow both until deprecation

* Add more tests

* Adjust schema

* Add missing detach option, fix schema tests


Signed-off-by: jolheiser <john.olheiser@gmail.com>
Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: Anbraten <anton@ju60.de>
2021-12-04 16:44:18 +01:00
6543
fe31fb1e06
Drop error only on purpose or else report back or log (#514)
- Remove Deadcode
- Simplify Code
- Drop error only on purpose
2021-11-23 15:36:52 +01:00
Jacob Floyd
e34daae0cf
Move cncd/pipeline/pipeline/ to pipeline/ (#347)
* Refactor: move cncd/pipeline/ to pipeline/

* Refactor: move pipeline/pipeline/ to pipeline/
2021-09-24 13:18:34 +02:00