Jaj*_*415 10 azure azure-webjobs webjob azure-devops
有没有办法让我的Azure WebJob自动部署而无需右键单击并选择"每次发布为Azure WebJob"?即当我签入我的解决方案时,它会自动部署到Azure Portal webjob部分
While I tried to accomplish this, I found out that there is no tooling support for dotnet core projects as of now. The proposed webjobs.props/ msbuild solutions are all dotnet framework specific.
However I also found out that a webjob can be anything that's executable on the local machine (could be node.js or just a batch command).
The key is to understand how WebJobs are recognized by the host:
run.cmd file that contains instructions on how to start the webJob. For dotnet core that would be dotnet MyDll.dll %* (%* to pass arguments for output redirection etc. down from the host). run.cmd file needs to be located either at app_data/jobs/continuous/[NameOfJob] or app_data/jobs/triggered/[NameOfJob]. For the triggered job you could also add a schedule using a settings.job file like described here. run.cmd at the proper location it will be recognized as a WebJobNow to deploy a webjob using VSTS regardless of the runtime framework follow these steps:
settings.job here if needed.app_data/jobs/[triggered/continuous]/[nameOfJob] and copy your executables into the lowest folder. Make sure run.cmd is directly under the [nameOfJob]/ directory就是这样。
是的你可以。
\n\n布雷迪·加斯特 (Brady Gaster) 在博客文章中写到了这一点(我自己还没有尝试过)。
\n\n据我所知,TL;DR; 总结如下:
\n\n\n\n\n将名为 webjobs.props 的文件添加到您要发布的 Web 应用程序项目或控制台应用程序的属性文件夹\xe2\x80\x99
\n
之后,编辑文件,使ManagementCertificate、SubscriptionId和PublishSettingsPath填充正确的数据。
现在您应该能够使用命令发布文件
\n\nmsbuild WebJobDemo.Web.csproj /p:DeployOnBuild=true /p:PublishProfile=WebJobDemo /p:VisualStudioVersion=12.0 /p:Password=asdfasdf\nRun Code Online (Sandbox Code Playgroud)\n\n(注意,帖子是针对VS2013写的)
\n\n\n\n当然,只要将某些内容签入存储库,您就可以在 VSTS(或任何其他与此相关的构建/部署工具)中自动执行此操作。
\n\n关于如何通过命令行在 VSTS 中执行此操作的(相当完整的)答案可以在此答案中找到:https ://stackoverflow.com/a/45703975/352640
\n| 归档时间: |
|
| 查看次数: |
6177 次 |
| 最近记录: |