-
-
Notifications
You must be signed in to change notification settings - Fork 345
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Workflow-level backend options #3802
Comments
Since we have a lot of issues like this, we should rather implement a way to set defaults for all steps. There was an issue for this too but I can't find it... |
Found it: #2294 Would this also be fine as implementation so we can close this issue? |
In context of duplication, either #2294 or Advanced YAML syntax (I've updated Alternatives) would work, I think. But I thought, about some per-pipeline functionality and came up with
Nor #2294, nor YAML substitution won't resolve this case. |
So you would like to have both workflow and pipeline level? This is not what you wrote in the title 😉 |
My bad. I meant file - workflow. For now volume is created per workflow anyway.
This is tempting :) I think I would want it, but let's eat elephant by pieces - start from workflow and see how it is going. |
Then I don't understand your points above.
Why not? You can define the backend options as default in the workflow and it is added to all steps with #2294? |
Perhaps, I'm missing something. Consider an example default:
volumes:
- storageClassName: local-ssd # K3s Local path provisioner
resources:
requests:
storage: 512Mi
mount: /mnt/local
- storageClassName: nfs-hdd
resources:
requests:
storage: 16Gi
mount: /mnt/nfs
steps:
one:
commands:
- echo "Hello" > /mnt/local/hello.txt
- echo "world" > /mnt/nfs/world.txt
two:
commands:
- cat /mnt/local/hello.txt
- cat /mnt/nfs/world.txt Would step
and two volumes be created (not 4)? If yes, then #2294 completely suits. Edit 1. |
Here you need to explain some more about kubernetes to me... It's just the same if you specify the same backend options/properties on every single step. Your example would look like this if you want to achieve the same currently: steps:
one:
commands:
- echo "Hello" > /mnt/local/hello.txt
- echo "world" > /mnt/nfs/world.txt
volumes:
- storageClassName: local-ssd # K3s Local path provisioner
resources:
requests:
storage: 512Mi
mount: /mnt/local
- storageClassName: nfs-hdd
resources:
requests:
storage: 16Gi
mount: /mnt/nfs
two:
commands:
- cat /mnt/local/hello.txt
- cat /mnt/nfs/world.txt
volumes:
- storageClassName: local-ssd # K3s Local path provisioner
resources:
requests:
storage: 512Mi
mount: /mnt/local
- storageClassName: nfs-hdd
resources:
requests:
storage: 16Gi
mount: /mnt/nfs |
Yeah, exactly.
Currently, there is only one volume is created - WP workspace. You cannot create own. Now, if I want to bring custom volumes functionality (persistence between steps). Let me show an analogy - a service. You define it beyond the steps, only one service is created per workflow. While the service is universal syntax, I |
Ah I think I finally understood your point. The workflow-level options should be different form the step ones, right? And not just a simple default value for all steps. So the handling of it happens before the steps are executed. Then it's different from the default feature of course. |
Clear and concise description of the problem
Currently, we have plenty of backend options. Consider Kubernete, for example.
While we can set them per-step:
Suggested solution
it would be nice if we could set them per-workflow and override/refine in steps:
Alternative
Additional context
It would allow to implement backend-specific custom volumes per workflow, for example.
Validations
next
version already [https://woodpecker-ci.org/faq#which-version-of-woodpecker-should-i-use]The text was updated successfully, but these errors were encountered: