title: Azure - custom condition in YAML based pipeline
body: <p>I've an yaml based azure CI/CT pipeline. I've a task defined as below:</p>
  
  <pre><code>- task: PublishTestResults@2
    displayName: 'Publish PCOM Test Results'
    condition: always()
    inputs:
      testResultsFormat: NUnit
      testResultsFiles: '*.xml'
      searchFolder: '$(Common.TestResultsDirectory)/$(Build.SourceBranchName)/$(Build.BuildNumber)/test-results/PCOM'
      mergeTestResults: true
      testRunTitle: 'PCOM Tests'
  </code></pre>
  
  <p>It looks for all '*.xml' files under a particular s3 location. But the <code>xml</code> files will be created only if the below task is successful:</p>
  
  <pre><code>- bash: 'perl run_aws_cli.pl $(Build.BuildNumber) $(Build.SourceBranchName) $(s3Bucket) $(Build.SourcesDirectory)'
    workingDirectory: 'azure-pipeline/scripts'
    displayName: 'Run ECS Tasks'
  </code></pre>
  
  <p>So I want a custom condition to check if the later task is successful then only search <code>xml</code> files in the directory else don't search for it.
  Currently it's searching always and the earlier task(<strong>Publish PCOM Test Results</strong>) is failing.</p>