除少数几个任务外,如果所有先前的任务都成功,则运行任务B(如果任务列表成功,则运行任务) [英] Run a task B when all the previous tasks have succeeded except few tasks(Run a task if a list of task is succeeded)

查看:45
本文介绍了除少数几个任务外,如果所有先前的任务都成功,则运行任务B(如果任务列表成功,则运行任务)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在所有先前的任务都成功完成(一个任务除外)之后运行任务B.需要明确的是,任务A位于任务B之前.任务A的输出与任务B无关紧要,如果除A以外的所有任务都已通过,则任务A的输出应运行.如何为此设置自定义条件?

I want to run a task B when all the previous tasks have succeeded except one. To be clear, task A comes before task B. The output of task A should not matter to task B and it should run if all the tasks other than A have passed. How to set a custom condition for that?

换句话说,如果任务列表成功,则运行任务?

Or in other words, Run a task if a list of task is succeeded?

推荐答案

您可以在powershell或其他脚本下包装并运行TaskA.使TaskA的脚本采用这种方式,这样就不会失败!您可以在脚本下设置一个条件,如果该条件未能设置管道变量以进行进一步检查,但对于管道任务,则应始终通过该条件.根据管道变量,您可以运行或取消即将执行的任务.

You can wrap and run your Task A under powershell or some other script. Make your script for TaskA such a way so it should not fail! You can have a condition under script for which if it fails to set the pipeline variable for further inspection but for pipeline task it should always pass. Based on the pipeline variable you can run or cancel the upcoming tasks.

这篇关于除少数几个任务外,如果所有先前的任务都成功,则运行任务B(如果任务列表成功,则运行任务)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆