I have a project structure like so:
Repos\WebApi
Repos\WebPortal
Repos\BackendService
Repos\Extensions
Each of them is in its own repository, has its own solution but all of them depend on the Extensions project.
In the past I've used CCNET and been able to build the Extensions project, save off the artifacts from the build, and then trigger a build on all of its dependencies using the artifacts from the first build.
My question is: How can I do this in VSTS. Alternatively if the answer is you cannot, how am I supposed to structure my projects to keep things DRY, SRP, and automated? I don't want to add all of the projects in a single solution (there's actually quite a few more involved and multiple levels of dependencies, but for illustration of the problem I simplified it)
From what I can tell I can't use build artifacts from other builds, I can't add multiple source repos to a build in VSTS, nor can I see a way to trigger builds upon the completion of another build.
Which makes me feel like I am doing something fundamentally wrong.
There are many ways to do it:
• Create the package for Extensions project and upload to a feed, such as VSTS feed: Package Management in VSTS and TFS, then restore packages during the build
• The similar way as you said: Add Download Build Artifacts task to build definition to download the artifact of Extensions build. You also can call Builds REST API through PowerShell to get build artifacts.
• If you are using TFVC repository, you can get the Extensions project by specify additional Workspace mappings in Get Sources section of build definition (Specify it directly, can click … to select)
• Download additional repository by using Download Artifacts-External TFS Git/TFVC task
• Using git submodule if it is Git repository.
Regarding trigger build from another build, you can use Trigger Build task.