【问题标题】:Azure Pipelines DownloadPipelineArtifact is not downloading artifacts [duplicate]Azure Pipelines DownloadPipelineArtifact 未下载工件 [重复]
【发布时间】:2021-01-11 11:09:52
【问题描述】:

我有一个 CI 管道,可以生成一个名为“build-artifact”的工件。我使用发布步骤发布此工件:

- publish: $(build.artifactStagingDirectory)
  artifact: build-artifact

我可以看到管道正确地发布了工件。 然后在另一个管道中,我尝试按照here 的描述下载工件

resources:
  pipelines:
    - pipeline: 'cipipeline'
      source: "receiver-ci"

steps:
- download: cipipeline
  artifact: build-artifact

我希望这可以下载工件。相反,它会看到所有文件,但不会下载它们。这是运行上述管道的输出:

Starting: Download
==============================================================================
Task         : Download pipeline artifact
Description  : Download a named artifact from a pipeline to a local path
Version      : 1.2.5
Author       : Microsoft Corporation
Help         : Download a named artifact from a pipeline to a local path
==============================================================================
Download from the specified build: #27608
Download artifact to: /home/vsts/work/1/cipipeline/build-artifact
ApplicationInsightsTelemetrySender will correlate events with X-TFS-Session 5a3786ae-b9b7-42ff-bae1-be29821e4d0f
DedupManifestArtifactClient will correlate http requests with X-TFS-Session 5a3786ae-b9b7-42ff-bae1-be29821e4d0f
Minimatch patterns: [**]
Filtered 24 files from the Minimatch filters supplied.
Downloaded 0.0 MB out of 0.0 MB (0%).
Downloaded 0.0 MB out of 0.0 MB (100%).

Download statistics:
Total Content: 0.0 MB
Physical Content Downloaded: 0.0 MB
Compression Saved: 0.0 MB
Local Caching Saved: 0.0 MB
Chunks Downloaded: 24
Nodes Downloaded: 0

Download completed.
ApplicationInsightsTelemetrySender correlated 2 events with X-TFS-Session 5a3786ae-b9b7-42ff-bae1-be29821e4d0f

发生了什么?为什么 azure 不下载工件?

【问题讨论】:

  • 嗨,这个问题怎么样?下面的答案是否解决了您的问题?如果没有,请告诉我有关此问题的最新信息吗?
  • @VitoLiu-MSFT 对不起,我完全忘了回答这个问题。我使用事物问题stackoverflow.com/questions/55089900/… 修复了它。所以我将结束这个问题。

标签: azure-pipelines azure-pipelines-yaml


【解决方案1】:

此工件已下载并保存在/home/vsts/work/1/cipipeline/build-artifact。我们可以添加任务Publish Pipeline Artifacts 并检查它。

示例:

resources:
  pipelines:
    - pipeline: 'cipipeline'
      source: "receiver-ci"

steps:
- download: cipipeline
  artifact: build-artifact

- publish: /home/vsts/work/1/cipipeline/build-artifact
  artifact: test

另外,如果 Artifact 小于 1MB,也许你会看到消息Downloaded 0.0 MB out of 0.0 MB (100%)。

我的测试结果:

【讨论】:

  • 我认为Filtered 6 files from the Minimatch filters supplied. 也令人困惑,因为过滤器的意思是“抓取”而不是“忽略”。在执行ls -la .. 或gci .. -recurse 之后,当我偶然发现这个有用的答案时,我意识到我一直在使用错误的“工作目录”变量来设置工件的路径。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2021-01-15
  • 2020-11-06
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多