woodpecker-ci/woodpecker

Add option to pass custom variables to the cli

Closed this issue · 6 comments

Add option to pass custom variables to the cli

Could you elaborate what kind of variables your are looking for?

hi @anbraten, I had the impression that woodpeckerci allows the passage of custom variables to the pipeline, as indicated by the web interface when manually running a pipeline. This issue was to suggest adding a feature to the CLI to allow the same.

Now, I am not sure my understanding is correct anymore as I can't find any reference of how and where to set and use those variables.

I guess --env is what you are looking for: https://woodpecker-ci.org/docs/cli#exec

thanks @anbraten. A bit irrelevant to the original issue, but I'm wondering whether it's possible to define custom variables in the pipeline definition and interpolate them in the pipeline steps?

@anbraten Can we reopen this issue please? custom variables are different from environment variables in woodpecker as far as I can understand. Also, environment variables can not be used inside a workflow-wide evaluate condition, can they?

Also, environment variables can not be used inside a workflow-wide evaluate condition, can they?

They should be usable.

custom variables are different from environment variables

not quite sure what you mean by custom variables

Mabye #3661 is sth you are looking for