【发布时间】:2020-11-05 02:20:47
【问题描述】:
使用 Azure DevOps / Pipelines,我能够构建 Angular 应用程序并将其部署到特定环境。
今天的工作方式类似于 1 个 Angular(相同的代码),它是在 2 个不同的环境中构建的。为此,我有 2 个具有相同任务的管道,除了最后一个是不同的插槽。在简历中是这样的
Pipeline Staging
1. Node.js tool installer
2. npm (install -g @angular/cli)
3. npm (npm install)
4. npm (run build)
5. Azure App Service deploy (slot: Dev)
Pipeline Prod
1. Node.js tool installer
2. npm (install -g @angular/cli)
3. npm (npm install)
4. npm (run build)
5. Azure App Service deploy (slot: Production)
现在我想使用 DevOps / Releases 来改进它,但我不知道如何配置。
这就是我想要做的事情
1. Setup
1.1. Node.js tool installer
1.2. npm (install -g @angular/cli)
1.3. npm (npm install)
2. Build
2.1. npm (run build)
3. Deploy
3.1. Azure App Service deploy (slot: Dev)
4. Deploy
4.1. Azure App Service deploy (slot: Production)
但我总是遇到一些错误,例如找不到路径
##[error]Publishing build artifacts failed with an error: Not found PathtoPublish: D:\a\1\s\Artifact (build)\dist
##[error]Publishing build artifacts failed with an error: Not found PathtoPublish: d:\a\1\s\Artifact Dashboard (build)
##[warning]Directory 'D:\a\1\a' is empty. Nothing will be added to build artifact 'Artifact Dashboard (build)'.
##[error]Error: No package found with specified pattern: D:\a\r1\a\Artifact (build)
这似乎太简单而难以配置。我在这里错过了什么?
【问题讨论】:
标签: azure-devops azure-pipelines