VSTS部署成功后,如何在azure应用程序服务上运行npm命令? [英] How to run npm command on azure app service after deployment success by VSTS?

查看:60
本文介绍了VSTS部署成功后,如何在azure应用程序服务上运行npm命令?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

现在我可以从VSTS部署到azure,但是在部署成功后我不能运行npm.

Now I can deploy from VSTS to azure, but I can't run npm after deploy is successful.

现在它的工作方式类似于->为分支文件运行npm install => zip =>复制到azure =>部署.

Now it is work like -> run npm install for branch files => zip => copy to azure => deploy.

我想在该链的末尾添加 npm run custom-comand . 怎么做?

I want to add npm run custom-comand to end of this chain. How to do it?

推荐答案

VSTS中的 Azure App Service部署任务现在支持部署后脚本.这是该任务的版本3. *的屏幕截图:

The Azure App Service Deployment task in VSTS now supports a post-deployment script. Here is a screen-shot from version 3.* of the task:

请参见任务参数以获取更多详细信息.

See Task Parameters for more details.

Windows App Services用户:请注意 npm错误阻止运行多个npm命令(内联或在脚本中).例如:

Windows App Services users: Watch out for an npm bug that prevents multiple npm commands from being run (inline or in a script). For example:

npm install
npm test

将仅运行npm install.有几种解决方法,包括:

Will only run npm install. There are several workarounds including this:

npm install & npm test

这篇关于VSTS部署成功后,如何在azure应用程序服务上运行npm命令?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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