You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Woodpecker CI could benefit from using some defaults to avoid repetitive blocks and/or references to anchors.
This is something I used to use in GitLab CI and it makes the pipeline really compact. For instance, they have a default keyword to configure some "default" values that apply to all subsequent steps — when relevant.
Suggested solution
default:
image: docker.io/library/rust:1.61-slim-bullseyepipeline:
format:
commands:
- rustup component add rustfmt
- cargo fmt -- --checkenvironment:
CARGO_HOME: .cargo/group: verify# No need to specify image here since it's inferred by "default"assemble:
commands:
- cargo buildenvironment:
CARGO_HOME: .cargo/group: assemble# No need to specify image here since it's inferred by "default"publish:
commands:
- cargo blahenvironment:
CARGO_HOME: .cargo/group: publishimage: docker.io/library/rust:1.62-slim-bullseye # ...if defined, overwrites what's in default
This discussion was converted from issue #946 on August 20, 2023 20:29.
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Clear and concise description of the problem
Woodpecker CI
could benefit from using some defaults to avoid repetitive blocks and/or references to anchors.This is something I used to use in
GitLab CI
and it makes the pipeline really compact. For instance, they have adefault
keyword to configure some "default" values that apply to all subsequent steps — when relevant.Suggested solution
Alternative
YAML aliases and anchors 😒
Additional context
No response
Validations
Beta Was this translation helpful? Give feedback.
All reactions