I want user to enter value of the variable before click on Run pipeline button
I have empty variable in pipeline.yml:
- name: projectName
value:
But UI doesn't show it:
How should I define var for user's input?
From the docs:
You can choose which variables are allowed to be set at queue time, and which are fixed by the pipeline author. If a variable appears in the variables block of a YAML file, it's fixed and can't be overridden at queue time. To allow a variable to be set at queue time, make sure it doesn't appear in the variables block of a pipeline or job. You can set a default value in the editor, and that value can be overridden by the person queuing the pipeline.
So, you should remove it from the YAML and define in via the UI.
Docs recommend runtime parameters now, they are defined in YAML (it seems docs were updated since the previous answer).
You have two options for defining queue-time values. You can define a variable in the UI and select the option to Let users override this value when running this pipeline or you can use runtime parameters instead. If your variable isn't a secret, the best practice is to use runtime parameters.