首页 文章

如何使用Azure App服务部署任务通过VSTS将多个jar文件上载到Azure

提问于
浏览
0

如何使用Azure App服务部署任务通过VSTS将多个jar文件部署到Azure中 . 目前我使用azure app service deploy任务部署War文件,但我无法部署jar文件 . 它抛出错误 . 任务名称为:Azure app service deploy.I尝试使用这种模式进行部署:$(System.DefaultWorkingDirectory)/ project_name / drop / * .jar和$(System.DefaultWorkingDirectory)/project_name/drop/jarfile.jar

我在发布定义时运行azure app service deploy任务 .

两种模式都不起作用 . 抛出错误 .

那么有人可以帮我解释如何完成这项任务吗?

错误:

在VSTS中的azure app service部署任务中,我在包或文件夹选项中提供以下模式时出错 .

$(System.DefaultWorkingDirectory)/project_name/drop/*.jar

Error:
More than one package matched with specified pattern. Please restrain the search pattern.


Error getting when I am giving the below pattern in package or folder option in azure app service deploy task in VSTS.

$(System.DefaultWorkingDirectory)/project_name/drop/jarfile.jar


 [command]"C:\Program Files\IIS\Microsoft Web Deploy V3\msdeploy.exe" -verb:sync -source:package='d:\a\r1\a\project_name\drop\direcotry1\target\jarfile.jar' -dest:contentPath='abc-dev',ComputerName='https://abc-dev.scm.azurewebsites.net:443/msdeploy.axd?site=abc-dev',UserName='********',Password='********',AuthType='Basic' -enableRule:DoNotDeleteRule -userAgent:VSTS_f2463a61-0e8b-4b3a-841d-15b916aae127_release_4_236_570_1
2017-11-02T11:12:56.6532444Z ##[error]Failed to deploy web package to App Service.
2017-11-02T11:12:56.6542438Z ##[error]Error: Package file 'd:\a\r1\a\project_name\drop\direcotry1\target\jarfile.jar' does not have a .zip file name extension.
Error count: 1.

请帮助我这个..如何给模式上传多个jar文件 .

1 回答

  • 0

    取消选中 Azure App Service Deploy 任务的 Additional Deployment options 部分中的 Publish using Web Deploy 选项,然后在 Package or folder 输入框中指定文件夹路径 .

    enter image description here

    更新:

    enter image description here

    如果该文件夹中有一些您不想部署到azure应用程序服务的文件,则可以通过Copy File任务将必要的文件复制到另一个文件夹

    更新:

    enter image description here

相关问题