带有多个存储库的VSTS构建 [英] VSTS build with multiple repos

查看:65
本文介绍了带有多个存储库的VSTS构建的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的团队将VSTS用于Web项目的CI/CD.为了使我们的代码分开,我们在前端和后端使用两个单独的存储库.

My team uses VSTS for CI/CD of a web project. In order to keep our code separated, we use two separate repositories for front-end and back-end.

由此引起两个问题:

  1. 如何设置将两个存储库中的构建工件合并到一个发行版中的构建?
  2. 如何分别从每个存储库触发该单个构建/发布过程?

推荐答案

第一步是为两个存储库创建一个CI构建.一旦它们编译并生成了必要的工件,就需要创建一个CD发行版.在编辑器顶部,有一个Artifacts标签.

First step is to create a CI build for both repositories. Once you have them compiling and generating the necessary artifacts, you need to create a single CD release. At the top of the editor, there is an Artifacts tab.

在那里,您可以链接多个内部版本或将其发布.只需单击Link an artifact source并添加您的两个CI版本.

Once there, you can link multiple builds or release to it. Simply click the Link an artifact source and add your two CI builds.

接下来,移至Triggers选项卡.在这里,您可以添加触发器以从任何或所有CI构建中成功完成.

Next, move to the Triggers tab. Here you can add triggers for a successful completion from any or all of the CI builds.

在发布中添加任务并需要访问工件时,它将为您提供使用Linked ArtifactURL Artifact的选项.选择Linked Artifact,然后单击工件浏览路径的三点浏览按钮.您将得到一个类似于下面的屏幕,您可以在这两个版本之间找到链接的工件.

When you add a task to your release and need to access an artifact, it will give you an option to use a Linked Artifact or a URL Artifact. Select the Linked Artifact and then click the three dot browse button for the artifact path. You will get a screen like the one below allowing you to locate the linked artifact between your two builds.

这篇关于带有多个存储库的VSTS构建的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆