-
Notifications
You must be signed in to change notification settings - Fork 941
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
Pipeline parameters from template are not rendered in Run pipeline UI #570
Comments
This is expected, you have to define runtime parameters in the main pipeline '.azure-pipelines.yml'. I would say it's an architectural design choice, not a bug. |
Thanks @matteotumiati. Any chance to get what I'm after? Like template for variables? |
Depends a little bit on what you are after 😄 Let's assume you have a template repository, where you store all the templates and the project repository, where you have the "real" pipeline.
You could have one or more templates into the template repository, including a variables.yml file, structured in this way: variables:
- name: variablename
value: variableValue In any of the templates you can refer to the variables using: # template-1.yml
variables:
- template: variables.yml
....
steps:
... Or you can reference the same file in the project repository: # azure-pipelines.yml
resources:
repositories:
- repository: my-template-repository
type: git
name: project-name/my-template-repository
variables:
- template: template-1.yml@my-template-repository
steps:
... |
We have X repositories that use template to define the pipeline. When running manually, set of parameters should be presented and passed to templates jobs |
As far as I know there's no possibility to have either variables or runtime parameters to be "available" only when running manually. My recommendation is to go with variables.. slightly less user friendly compared to runtime parameters (but not more complicated to set when opening the build dialog), but you can override the values from REST APIs, if needed, or create templates as shown above. With runtime parameters you cannot have templates and these must be defined on top of each pipeline, which means you will have to duplicate them X times, depending on how many repos will be using the same parameters. |
Thanks @matteotumiati, I will leave the issue open, may be MS team will find this feature useful to implement |
The text was updated successfully, but these errors were encountered: