8

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.

Two questions are raised by this:

  1. How do I set up a build that merges the build artifacts from the two repositories into a single release?
  2. How do I trigger this single build/release process from each repository separately?
dalgard
  • 3,614
  • 2
  • 22
  • 28
  • You can have multiple build artifacts linked to a single release definition, but as far as I know, only one build can trigger that release. – Steve L. Aug 11 '16 at 15:45

1 Answers1

13

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.

Artifacts Tab

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

Artifacts Tab Contents

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

enter image description here

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.

enter image description here

tj-cappelletti
  • 1,774
  • 12
  • 19
  • After I have done this, I get `More than one package matched with specified pattern: D:\a\r1\a\**\*.zip. Please restrain the search pattern.` because there are 2 zip files that came from the 2 sources. How do I get them to continue deployment. – Roy B May 15 '18 at 14:47
  • 1
    @RoyB You will need to fully qualify the zip file and break it up into either multiple steps or multiple phases. – tj-cappelletti May 16 '18 at 00:46