问题
During my build process, I am trying to create 2 artifacts.
One artifact for pipeline-related scripts and code, and another for the Release product.
I am trying to set this up in a way that the pipeline-related scripts and code are centrally managed in a separate repository and then imported into each production build pipeline upon execution. I have been able to import the code from External Git, but then I hit a snag...
The trouble that I'm running into is that when I am creating the Build Definition and arrive at the Get Sources step, I seem to only be able to pick a single source for the Build Definition... instead of being able to pick (for example) both TFS Git for one source and External Git for a second source.
Has anyone been able to figure out a method to pull code into a build process from multiple repositories?
Or does anyone have another suggestion on how to accomplish what I'm trying to do?
回答1:
In the "Get sources" phase you can't choose 2 repositories, as workaround, in the beginning of the build you can add a Command Line task or a PowerShell task that clone the second repo into s
folder on the agent.
回答2:
NO , As of now there is no way to get from multiple repositories in Get sources step. And there has an user voice Allow TFS build to depend on multiple repositories which suggests similar feature, you can vote up.
来源:https://stackoverflow.com/questions/55712353/in-azure-devops-is-there-a-way-to-get-sources-from-multiple-repos-for-a-single-b