Process parameters
Azure DevOps Services | Azure DevOps Server 2020 | Azure DevOps Server 2019 | TFS 2018
Note
This guidances does not apply to YAML pipelines. For parameters in YAML pipelines, see runtime 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.
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 more data types like check boxes and drop-down list boxes.
Note
The Link and Unlink functionality applies to build pipelines only. It does not apply to release pipelines.
To link more arguments across all tasks to new or existing process parameters, select Link from the task argument.
Set a process parameter from a template in a build pipeline
You can create a process parameter from a task input in a build pipeline. Process parameters are useful if you will have the same input values in multiple tasks. You can link more arguments across all tasks to new or existing process parameters.

To link a process parameter:
Select the i icon that is part of a task input field.
In the window that opens, select Link.
Configure the Link settings. You can set a new Display name so that you can identify the process parameter later on.
You'll now have the option to link your process parameter when you reuse the same task. To link a process parameter, select the i icon and click Link.
Set the Process parameter to link to this setting to reference your existing process parameter and select Link.
Select Unlink if you need to disconnect an argument from a process parameter.
You can also unlink arguments from process parameters.
Select the link icon.
Choose the Unlink option. In this example, the
Parameter.solutionprocess parameter is unlinked.

Define a new process parameter
You can define a new process parameter using the json definition for your pipeline.
Export the existing template from the Build Definitions page.
Open the JSON in a text editor. Add a new input in the process parameter section of your file. If you have existing process parameters, you can duplicate one of them. For example, this is a new parameter definition based on the msBuildArgs parameter.
{ "aliases":[ ], "options":{ }, "properties":{ }, "name":"myNewParam", "label":"MyProcessParam", "defaultValue":"/p:DeployOnBuild=true /p:WebPublishMethod=Package /p:PackageAsSingleFile=true /p:SkipInvalidConfigurations=true /p:PackageLocation=\"$(build.artifactstagingdirectory)\\\\\"", "type":"string", "helpMarkDown":"Additional arguments for process parameters.", "visibleRule":"", "groupName":"" }Add the new parameter as an input value for any tasks where you want to use it. For example, here the new value of
msbuildArgsismyNewParam."inputs":{ "solution":"$(Parameters.solution)", "vsVersion":"latest", "msbuildArgs":"$(Parameters.myNewParam)", "platform":"$(BuildPlatform)", "configuration":"$(BuildConfiguration)", "clean":"false", "maximumCpuCount":"false", "restoreNugetPackages":"false", "msbuildArchitecture":"x86", "logProjectEvents":"true", "createLogFile":"false" }Return to the Build Definitions page and select Import.
Add your
jsonfile and import the pipeline.Within your imported pipeline, you now have the option to link to your new process parameter. You may need to unlink and then link again for the process parameter to appear.
الملاحظات
إرسال الملاحظات وعرضها المتعلقة بـ