Is an Azure DevOps build pipeline, is there a way to cancel one pipeline job from another job?
问题 I have an Azure DevOps Build Pipeline which contains two Agent Jobs, which I'll call Job A and Job B. I want these jobs to run simultaneously, but if Job A fails, then I don't need Job B to run to completion. Is there any way to add a task to Job A which will cancel Job B (or, alternately, terminate the entire pipeline with a "Failed" status) if any of Job A's tasks failed? 回答1: Add a PowerShell task that cancel the pipeline when a task failed: steps: - powershell: | Write-Host "Cancel all