Parameterzing the pool name in the deploymenet file

Diptesh Kumar 246 Reputation points
2025-04-28T07:28:25.9133333+00:00

Can we parameterize the pool name in the below highlighted section? below is the deployment file.

while running pipeline i should provide pool name so that deployment file will take pool name and run it while running the pipeline

User's image

Azure DevOps
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Divyesh Govaerdhanan 3,420 Reputation points
    2025-04-28T22:29:32.52+00:00

    Hello,

    Welcome to Microsoft Q&A,

    Yes, you can define the variables and initialize them with the default value in the YAML file. While triggering the pipeline manually, you will be able to override the value.

    variables:
         poolName: MySelfHostedPool
    
    jobs:
     - job: MyJob
       displayName: My Job
       pool:
          name: $(poolName)
    
    

    User's image


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.