2

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:

enter image description here

How should I define var for user's input?

2 Answers 2

7

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.

Sign up to request clarification or add additional context in comments.

Comments

1

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.

1 Comment

It seems that docs are updated, and runtime parameters are the recommended way now.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.