Azure pipeline add condition to utilize agent

bender48 1 Reputation point
2022-04-28T08:07:17.597+00:00

would like to insert a condition in my pipeline, specifically I would like the swich pipeline from the default agent to the custom one when I get an error, ho to insert this condition in pipeline? NB: I have just created and installed my custom agent on private VM in azure

eg this is my azure-pipelines.yml file:

Blockquote

trigger:

  • feature/test_pipeline

how to insert an 'if condition' to choose different agent
if default is not available or get error

pool:
vmImage: ubuntu-latest

steps:

  • script: |
    echo "my power script"
    displayName: 'Run script'
Community Center Not monitored
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. tbgangav-MSFT 10,426 Reputation points Moderator
    2022-05-31T04:14:44.237+00:00

    Hi @bender48

    Azure DevOps is currently not supported in this Microsoft Q&A platform. These are the products that are currently supported in this Microsoft Q&A platform. You may ask Azure DevOps related questions in this developer community / via this Azure DevOps services support.

    0 comments No comments

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.