Does the failed condition take arguments i e can I set the condition to trigger only if failing 3 times

0 votes

I want to run my PublishBuildArtifacts@1 task with the condition set to failed (). 

However, I'd like to configure it so that it only publishes the artefact after three failed tests.

  - task: PublishBuildArtifacts@1
    condition: failed()
    inputs:
      PathtoPublish: '$(System.DefaultWorkingDirectory)/$(testFolder)/$(screenshotFolder)'
      ArtifactName: 'screenshots'
      publishLocation: 'Container'
    displayName: 'Publish Screenshots for Failed Tests'

It is currently publishing all failing test screenshots, including those that passed on retry.

Dec 19, 2022 in DevOps on Cloud by Damonlang
• 1,230 points
312 views

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.

Related Questions In DevOps on Cloud

0 votes
1 answer

I am looking for a python code to get my Azure VM status in my email , like whether the running vms port is open to the internet. If its open to internet I should get a mail notification

Hey, @Sourav, Check this out https://www.edureka.co/community/66025/azure-vm-monitoring It deals with ...READ MORE

answered May 29, 2020 in DevOps on Cloud by Sirajul
• 59,230 points
1,415 views
+2 votes
3 answers

How do I deploy Scala PlayFramework Project to IBM Bluemix

It seems that they are more than ...READ MORE

answered Oct 18, 2018 in DevOps on Cloud by lina
• 8,220 points
877 views
0 votes
1 answer

How can I remove a port from url for node app using nginx

If you run your node server on ...READ MORE

answered Apr 10, 2018 in DevOps on Cloud by ajs3033
• 7,300 points
3,634 views
0 votes
1 answer

Is it possible to open a bug in VSTS if release deployment fails?

You can do this by adding another ...READ MORE

answered Apr 24, 2018 in DevOps on Cloud by DareDev
• 6,890 points
476 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP