Mickey Cohen
Mickey Cohen

Reputation: 1277

Azure DevOps Container Job with Multiple Repositories

I have an Azure DevOps YAML pipeline where I checkout multiple repos I execute jobs inside containers but only the main repo is available inside the container. How can I make sure all repos are mounted?

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

the main repo is available inside the docker under $(Build.SourcesDirectory)/$(Build.Repository.Name) repo 2 is only checked out at the host agent but not available in the container

Upvotes: 0

Views: 514

Answers (1)

Mickey Cohen
Mickey Cohen

Reputation: 1277

Found out what is the problem When using path, the repo is being checked out to the WORK directory and not the sources directory. This does not get mounted to the container So I removed the path argument, and now all the repos are available under $(Build.SourcesDirectory)

Upvotes: 0

Related Questions