Created
March 13, 2019 09:38
-
-
Save guitarrapc/6b1290a68d4f9ca8086a9215591cbfa4 to your computer and use it in GitHub Desktop.
Azure DevOps Pipeline Build for "dotnet core with Submodule"
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
resources: | |
repositories: | |
- repository: self | |
checkoutOptions: | |
submodules: true | |
pool: | |
vmImage: 'ubuntu-16.04' | |
#name: 'your pool name' | |
trigger: | |
batch: true | |
branches: | |
include: | |
- "*" | |
variables: | |
BuildConfiguration: debug | |
BuildPlatform: any cpu | |
# you can use glob pattern. (dotnet cli discontinue support but pipeline DotNetCoreCLI does) | |
Parameters.RestoreBuildProjects: SubmoduleFolder/**/*.csproj | |
Parameters.TestProjects: SubmoduleFolder/**/*Tests/*.csproj | |
Parameters.PublishProjects: SubmoduleFolder/**/YOUR_PROJECT.csproj | |
steps: | |
- task: DotNetCoreInstaller@0 | |
inputs: | |
packageType: 'sdk' | |
version: '2.2.100' | |
- task: DotNetCoreCLI@2 | |
displayName: Restore | |
inputs: | |
command: restore | |
projects: '$(Parameters.RestoreBuildProjects)' | |
- task: DotNetCoreCLI@2 | |
displayName: Build | |
inputs: | |
projects: '$(Parameters.RestoreBuildProjects)' | |
arguments: '--configuration $(BuildConfiguration)' | |
- task: DotNetCoreCLI@2 | |
displayName: Test | |
inputs: | |
command: test | |
projects: '$(Parameters.TestProjects)' | |
arguments: '--configuration $(BuildConfiguration)' | |
- task: DotNetCoreCLI@2 | |
displayName: Publish | |
inputs: | |
command: publish | |
publishWebProjects: false | |
projects: '$(Parameters.PublishProjects)' | |
arguments: '--configuration $(BuildConfiguration) --output $(build.artifactstagingdirectory)' | |
zipAfterPublish: false | |
modifyOutputPath: false | |
- task: PublishBuildArtifacts@1 | |
displayName: 'Publish Artifact' | |
inputs: | |
PathtoPublish: '$(build.artifactstagingdirectory)' | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
vs code extensions notify
checkoutOptions
is deprecated. Not yet found valid latest way to write.This won't work, DevOps Pipeline detected as invalid YAML.