Azure pipeline add condition to utilize agent

bender48 1 Reputation point

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:



  • feature/test_pipeline

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

vmImage: ubuntu-latest


  • script: |
    echo "my power script"
    displayName: 'Run script'
Not Monitored
Not Monitored
Tag not monitored by Microsoft.
37,765 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. tbgangav-MSFT 10,421 Reputation points

    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