gpt4 book ai didi

azure-devops - Azure DevOps yaml 管道,下载的工件为空

转载 作者:行者123 更新时间:2023-12-04 01:42:31 24 4
gpt4 key购买 nike

将管道从经典管道转换为 YAML(所以我知道它有效)。

我构建并发布工件任务如下所示:

  - task: PublishPipelineArtifact@1
displayName: 'Publish Pipeline Artifact'
inputs:
targetPath: '$(Build.ArtifactStagingDirectory)/MyArtifact'
artifact: MyArtifact

构建时的结果是这样的:

enter image description here

然后我想将它部署到一个 webapp山药:

- stage: Dev
jobs:
- job: DeployApp
displayName: Deploy Web App
pool:
name: myPrivate
demands: msbuild
steps:
- task: DownloadPipelineArtifact@2
inputs:
artifact: MyArtifact
- task: AzureRmWebAppDeployment@4
displayName: 'Deploy App'
inputs:
WebAppKind: 'Web App On Windows'
azureSubscription: 'edited out...'
WebAppName: webAppName
package: '$(System.ArtifactsDirectory)'
enableXmlTransform: true

这会在 Azure DevOps 中产生此输出:

enter image description here

chunks 的差异,但由于尺寸非常匹配,我很高兴。

然后我在部署时遇到错误,所以我开始查看 Kudo,可以看到在 SitePackages 中我的所有包都是 1 kb(或空...)。我预计 61.2 MB。

enter image description here

我进行了我的工作经典部署,那里有这一行:

packageForLinux:'$(System.DefaultWorkingDirectory)/_MyArtifact/MyArtifact/MyApplication.zip'

但那条路甚至都没有找到。 packageForLinux 感觉不对,但据我了解并不重要。

那么有人可以在正确的方向上取悦我如何使用 YAML 部署 Web 应用程序(在 Windows 上)吗?

最佳答案

使用的文件夹是$(Pipeline.Workspace),不是$(System.DefaultWorkingDirectory),每个任务类型的默认文件夹是不同的,所以你可以'总是相信他们提取到默认工作目录。

关于azure-devops - Azure DevOps yaml 管道,下载的工件为空,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56805440/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com