6543 and GitHub
17d0f12cf3
fix second overflow build error ( #6415 )
2026-04-10 11:46:45 +03:00
6543 and GitHub
05218c972b
fix build error ( #6413 )
2026-04-09 14:54:46 +02:00
Uğur Tafralı and GitHub
f2abd692e9
Fix Windows container exit code handling and error checks ( #6411 )
2026-04-09 05:07:22 +02:00
qwerty287 and GitHub
926470fdb5
Migrate to moby ( #6357 )
2026-03-31 16:58:27 +02:00
6543 and GitHub
af471c5372
Fix pipeline cancel ( #6320 )
2026-03-30 19:33:54 +02:00
79cc07265e
Unify import aliases ( #6328 )
...
Co-authored-by: 6543 <6543@obermui.de >
2026-03-28 15:45:23 +01:00
6543 and GitHub
904a40674f
Detached or service steps report back too ( #6039 )
2026-02-07 09:18:13 +01:00
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
Sam Richard and GitHub
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
LUKIEYF and GitHub
40f847b944
Add Header User-Agent for request client ( #5664 )
...
add Header User-Agent for request client for more precise in recognized the http request from.
close #3778
2025-11-05 11:41:48 +01:00
6543 and GitHub
2a97ae9bcd
Document pipeline backend engine interface precisely ( #5583 )
2025-10-01 13:06:34 +02:00
qwerty287 and GitHub
fe5ea7ad3b
Simplify backend types ( #5299 )
2025-07-05 12:59:17 +03:00
71f24f5d44
fix(deps): update golang-packages to v28.2.1+incompatible ( #5217 )
...
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: qwerty287 <qwerty287@posteo.de >
2025-06-06 07:20:03 +02:00
Robert Kaussow and GitHub
496498274c
Use docker go client directly ( #5134 )
2025-04-26 13:20:36 +02:00
7c31bcf327
Revert volumes/network list ( #4656 )
...
Co-authored-by: Robert Kaussow <xoxys@rknet.org >
Co-authored-by: Patrick Schratz <patrick.schratz@gmail.com >
2025-01-04 11:56:26 +01:00
Anbraten and GitHub
5d3300824d
Fix workflow volume and network config ( #4650 )
2025-01-01 16:21:57 +01:00
qwerty287 and GitHub
428ba689cb
Remove workflow-level volumes and networks ( #4636 )
2024-12-30 10:34:59 +01:00
81b74025d4
Update Go imports paths ( #4605 )
...
Co-authored-by: Robert Kaussow <mail@thegeeklab.de >
2024-12-22 10:44:34 +01:00
Robert Kaussow and GitHub
786a8fb003
Add user as docker backend_option ( #4526 )
2024-12-08 12:02:35 +01:00
Patrick Schratz and GitHub
5d750322bc
Normalize aarch64 -> arm64 for docker backend ( #4451 )
2024-11-25 16:17:57 +01:00
6543 and GitHub
6ad20ced5b
Move docker resource limit settings from server to agent ( #3174 )
...
so you can set it per agent and not per server
2024-09-26 16:56:59 +01:00
qwerty287 and GitHub
123c4ae03e
Update docker to v27 ( #3972 )
2024-07-25 00:43:21 +02:00
6543 and GitHub
b2970dbf0d
Refactor docker backend and add more test coverage ( #2700 )
...
collection of some smal nit's and additions of tests
2024-07-21 21:28:10 +02:00
6543 and GitHub
cd5f6f71a2
Migrate to github.com/urfave/cli/v3 ( #2951 )
2024-07-18 01:26:35 +02:00
044c3a6dd5
Respect cli argument when checking docker backend availability ( #3770 )
...
Co-authored-by: Anbraten <6918444+anbraten@users.noreply.github.com >
2024-06-10 12:51:38 +02:00
6543 and GitHub
42f2734308
cspell lint go code ( #3706 )
2024-05-24 22:35:04 +02:00
qwerty287 and GitHub
c9a3bfb321
Fix spellcheck and enable more dirs ( #3603 )
2024-04-09 09:04:53 +02:00
qwerty287 and GitHub
f92f8b17a3
Make agent usable for external backends ( #3270 )
2024-02-08 16:33:22 +01:00
Robert Kaussow and GitHub
f813badcf9
Enable golangci linter contextcheck ( #3170 )
...
Split out from https://github.com/woodpecker-ci/woodpecker/pull/2960
2024-01-11 22:15:15 +01:00
cd9d425a0d
Fix cli lint throwing error on warnings ( #2995 )
...
split out from #2771
---------
Co-authored-by: Anbraten <anton@ju60.de >
2023-12-23 00:34:17 +02:00
ff1f51d6a9
Rename engine to backend ( #2950 )
...
rename based on https://woodpecker-ci.org/docs/usage/terminiology
---------
Co-authored-by: 6543 <6543@obermui.de >
2023-12-14 19:20:47 +01:00
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
bc95443853
Fix podman agent container in v2 ( #2897 )
...
Add additional string matching to determine when container is not found
or running when invoked via podman compatibility socket
Co-authored-by: qwerty287 <80460567+qwerty287@users.noreply.github.com >
2023-12-02 20:22:23 +01:00
5a7b689e30
Switch to go vanity urls ( #2706 )
...
Co-authored-by: Anbraten <anton@ju60.de >
2023-11-07 08:04:33 +01:00
6543 and GitHub
ebe0307c6b
Let the backend engine report the current platform ( #2688 )
...
if you run woodpecker-agent on windows and connect it to an docker
daemon, there could be two different platforms possible, as you can
switch from linux to windows mode and visa versa
---
*Sponsored by Kithara Software GmbH*
2023-11-01 15:38:37 +01:00
4198c447fb
Destroy steps after they are done ( #2681 )
...
Co-authored-by: 6543 <m.huber@kithara.com >
2023-11-01 09:35:11 +01:00
Patrick Schratz and GitHub
1b98e58014
Update to docker 23 ( #2577 )
...
fix #1807
2023-10-14 12:39:45 +02:00
6543 and GitHub
d253f8cc30
Make sure we dont have hidden options for backend and pipeline compiler ( #2123 )
...
move options based on **os.Getenv** into flags
---------
*Sponsored by Kithara Software GmbH*
2023-08-07 21:13:26 +02:00
6543 and GitHub
3cd78c9409
Refactor agent ( #2021 )
...
- code cleanup
- init backend engine only once
- pass a taskUUID to the backend
---
*Sponsored by Kithara Software GmbH*
2023-07-20 20:39:20 +02:00
6543 and GitHub
7b97e27fea
docker: use uuid instead of name as identifyer ( #1967 )
...
close #1959
2023-07-10 17:59:25 +02:00
6543 and GitHub
5393aa5d3b
Move docker specific volume & network settings into backend code ( #1956 )
...
... if we want to make them be changed ... it should be an
agent-backend-option
2023-07-09 21:03:19 +02:00
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
Anbraten and GitHub
188123ea74
Update dependencies ( #1744 )
2023-05-11 00:28:02 +02:00
qwerty287 and GitHub
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
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:
https://github.com/woodpecker-ci/woodpecker/blob/2171212c5a31bfffc8f882716bdd503c65413eee/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:
https://github.com/woodpecker-ci/woodpecker/blob/2171212c5a31bfffc8f882716bdd503c65413eee/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
Lauris BH and GitHub
f26a87acce
Deduplicate step docker container volumes ( #1571 )
...
Try to fix #1495
It's very hard to reproduce it and only way to fix when it gets in this
state is woodpecker agent restart.
This anyway fixes problem if step mounts and
`WOODPECKER_BACKEND_DOCKER_VOLUMES` conflict
2023-01-31 21:33:40 +01:00
6543 and GitHub
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
36e42914fa
Renamed procs/jobs to steps in code ( #1331 )
...
Renamed `procs` to `steps` in code for the issue #1288
Co-authored-by: Harikesh Prajapati <harikesh.prajapati@druva.com >
Co-authored-by: qwerty287 <ndev@web.de >
Co-authored-by: qwerty287 <80460567+qwerty287@users.noreply.github.com >
Co-authored-by: 6543 <6543@obermui.de >
2022-10-28 17:38:53 +02:00
Anbraten and GitHub
70114ed1fd
Fix handling of empty strings for default docker volumes ( #1209 )
2022-09-27 11:43:35 +02:00
Lauris BH and GitHub
2e08dd2333
Add option to set default volumes for docker backend ( #1203 )
2022-09-26 16:59:26 +02:00