英文:
How to copy files from one git repo to another git repo in Azure pipelines task?
问题
有一个在GitHub上的公共源代码存储库,其中包含所有的源代码。还有另一个属于我的GitHub存储库,其中包含一些配置文件。
我想要使用Azure管道任务,在我的GitHub存储库中的配置文件的帮助下运行源存储库的一些测试。
如何首先检出GitHub源存储库,然后进行初始设置,比如在该存储库中构建?之后,将配置文件从我的另一个GitHub存储库复制到源存储库目录,并运行源存储库的测试。
我想在Azure YAML管道中执行这些步骤,因为从Azure发布管道中并非所有工件都是可访问的。
英文:
There is one public source repo in github where all the source code is present. There is another github repo of mine which has some configuration files.
I want to run some tests of source repo using the configuration file present in my github repo using Azure pipeline task.
How can I checkout to source repo of github first and then do initial setup like build in that repo? And after that copy configuration files from my another github repo to the source repo directory and run tests of source repo.
I want to do these steps in Azure yaml pipelines as from azure release pipelines not all the artifacts are accessible.
答案1
得分: 0
检查多个存储库是可能的,也可以使用GitHub作为源,但不要忘记设置GitHub服务连接。
有关更多信息和选项,请参阅:https://learn.microsoft.com/en-us/azure/devops/pipelines/repos/multi-repo-checkout?view=azure-devops#specify-multiple-repositories
由于您希望GitHub存储库触发Azure DevOps管道,请查看自2022年10月以来提供的功能:
https://learn.microsoft.com/en-us/azure/devops/pipelines/ecosystems/github-actions?view=azure-devops
英文:
Checking out multiple repos is possible, also with GitHub as a source, but don't forget to setup a GitHub service connection.
More info and options about this see: https://learn.microsoft.com/en-us/azure/devops/pipelines/repos/multi-repo-checkout?view=azure-devops#specify-multiple-repositories
Since you want the GitHub repo to trigger the Azure DevOps pipeline, please check out the feature that is available since October 2022:
https://learn.microsoft.com/en-us/azure/devops/pipelines/ecosystems/github-actions?view=azure-devops
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论