Answers: <p>Using <code>values:</code> is a way to restrict what can be passed into the parameters. For this reason, there isn't a way to wildcard an input value.</p>
  <p>Since what you want to do is allow anything but default to 'release candidate' if nothing is provided, you really only need <code>default:</code> and can remove the <code>values:</code> restriction.</p>
  
Answers: CC BY-SA 4.0
Answers: 2023-08-11T16:53:57.120Z
Answers: 2023-08-11T16:53:57.120Z
Answers: Matthew Robertson
Body: <p>In my pipeline definition, for getting resources from other pipeline, I'd like to define a default tags value to use, such as &quot;release candidate&quot;, but allow to select to use any tags or even without tag. Is there a simple way to do so?</p>
  <p>Here's my attempt but seems like &quot;*&quot; doesn't work:(</p>
  <pre><code>parameters:
  - name: TagsToUse
    displayName: 'Select the tags to use for artifact from pipeline xxxx'
    type: string
    default: 'release candidate'
    values:
    - 'release candidate'
    - '*'
  
  resources:
    pipelines:
    - pipeline: xxxx
      project: 'MyProject'
      source: 'TargetSource'
      branch: 'master'
      tags: ${{ parameters.TagsToUse }}
  ...
  ...
  ...
  </code></pre>
  
Comments: CC BY-SA 4.0
Comments: 2023-07-27T10:37:28.207Z
Comments: My gut feeling is you can't. Not everything in yaml pipelines is equal or interpreted the same way. You could try a [condition](https://learn.microsoft.com/en-us/azure/devops/pipelines/process/expressions?view=azure-devops#conditional-insertion) but I think it might not be valid `- ${{ if ne(parameters.tags, '*') }}:`
Comments: ste-fu
Comments: CC BY-SA 4.0
Comments: 2023-07-31T13:35:13.103Z
Comments: hum... thanks for your answer.
Comments: Weishan Yang
Tags: <azure-devops><azure-pipelines><build-pipeline><yaml><pipeline>
Title: How to specify ANY for tags in the yaml file for pipelines
UserDisplayName: Weishan Yang
ThreadText: # How to specify ANY for tags in the yaml file for pipelines
  
  (Asked by: username_0 on 2023-07-20)
  
  In my pipeline definition, for getting resources from other pipeline, I'd like to define a default tags value to use, such as "release candidate", but allow to select to use any tags or even without tag. Is there a simple way to do so?
  
  Here's my attempt but seems like "\*" doesn't work:(
  
  ```
  parameters:
  - name: TagsToUse
    displayName: 'Select the tags to use for artifact from pipeline xxxx'
    type: string
    default: 'release candidate'
    values:
    - 'release candidate'
    - '*'
  
  resources:
    pipelines:
    - pipeline: xxxx
      project: 'MyProject'
      source: 'TargetSource'
      branch: 'master'
      tags: ${{ parameters.TagsToUse }}
  ...
  ...
  ...
  
  ```
  
  **Tags:** azure-devops, azure-pipelines, build-pipeline, yaml, pipeline
  
  > **Comments:**
  > **username_1**: My gut feeling is you can't. Not everything in yaml pipelines is equal or interpreted the same way. You could try a [condition](https://learn.microsoft.com/en-us/azure/devops/pipelines/process/expressions?view=azure-devops#conditional-insertion) but I think it might not be valid `- ${{ if ne(parameters.tags, '*') }}:`  
  > **username_0**: hum... thanks for your answer.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_2 on 2023-08-11. Score: 0
  
  Using `values:` is a way to restrict what can be passed into the parameters. For this reason, there isn't a way to wildcard an input value.
  
  Since what you want to do is allow anything but default to 'release candidate' if nothing is provided, you really only need `default:` and can remove the `values:` restriction.
  
  
  ---
  
  