A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://learn.microsoft.com/en-us/azure/devops/pipelines/yaml-schema/target-settable-variables below:

target.settableVariables definition | Microsoft Learn

Restrictions on which variables that can be set by a step.

Definitions that reference this definition: target

Implementations

You can disable setting all variables for a step, or restrict the settable variables to a list. If the settableVariables property is not set, the default allows all variables to be set by a step.

settableVariables: none

Disable a step from setting any variables.

settableVariables: none # Disable a step from setting any variables.

settableVariables string. Allowed values: none.

Disable a step from setting any variables.

Examples
steps:
- script: echo This is a step
  target:
    settableVariables: none
settableVariables: string list

Restrict a step from setting any variables not in the specified list.

settableVariables: [ string ] # Restrict variable setting to a list of allowed variables.
List types Type Description string Restrict variable setting to a list of allowed variables. Examples

In the following example, the bash step can only set the value of the sauce variable. When the pipeline runs, the secretSauce variable is not set, and a warning is displayed on the pipeline run page.

steps:
  - bash: |
      echo "##vso[task.setvariable variable=sauce;]crushed tomatoes"
      echo "##vso[task.setvariable variable=secretSauce;]crushed tomatoes with garlic"
    target:
     settableVariables:
      - sauce
    name: SetVars
  - bash: 
      echo "Sauce is $(sauce)"
      echo "secretSauce is $(secretSauce)"
    name: OutputVars
See also

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4