I have a repository with two solutions in it. Both solution files exist in the root directory, essentially like this:
/WebsiteOneDirectory/
/WebsiteTwoDirectory/
/.gitignore
/WebsiteOne.sln
/WebsiteTwo.sln
Is it possible for me to build multiple pipelines pointed at this repository to build the different solutions? When I create my first pipeline it is generating a azure-pipelines.yml file for the repo, so I am unsure how/if I am going to be able to have multiple pipeline configurations if that is a fixed name it expects.
Create the pipelineSign in to your Azure DevOps organization and navigate to your project. In your project, go to the Pipelines page, and then select New pipeline. Select GitHub as the location of your source code. For Repository, select Authorize and then Authorize with OAuth.
YAML Multi DocumentsYAML format allows multiple documents to be embedded in a single file. They only have to be separated with a line containing triple-dash separator ---.
Specify multiple repositories Repositories can be specified as a repository resource, or inline with the checkout step. The following repository types are supported. Only Azure Repos Git ( git ) repositories in the same organization as the pipeline are supported for multi-repo checkout in Azure DevOps Server 2020.
In addition to James Reed's answer, if you prefer using the .yml
files, what I would recommend is to create multiple .yml
definitions, one for each pipeline.
Here's what one would look like:
trigger:
branches:
include:
- master
paths:
include:
- WebsiteOneDirectory/*
exclude:
- WebsiteTwoDirectory/*
For building, you'd need to specify which solution to build. For a (.net core) example:
variables:
buildConfiguration: 'Release'
pool:
vmImage: 'Ubuntu-16.04'
steps:
- script: dotnet build WebsiteOne --configuration $(buildConfiguration)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With