Closed greenaar closed 2 days ago
I'm for the alternative.
You're referring to a setting of a specific plugin, don't you?
The following syntax
volumes:
- woodpecker-cache:/woodpecker/src/cache
is still supported.
And to have woodpecker-cache
available in the first place, a PVC must be created externally, yes. Maybe I didn't get the full problem yet?
The volumes: section is required and supported, and works with a manually created PVC.
The settings
noted in the doc did not work under for me under 2.7.3 - they throw Cannot configure both commands and settings
when using a simple:
build:
image: debian:bookworm
volumes:
- woodpecker-cache-claim:/cache
commands:
- ls -al /cache
With settings
removed and volumes
left in place, I was able to confirm the volume mounted and was writeable (and persistent).
This suggests that the mount setting isn't required to make this operate.
Ah, yes. settings:
is a reserved key for plugins and for these one cannot use arbitrary commands anymore.
So yes, the example is a bit unfortunate in that it uses an old drone plugin which combines both (it wouldn't have been needed in the first place). Changing it to a generic step that mounts a volume is a good change.
There is no commands
in Kubernetes example, nor in meltwater/drone-cache.
However, example with generic step is, probably, less confusing.
Done? Can be closed?
Yes, apologies. That's sorted. closing this now.
Clear and concise description of the problem
https://woodpecker-ci.org/docs/next/administration/backends/kubernetes#volumes
Make reference to
Which is no longer supported when used with things like
command:
Suggested solution
Removing that part, and including a sample PVC like
Might go well to enhancing this part of the documentation.
Alternative
Alternatively, just removing that settings part and providing a link to the kubernetes docs (https://kubernetes.io/docs/concepts/storage/persistent-volumes/) might serve as well.
Additional context
No response
Validations
next
version already [https://woodpecker-ci.org/faq#which-version-of-woodpecker-should-i-use]