vsts phase conditions: How to continue with next phase?

这一生的挚爱 提交于 2021-01-29 05:17:06

问题


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!


回答1:


Every task has a "continue on error" checkbox. Check that. Then, if that task fails, it is treated as a warning, not an error. Execution of subsequent tasks will happen normally.




回答2:


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.



来源:https://stackoverflow.com/questions/51302018/vsts-phase-conditions-how-to-continue-with-next-phase

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!