Commit Graph

548 Commits

Author SHA1 Message Date
Aidan Coyle
7749f6097f Fix erroneous linter error for plugin privileges (#6424) 2026-04-11 17:01:28 +02:00
6543
17d0f12cf3 fix second overflow build error (#6415) 2026-04-10 11:46:45 +03:00
6543
05218c972b fix build error (#6413) 2026-04-09 14:54:46 +02:00
Uğur Tafralı
f2abd692e9 Fix Windows container exit code handling and error checks (#6411) 2026-04-09 05:07:22 +02:00
6543
a68860058c Support string for when.status again (#6406) 2026-04-08 15:40:40 +02:00
6543
f0e56485dc Dummy backend support cancel (#6390) 2026-04-06 20:21:23 +02:00
6543
704245d96f Extend workflow integration tests (#6272) 2026-03-31 17:27:21 +02:00
qwerty287
926470fdb5 Migrate to moby (#6357) 2026-03-31 16:58:27 +02:00
qwerty287
8e7096fcf6 Deprecate commit avatar envs (#6356) 2026-03-31 13:23:39 +02:00
6543
af471c5372 Fix pipeline cancel (#6320) 2026-03-30 19:33:54 +02:00
6543
fde1d917e2 Refactor pipeline runtime code (#6166)
Co-authored-by: Anbraten <6918444+anbraten@users.noreply.github.com>
2026-03-30 11:24:36 +03:00
qwerty287
79cc07265e Unify import aliases (#6328)
Co-authored-by: 6543 <6543@obermui.de>
2026-03-28 15:45:23 +01:00
6543
7a9f1ff2dc refactor move state.State.Workflow into own type (#6338) 2026-03-28 15:40:15 +01:00
6543
280d2e902a Fix workflow serialize to omit skip_clone if false (#6319) 2026-03-24 20:27:29 +02:00
Sim-hu
f842ce2cc2 Improve linter warning when step has no when block (#6314) 2026-03-24 15:05:49 +01:00
qwerty287
3156cd687c Fix license headers (#6205) 2026-03-23 11:54:07 +01:00
6543
513011d1bf Forward skipped step state asap it is known (#6295) 2026-03-22 18:20:44 +01:00
6543
0214e4cd33 Only add compatibility environment variables for drone-ci to plugins (#6271) 2026-03-21 19:40:34 +01:00
6543
60a4d09f16 Add workflow integration test (#6270) 2026-03-21 11:54:48 +01:00
6543
db130b2a1c Add backend interface to mockery to generated mock (#6269) 2026-03-20 16:56:51 +01:00
6543
09327abd03 Creating new engine runtime now requires backend as argument (#6268) 2026-03-20 13:44:24 +01:00
qwerty287
17dcc86942 Allow to cancel on failure (#6158) 2026-03-19 13:41:44 +01:00
confusedsushi
ab73370e93 make it possible to disable the isolated home for local agents (#6251)
Co-authored-by: 6543 <6543@obermui.de>
2026-03-19 13:40:24 +01:00
qwerty287
768f22904f Fix deprecation error (#6236) 2026-03-13 12:51:35 +01:00
6543
b6c8c8b885 refactor: pipeline runtime add description and prevent race (#6167) 2026-03-08 09:50:11 +01:00
qwerty287
22899b6581 Use native slice in tests (#6190) 2026-03-03 18:00:28 +01:00
Harri Avellan
25842498c6 Prevent leaking goroutines on cancelled steps (#6186)
I've been debugging case where Kubernetes backend agents occasionally are OOMKilled. During the investigation noticed an increasing amount of goroutines on the agent processes which turned out to be multiple goroutines hanging on:
```
runtime.gopark(proc.go:461)
runtime.chanrecv(chan.go:667)
runtime.chanrecv1(chan.go:509)
go.woodpecker-ci.org/woodpecker/v3/pipeline/backend/kubernetes.(*kube).WaitStep(kubernetes.go:325)
go.woodpecker-ci.org/woodpecker/v3/pipeline/runtime.(*Runtime).exec(executor.go:261)
go.woodpecker-ci.org/woodpecker/v3/pipeline/runtime.(*Runtime).execAll.func1.1(executor.go:174)
go.woodpecker-ci.org/woodpecker/v3/pipeline/runtime.(*Runtime).execAll.func1.2(executor.go:200)
runtime.goexit(asm_arm64.s:1268)
go.woodpecker-ci.org/woodpecker/v3/pipeline/runtime.(*Runtime).execAll.func1(executor.go:199)
```

My analysis is that on cancel nothing fires the `finished` channel, as pod is deleted i.e. not updated (there's a registed handler for pod update events). There was already a comment about adding cancellation handler for ctx.Done, so I think this is the proper way (instead of adding event handler for pod deletion).
2026-03-02 20:14:56 +00:00
qwerty287
39a7ebda75 Independently evaluate status filter and support on workflows (#6183)
fix https://github.com/woodpecker-ci/woodpecker/issues/6161

And also allow `when.status` at workflow level. `runs_on` is deprecated then.


Co-authored-by: 6543 <6543@obermui.de>
2026-03-02 17:37:37 +01:00
qwerty287
05f55fb0f9 Update schema (#6156)
closes https://github.com/woodpecker-ci/woodpecker/issues/6135

Everything else in the issue is correct, and nothing that has to be fixed.

Also changes the parsing for the `status` filter from the constraint list (with includes/excludes) to an allowlist only (as we only have two statuses it's quite useless to have an exclude and this was also not documented).
2026-02-26 12:46:50 +01:00
qwerty287
95048409f2 Only set tag env on tags (#6142) 2026-02-22 08:42:50 +01:00
renovate[bot]
2012d292be chore(deps): update golangci/golangci-lint docker tag to v2.10.1 (#6138)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: qwerty287 <qwerty287@posteo.de>
Co-authored-by: qwerty287 <80460567+qwerty287@users.noreply.github.com>
2026-02-21 10:42:37 +01:00
6543
a63b93f5ee Refactor pipeline engine (#6073)
restructure pipeline/*.go to use submodules

<!-- https://claude.ai/chat/1b8965d7-5bca-42c7-86b4-48c2d645c362 -->

- pipeline/error.go -> pipeline/errors/...
- pipeline/pipeline.go#Runtime -> pipeline/runtime/runtime.go
- pipeline/pipeline.go#execAll -> pipeline/runtime/executor.go
- pipeline/shutdown.go -> pipeline/runtime/shutdown.go
- pipeline/logger.go ->pipeline/logging
- pipeline/tracer.go -> pipeline/tracing
- pipeline/pipeline.go#State -> state/state.go
2026-02-13 11:56:43 +01:00
6543
ff0d43f1d3 document how to ignore failure on services (#6106)
Co-authored-by: Robert Kaussow <xoxys@rknet.org>
2026-02-12 12:09:57 +01:00
qwerty287
b4708c895e Fix typos in pipeline/pipeline.go (#6094)
Co-authored-by: 6543 <6543@obermui.de>
2026-02-09 14:54:21 +01:00
6543
904a40674f Detached or service steps report back too (#6039) 2026-02-07 09:18:13 +01:00
qwerty287
fe9db664fe Add some tests (#6076) 2026-02-06 23:49:42 +01:00
6543
8a8f9ad3aa Fix pipeline cancellation status handling and step state synchronization (#6011)
Co-authored-by: pnkcaht <samzoovsk19@gmail.com>
Co-authored-by: qwerty287 <80460567+qwerty287@users.noreply.github.com>
Co-authored-by: Lauris B <lauris@nix.lv>
2026-02-05 21:41:05 +01:00
6543
cd62ab5f3e Local backend: cleanup generated script for cmd.exe shell (#6029) 2026-01-28 07:10:29 +01:00
6543
47ffb3209e Local backend: setup clone step respects context (#6030) 2026-01-28 06:47:18 +01:00
Sam Richard
b1cbd961b2 Fix/docker kill container on cancel (#6018)
## Fix: kill docker container on pipeline cancellation

### What was happening
When a pipeline step was canceled (e.g. manual cancel or agent shutdown), the Docker backend would stop waiting for the container but **would not actively terminate it**.  
This caused containers running long-lived commands (like `sleep`, `tail -f`, servers, etc.) to continue running in the background.

## Related Issue
Closes #6016 

### What this PR changes
This PR ensures that **when the step context is canceled**, the running Docker container is **immediately killed**.

- Listens to `ctx.Done()` in `WaitStep`
- Sends a `ContainerKill` using a non-cancelable context
- Preserves existing behavior for normal container exit
- Prevents orphaned containers after pipeline cancellation

### Why this approach
Docker containers do not automatically stop when the caller context is canceled.  
Explicitly killing the container on `ctx.Done()` guarantees correct cleanup and matches expected CI behavior.
2026-01-27 00:19:44 +01:00
6543
3786077c07 Update Architecture: move pipeline/rpc => rpc & server/{grpc => rpc} (#6012) 2026-01-26 21:25:38 +01:00
6543
9d21e09c46 Local backend handle canceled steps case (#6008) 2026-01-25 17:26:56 +01:00
qwerty287
bd8e2f350e Use require to exit tests (#5998) 2026-01-22 09:41:20 +01:00
qwerty287
cd88723b2d Use NoError for error assertion (#5992) 2026-01-20 08:43:51 +01:00
6543
d1b7e35ca8 Improve service syntax related docs and tests nits (#5991) 2026-01-19 19:44:18 +02:00
6543
4e0b91fbd2 Remove deactivated secrets type from container defintion (#5983) 2026-01-18 21:48:47 +01:00
qwerty287
8c231aa99d Allow to disable a cron (#5896)
Co-authored-by: 6543 <6543@obermui.de>
2025-12-24 09:02:03 +00:00
Martin Schmidt
b7b33db98b feat(kubernetes): add support for pod affinity and anti-affinity configurations (#5854) 2025-12-17 13:59:22 +01:00
6543
93cba04b36 Allow untrusted repo to still drop network for steps (#5820)
as it is an undocumented feature this might change / move into a more generalized backend network option at some point ...

but i think we could at least support it as proposed in this patch meanwhile
2025-12-09 16:57:44 +01:00
Henrik Huitti
ba2b806e83 fix(kubernetes): sanitize step names or skip hostname assignment (#5848) 2025-12-09 01:37:12 +01:00