Woodpecker is a community fork of the Drone CI system.
Find a file
Alexander Matyushentsev 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:


2171212c5a/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:


2171212c5a/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
.github Change issue template labels (#1593) 2023-02-28 18:31:40 +01:00
.vscode Use modern error handling and enforce it via lint (#1327) 2023-02-02 00:08:02 +01:00
.woodpecker Move helm charts to own repo "helm" (#1589) 2023-02-23 15:22:01 +02:00
agent Store an agents list and add agent heartbeats (#1189) 2023-01-28 14:13:04 +01:00
cli Allow adding additional labels/annotations to kubernetes worker pods (#1510) 2022-12-31 01:37:09 +01:00
cmd feat: expose unprotected metrics endpoint (#1614) 2023-03-12 09:41:10 +01:00
contrib/woodpecker-test-repo/.woodpecker Create test repo on Gitpod start (#1248) 2022-10-09 22:13:04 +02:00
docker Makefile tweaks (#1410) 2022-11-22 23:39:49 +01:00
docs feat: expose unprotected metrics endpoint (#1614) 2023-03-12 09:41:10 +01:00
nfpm fix nfpm (#788) 2022-02-24 15:35:11 +01:00
pipeline fix: docker backend should not close 'engine.Tail' result (#1616) 2023-03-12 16:01:09 +01:00
server Persist DepStatus of tasks (#1610) 2023-03-11 01:58:28 +01:00
shared Deduplicate step docker container volumes (#1571) 2023-01-31 21:33:40 +01:00
version gofumpt -w -l -extra . (#661) 2022-01-05 21:50:23 +01:00
web Translated using Weblate (Finnish) 2023-03-08 06:30:13 +00:00
woodpecker-go Rename remote to forge (#1357) 2022-11-05 00:35:06 +01:00
.changelog.yml Changelog for v0.14.1 (#334) (#340) 2021-09-23 02:21:28 +02:00
.ecrc Use editorconfig-checker (#982) 2022-06-17 12:03:34 +02:00
.editorconfig Use editorconfig-checker (#982) 2022-06-17 12:03:34 +02:00
.gitignore Make exec run be detected as WoodpeckerCI (#1218) 2022-09-27 22:19:39 +02:00
.gitpod.yml Fix gitea development setup (#1613) 2023-03-11 07:08:00 +01:00
.golangci.yml Use modern error handling and enforce it via lint (#1327) 2023-02-02 00:08:02 +01:00
CHANGELOG.md Add Changelog for v0.15.6 (#1498) (#1500) 2022-12-23 20:18:18 +01:00
CONTRIBUTING.md Update Owners 2023 (#1516) 2023-01-01 19:33:08 +01:00
docker-compose.example.yml Renamed procs/jobs to steps in code (#1331) 2022-10-28 17:38:53 +02:00
docker-compose.gitpod.yml Create test repo on Gitpod start (#1248) 2022-10-09 22:13:04 +02:00
go.mod Update dependencies golang/x libs (#1612) 2023-03-10 19:23:07 +01:00
go.sum Update dependencies golang/x libs (#1612) 2023-03-10 19:23:07 +01:00
LICENSE Optimize license files (#355) 2021-09-25 15:15:54 +02:00
Makefile Bump xgo and go to v1.19.5 (#1538) 2023-01-13 21:03:46 +01:00
README.md Fix gitpod link (#1228) 2022-10-01 13:54:19 +02:00
SECURITY.md Create SECURITY.md (#396) 2021-10-03 16:15:58 +02:00

Woodpecker


Translation status


Woodpecker

Woodpecker is a community fork of the Drone CI system.

woodpecker

🫶 Support

Please consider to donate and become a backer. 🙏 [Become a backer]

🚀 Usage

.woodpecker.yml

  • Place your pipeline in a file named .woodpecker.yml in your repository
  • Pipeline steps can be named as you like
  • Run any command in the commands section

Read More

Build steps are containers

  • Define any Docker image as context
  • Install the needed tools in custom Docker images, use them as context

Read More

Plugins

Woodpecker has official plugins, but you can also use your own.

Read More

📖 Documentation

https://woodpecker-ci.org/

Contribute

See Contributing Guide

Open in Gitpod

📣 Translate

We use an own Weblate instance at translate.woodpecker-ci.org.

Translation status

👋 Who uses Woodpecker?

Codeberg, the Woodpecker project itself, and many others.

Leave a comment if you're using it as well.

Also consider using the topic WoodpeckerCI in your repository, so others can learn from your config and use the hashtag #WoodpeckerCI when talking about the project on social media!

Here are some places where people mention Woodpecker:

Stars over time

Stargazers over time

License

Woodpecker is Apache 2.0 licensed with the source files in this repository having a header indicating which license they are under and what copyrights apply.

Files under the docs/ folder are licensed under Creative Commons Attribution-ShareAlike 4.0 International Public License.