【问题标题】:Azure DevOps Container Job with Multiple Repositories具有多个存储库的 Azure DevOps 容器作业
【发布时间】:2021-11-09 07:20:23
【问题描述】:

我有一个 Azure DevOps YAML 管道,我可以在其中签出多个存储库 我在容器内执行作业,但容器内只有主 repo 可用。如何确保所有 repos 都已挂载?

jobs:
  - job: Job1
    container: mycontainer:latest
    steps:
      - checkout: self
      - checkout: repo2
        path: repo2

主 repo 在 $(Build.SourcesDirectory)/$(Build.Repository.Name) 下的 docker 中可用 repo 2 仅在主机代理中签出,但在容器中不可用

【问题讨论】:

    标签: docker azure-devops azure-pipelines


    【解决方案1】:

    找出问题所在 使用路径时,repo 被检出到 WORK 目录而不是源目录。这不会安装到容器上 所以我删除了路径参数,现在所有的 repos 都在 $(Build.SourcesDirectory) 下可用

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2021-06-06
      • 1970-01-01
      • 2021-01-09
      • 2020-06-30
      • 1970-01-01
      • 2022-11-15
      • 2023-01-23
      相关资源
      最近更新 更多