I have an azure build pipeline yml file in my repository which references another…
- User
I have an azure build pipeline yml file in my repository which references another repository called "Helper" like listed below. How do I make sure that it is checked out into "$(Build.SourcesDirectory)\Helper" ?
resources: repositories: - repository: HelperRepo type: git name: Helper ref: main
- Assistant
To ensure that the
HelperReporepository is checked out into$(Build.SourcesDirectory)\Helper, you need to specify the checkout path explicitly in your pipeline YAML. By default, additional repositories are checked out into subfolders under$(Pipeline.Workspace), which may not match your desired directory.Here's how you can modify your pipeline YAML to achieve this:
resources: repositories: - repository: HelperRepo type: git name: Helper ref: main steps: - checkout: self # This ensures your main repository is checked out into $(Build.SourcesDirectory) - checkout: HelperRepo path: s/Helper # This sets the checkout path for HelperRepo to $(Build.SourcesDirectory)\Helper