VSTS-有没有一种方法可以仅在特定任务失败时才运行任务? [英] VSTS - Is there a way to only run a task if a specific task has failed?

查看:71
本文介绍了VSTS-有没有一种方法可以仅在特定任务失败时才运行任务?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要在我的构建定义中运行一个发布任务,但前提是某个任务失败之前.如果其他任务通过了,我希望忽略它并且不运行.

I need to run a publish task in my build definition but only if a certain task before it has failed. If the other task passes I want this to be ignored and not run.

有没有办法做到这一点?

Is there a way of doing this?

我希望我可以根据任务成功设置输出变量,然后在失败的情况下在自定义条件下使用该变量来运行任务.

I was hoping that I could set an output variable based on the task success and then use that variable in a custom condition to run the task if it's failed.

如果任务失败,我看不到如何设置输出变量.这可能吗?

I can't see how to set an output variable if the task fails. Is this possible?

推荐答案

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