I have created ASP.NET Core Pipeline for my project on Azure DevOps. And to successfully build it i need to download some dependent source repositories i have on github.
Need help with configuring the pipeline yaml that the dependend github sources. The file structure to build the project should be something like this:
Birko.Data // Github repo
Birko.Data.Helper // Github repo
Birko.Data.ElasticSearch // Github repo
Affiliate // Azure dev ops repo
- project sources
-.sln file
If I understand this correct all the sources are downloaded to the $(System.ArtifactsDirectory)
so the Githubs repos need to be in parent directory?
pipeline definition YAML:
trigger:
- master
pool:
vmImage: 'windows-latest'
variables:
solution: '**/*.sln'
buildPlatform: 'Any CPU'
buildConfiguration: 'Release'
steps:
- task: DownloadGitHubRelease@0
displayName: 'Chekout: Birko.Data'
inputs:
connection: 'birko-test'
userRepository: 'birko/Birko.Data'
defaultVersionType: 'latest'
downloadPath: '$(System.ArtifactsDirectory)'
- task: DownloadGitHubRelease@0
displayName: 'Chekout: Birko.Data.Helper'
inputs:
connection: 'birko-test'
userRepository: 'birko/Birko.Data.Helper'
defaultVersionType: 'latest'
downloadPath: '$(System.ArtifactsDirectory)'
- task: DownloadGitHubRelease@0
displayName: 'Chekout Birko.Data.ElasticSearch'
inputs:
connection: 'birko-test'
userRepository: 'birko/Birko.Data.ElasticSearch'
defaultVersionType: 'latest'
downloadPath: '$(System.ArtifactsDirectory)'
- task: NuGetToolInstaller@1
- task: NuGetCommand@2
inputs:
restoreSolution: '$(solution)'
- task: VSBuild@1
inputs:
solution: '$(solution)'
msbuildArgs: '/p:DeployOnBuild=true /p:WebPublishMethod=Package /p:PackageAsSingleFile=true /p:SkipInvalidConfigurations=true /p:DesktopBuildPackageLocation="$(build.artifactStagingDirectory)\WebApp.zip" /p:DeployIisAppPath="Default Web Site"'
platform: '$(buildPlatform)'
configuration: '$(buildConfiguration)'
- task: VSTest@2
inputs:
platform: '$(buildPlatform)'
configuration: '$(buildConfiguration)'