Azure DevOps-发布任务生成失败

时间:2020-08-05 08:16:14

标签: excel azure azure-devops azure-pipelines wildcard

我在Azure Devops管道中有一个发布任务,该任务应该发布扩展名为.xlsx的excel文件。 正在使用以下命令,但无法正常工作。有人可以帮助我使用通配符吗? 此excel文件是动态的,并且日期,月份参数不断变化。

format:SonarQube Issue Extract_2020-08-04.xlsx

任务:PublishBuildArtifacts @ 1 输入: 发布路径:'C:\ Users \ 320066547 \ agent_work \ 3 \ s \ SonarFetchIssues \ target * .xlsx' ArtifactName:“ IssuesOutput” publishLocation:“容器”

2 个答案:

答案 0 :(得分:0)

如果使用YAML管道,请考虑使用PublishPipelineArtifact task

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

这将发布管道中的所有工件。从那里可以缩小正在发布的确切路径。

或者,也可以在发布之前执行Powershell任务,以查看代理上的文件夹结构到底是什么:

-powershell: Get-ChildItem -Path 'Insert root path' -recurse

答案 1 :(得分:0)

任务中明确说明了这一点:

要发布的路径:要发布的文件夹或文件路径。这可以是 完全限定的路径或相对于存储库根目录的路径。 不支持通配符。支持变量。示例:$(Build.ArtifactStagingDirectory)

enter image description here