Closed steinhobelgruen closed 1 month ago
Some questions:
WOODPECKER_ESCALATE
well by default it should be allowed:
If you have changed the default privileged plugins and added a tag, now the tag is respected so it must match to be privileged:
@steinhobelgruen are you using the secrets
yaml key on the step?
Since it happens with all pipelines I can just copy a very short one completely:
steps:
docker-build:
secrets: [docker_username, docker_password]
image: woodpeckerci/plugin-docker-buildx
settings:
repo: dentaku/postfix
tags:
- latest
- v0.1
auto-tag: true
platforms: [linux/amd64, linux/arm64]
With 2.7.0 I get no warnings on this pipeline at all, 2.7.1 on the other hand complains:
[linter] docker: steps.docker-build Should not configure both secrets and settings [linter] docker: steps Must validate one and only one schema (oneOf) [linter] docker: steps.docker-build Must validate one and only one schema (oneOf) [linter] docker: steps.docker-build Additional property secrets is not allowed [bad_habit] docker: steps.docker-build Please set an event filter for all steps or the whole workflow on all items of the when block
So I probably should change something about the secrets handling now, but that doesn't explain why even docker version
fails, and it also doesn't explain why it fails with a timeout.
(I have no idea what WOODPECKER_ESCALATE is)
Ah, I found WOODPECKER_ESCALATE in the documentation. I haven't set that to anything, so it should be on default.
You're using secrets. That's forbidden for security reasons. While it was possible to use it before, it never was documented that this is possible.
Adding secrets means that this is not treated as plugin internally anymore and therefore it won't get privileged
which is required to access the docker daemon. Thus it also can't run docker version
.
Instead, use settings
with from_secret
.
steps:
docker-build:
image: woodpeckerci/plugin-docker-buildx
settings:
...
username:
from_secret: docker_username
password:
from_secret: docker_password
Thanks, that works, I'll close the issue.
But:
While it was possible to use it before, it never was documented that this is possible.
Yes, it is documented exactly like that here: https://woodpecker-ci.org/docs/usage/secrets#use-secrets-in-commands
@steinhobelgruen yes for commands
You use a plugin witch has no commands ;)
But i agree the docs should be improved ...
@steinhobelgruen would https://github.com/woodpecker-ci/woodpecker/pull/4099 have clarifyed it for you?
@steinhobelgruen would #4099 have clarifyed it for you?
A lot. :-)
Component
agent
Describe the bug
After updating both the server and the agent to version 2.7.1 all steps using the woodpeckerci/plugin-docker-buildx stopped working. The docker build would not start:
Switching back to 2.7.0 fixed the problem.
Steps to reproduce
Expected behavior
No response
System Info
Additional context
No response
Validations
next
version already [https://woodpecker-ci.org/faq#which-version-of-woodpecker-should-i-use]