VSTS和Azure部署持续交付时出错

时间:2017-09-28 04:59:01

标签: visual-studio azure azure-devops azure-web-sites azure-pipelines

我试图成功构建VSTS项目(由VS2017文件/新向导设置的ASP.NET Core 2.0 / React-Redux基本项目)以部署到Azure。我从github那里取了我的来源。

当app service deploy启动时,它会一直运行直到发生错误:(请参阅:错误:找不到包含指定模式的包)。

Starting: Azure App Service Deploy: svcc-reaxxx
******************************************************************************
==============================================================================
Task         : Azure App Service Deploy
Description  : Update Azure Web App Services, Web App On Linux , Function Apps, Mobile Apps using Web Deploy / Kudu REST APIs
Version      : 3.3.15
Author       : Microsoft Corporation
Help         : [More Information](https://aka.ms/azurermwebdeployreadme)
==============================================================================
Got connection details for Azure App Service:'svcc-react2'
Error: No package found with specified pattern
Successfully updated deployment History at https://svcc-reaxx.scm.azurewebsites.net/deployments/715065743
******************************************************************************
Finishing: Azure App Service Deploy: svcc-reaxxx
******************************************************************************
******************************************************************************
Starting: Post Job Cleanup
******************************************************************************
Cleaning any cached credential from repository: pkellner/svcc-reacxx (Git)
git remote set-url origin https://github.com/pkellner/svcc-reaxx.git
git remote set-url --push origin https://github.com/pkellner/svcc-reaxx.git
******************************************************************************
Finishing: Post Job Cleanup
******************************************************************************
******************************************************************************
Finishing: Build
******************************************************************************

1 个答案:

答案 0 :(得分:2)

默认核心模板将文件发布到工件文件夹,因此如果不更改它,则需要指定工件文件夹。

所以,改用$(Build.ArtifactStagingDirectory)/**/*.zip

示例任务:

  1. NPM安装
  2. .NET Core Restore
  3. .NET Core Build
  4. .NET Core Publish(参数:--configuration $(BuildConfiguration) --output $(build.artifactstagingdirectory);检查Zip已发布项目和发布Web项目选项)
  5. Azure App Service Deploy任务(包或文件夹:$(Build.ArtifactStagingDirectory)/**/*.zip