【问题标题】:Azure pipeline: could not extract archiveAzure 管道:无法提取存档
【发布时间】:2021-07-29 02:06:27
【问题描述】:

我有一个 Azure 管道,它应该构建一个项目并将 jar 复制到 Artifactory。这是应该安装节点的 yml:

- task: NodeTool@0
  inputs:
    versionSpec: '10.x'
  displayName: 'Install Node.js'

我无法让它运行。它失败了

无法提取存档: '/home/abc-vsts-user/.m2/repository/com/github/eirslett/node/10.14.2/node-10.14.2-linux-x64.tar.gz': 输入不是 .gz 格式

我不明白为什么它认为 .gz 格式的文件不是 .gz 格式!

在您教育我的同时,您能解释一下 /home/abc-vsts-user 是什么吗?那是 Azure 虚拟机吗?神器虚拟机?该文件所在的唯一位置(据我所知)是 Artifactory。

有什么建议吗?

编辑 这里是代理:

pool:
  name: jvdc-static-pool
  demands:  
  - Agent.Name -equals jvdc-agent-2

【问题讨论】:

  • 你能分享你在 azure 管道中写在 YAML 上的内容吗,/home/abc-vsts-user 可能是你的工作目录运行时变量 - $(System.DefaultWorkingDirectory)
  • 我在帖子中添加了 YAML。 $(System.DefaultWorkingDirectory) 在 Azure VM 还是 Artifactory VM 上?
  • YAML sn-p 没有指定您使用哪种类型的代理(MS 托管/自托管),实际上您是在代理上运行的。
  • 它看起来像一个 Linux 构建服务器——它是一个托管的构建代理吗?如果是,请根据需要设置池图像,例如 Windows docs.microsoft.com/en-US/azure/devops/pipelines/agents/…
  • 是的,它是一个托管构建代理。我已将 yaml 的那部分添加到帖子中。

标签: azure azure-devops azure-pipelines artifactory


【解决方案1】:

原来是因为在同一管道中也有一个 npm 安装脚本。

    - script: |
        npm install
        npm run build --if-present
        npm run test --if-present
      displayName: 'Npm install, build, and test'

这导致第二次尝试安装节点,而所有必要的都是

- task: NodeTool@0
  inputs:
    versionSpec: '10.x'
  displayName: 'Install Node.js'

【讨论】:

    猜你喜欢
    • 2020-09-24
    • 1970-01-01
    • 2022-06-10
    • 2021-06-23
    • 2021-01-11
    • 1970-01-01
    • 2021-07-29
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多