Is it possible to show Azure pipeline parameters according to conditions?

XIA Huaqin 20 Reputation points
2023-11-15T05:50:58.1566667+00:00

Hi there, I set up an Azure pipeline to run some tests, and I always trigger it manually, and the YAML file is something like following

parameters:
  - name: env
    type: string
    default: 'dev'
    values:
      - 'dev'
      - 'qa'
  - name: target
    type: string
    default: 'P1'
    values:
      - 'P1'
      - 'P2'
      - 'P3'

as you can see there're some predefined parameters for this pipeline, when I click Run, I can select value for env and target manually, but actually there are some limitation here:

  1. when dev is selected for env, only P1 or P2 are supposed to be available
  2. when qa is selected for env, only P2 or P3 are supposed to be available

so is it possible to show only P1 and P2 when dev is selected in the UI, and show P2/P3 when qa is selected? Thanks.

Community Center Not monitored
0 comments No comments
{count} votes

Accepted answer
  1. PRADEEPCHEEKATLA 90,641 Reputation points Moderator
    2023-11-15T06:10:54.3733333+00:00

    @XIA Huaqin - Thanks for the question and using MS Q&A platform.

    Azure Devops is currently not supported in the Q&A platform. the supported products are listed over here https://learn.microsoft.com/en-us/answers/ (more to be added later on).

    The query posted by you has not reached the right forum. In order to assist best on your query, I would request you to post your query in SO => Azure Devops dedicated support. Additionally, adding the [Azure] tag on SO will increase visibility as it is a Microsoft Sponsored tag.

    https://stackoverflow.com/questions/tagged/azure-devops

    OR

    Report any Azure Devops problems on Developer Community.

    This will assist you with a faster reply to your query.

    Hope this helps. Do let us know if you any further queries.


    If this answers your query, do click Accept Answer and Yes for was this answer helpful. And, if you have any further query do let us know.

    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.