Azure Pipelines:任务 PublishBuildArtifacts 避免使用 zip [英] Azure Pipelines: task PublishBuildArtifacts avoid zip
问题描述
所以我正在运行这个命令
So I'm running this command
- task: DotNetCoreCLI@2
displayName: 'dotnet publish'
inputs:
command: 'publish'
publishWebProjects: false
projects: 'src/myproj/*.csproj'
arguments: -o $(build.artifactStagingDirectory)
它在放置文件夹中生成为已发布的工件(是的!),但生成为 zip 文件(myproj.zip).
And it is generating as Published Artifacts in a drop folder (Yes!), but as a zip file (myproj.zip).
我想避免使用 zip,而是希望将输出作为一个完整的文件夹.
I want to avoid the zip and would rather want the output as a full folder.
我正在研究,但我找不到在哪里完成这项工作.
I'm researching but I cant find where this is being done.
有趣的是,我在自己的 CMD 窗口上尝试了它,它正在输出文件夹,但在 Azure Pipelines 中它生成了一个 zip 文件.
The funny thing is that I tried it on my own CMD window and it is outputing the folder, but in Azure Pipelines it is generating a zip file.
推荐答案
请尝试 zipAfterPublish
属性(另请参阅 此页面),可选与 modifyOutputPath
属性结合使用.
Please try the zipAfterPublish
property (see also this page), optional in combination with the modifyOutputPath
property.
这将产生以下 yaml 片段:
This would result in the following yaml snippet:
- task: DotNetCoreCLI@2
displayName: 'dotnet publish'
inputs:
command: 'publish'
publishWebProjects: false
projects: 'src/myproj/*.csproj'
arguments: -o $(build.artifactStagingDirectory)
zipAfterPublish: false
modifyOutputPath: false
这篇关于Azure Pipelines:任务 PublishBuildArtifacts 避免使用 zip的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!