vsts阶段条件:如何继续下一阶段? [英] vsts phase conditions: How to continue with next phase?

查看:58
本文介绍了vsts阶段条件:如何继续下一阶段?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的构建步骤如下:-...-npm安装-npm start sb:server(启动http-server以提供静态文件)-npm运行e2e

通过npm启动sb:server;它会启动服务器并挂起...并且不会进入下一阶段,即npm run e2e.

我想向npm run e2e添加一个条件,即它应该在不查看先前阶段状态(失败或成功)的情况下仅启动.

我已经检查了 https://docs.microsoft.com/zh-cn/vsts/pipelines/process/conditions?view=vsts#job-status-functions

我无法弄清楚必须在自定义条件"字段中设置哪种命令.

任何帮助将不胜感激!

我怀疑 npm start sb:server 必须保持运行,以便可以一直使用.因此,该命令永远不会完成.解决方法是使用cmd任务启动另一个cmd任务,然后在新cmd中运行npm start命令.

I have a build steps like: - ... - npm install - npm start sb:server (start http-server to serve static files) - npm run e2e

By the npm start sb:server; it starts the server and it hangs... and doesn't go the next phase which is npm run e2e.

I would like to add a condition to npm run e2e that it should just start without looking previous phase state (failed or succeeded).

I have checked the https://docs.microsoft.com/en-us/vsts/pipelines/process/conditions?view=vsts#job-status-functions

I can't figure out what kind of command I have to set in 'custom condition' field..

Any help would be appreciated!

解决方案

I suspect that the npm start sb:server must keeps running so that it can be used all the time. So the command is never finished. The workaround is using cmd task to start another cmd task and run the npm start command in new cmd.

这篇关于vsts阶段条件:如何继续下一阶段?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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