Skip to content

Instantly share code, notes, and snippets.

@bjh1977
Created May 26, 2021 13:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bjh1977/893225d7bda2523e245f0878875750f8 to your computer and use it in GitHub Desktop.
Save bjh1977/893225d7bda2523e245f0878875750f8 to your computer and use it in GitHub Desktop.
pool:
vmImage: windows-latest
variables:
- template: vars-all.yml
- template: vars-dev.yml
steps:
# Use default for variable value (look for "$(..)"), but only for variable name "resourcename", and only warn
- task: validateVariablesTask@0
displayName: 'Validate Variables 1'
inputs:
varNameRegex: resourcename
warnOrError: Warn
# Use default for variable value (look for "$(..)"), warnOrError (error), but only for variable name "resourcename"
- task: validateVariablesTask@0
displayName: 'Validate Variables 2'
inputs:
varNameRegex: resourcename
# Use default for variable value (look for "$(..)"), but only for variable name "resourcename", and only warn
- task: validateVariablesTask@0
displayName: 'Validate Variables 3'
inputs:
varNameRegex: resourcename
warnOrError: Warn
# Use defaults (check all vars, look for "$(..)"), error if invalid
- task: validateVariablesTask@0
displayName: 'Validate Variables 4'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment