0
votes

What is the difference between linked task parameters (process parameters) and variables in classic Azure DevOps build pipeline? Don't they all allow having a single place where to change values?

What I mean by "linked" task parameters are what you get by clicking the link icon when configuring tasks like below

linking the

which leads to adding a textbox for the linked value in settings page for the pipeline as you see below

enter image description here

1
Do you mean the difference between the "Pipeline Variables" and "Variable groups" under the variables tab?Matt
@Matt I added screenshots to my initial post to clarify my questionwhatever

1 Answers

2
votes

Regarding parameters in the classic pipeline, we generally use Process parameters. You can link all important arguments for tasks used across the build definition as process parameters, which are then shown at one place-the Pipeline view. This means you can quickly edit these arguments without needing to click through all the tasks. Templates come with a set of predefined process parameters.

Variables give you a convenient way to get key bits of data into various parts of the pipeline. The most common use of variables is to define a value that you can then use in your pipeline. All variables are stored as strings and are mutable. The value of a variable can change from run to run or job to job of your pipeline.

The difference between them is:

  • Variables can be a convenient way to collect information from the user up front. You can also use variables to pass data from step to step within a pipeline.Unlike variables, pipeline parameters can't be changed by a pipeline while it's running.

    Parameters have data types such as number and string, and they can be restricted to a subset of values. Restricting the parameters is useful when a user-configurable part of the pipeline should take a value only from a constrained list. The setup ensures that the pipeline won't take arbitrary data.

  • Process parameters differ from variables in the kind of input supported by them. Variables only take in string inputs while process parameters in addition to string inputs support additional data types like check boxes and drop-down list boxes.

For detailed information, please refer to the following documents:

Define variables

Process parameters

Variables and parameters