Ronald Abellano
Ronald Abellano

Reputation: 874

How to make partially succeeded stage to failed in Azure DevOps?

I'm running newman tests on the release pipeline but when tests have error it just mark the stage as partially succeeded, but I want to make it failed to trigger the Auto-Redeploy Trigger. Is this possible?

enter image description here

Upvotes: 1

Views: 8128

Answers (2)

LoLance
LoLance

Reputation: 28166

I want to make it failed to trigger the Auto-Redeploy Trigger. Is this possible?

To make the stage to fail:

Yes, it's possible. When we enable the Continue on error option for one test task, the test task and following tasks would continue to run even when there's error in test task. And the stage which contains the test task will be marked with partial succeeded, so unchecking/disabling the Continue on error would make the stage to fail instead of partially succeed.

enter image description here

To make auto-redeploy:

enter image description here

More details about auto-redeploy you can check this thread.

Upvotes: 1

nrllhcinar
nrllhcinar

Reputation: 109

If you are using powershell tasks for trigger newman tests, you can set task result state with below commands.

  • Write-Host "##vso[task.complete result=Succeeded;]"
  • Write-Host "##vso[task.complete result=SucceededWithIssues;]"
  • Write-Host "##vso[task.complete result=Failed;]"

Upvotes: 5

Related Questions