DSInternals/azure-pipelines.yml

118 lines
3.0 KiB
YAML
Raw Normal View History

# Azure Pipelines Build Configuration
2018-09-29 07:10:41 +00:00
pool:
vmImage: 'VS2017-Win2016'
variables:
solution: '**/*.sln'
buildConfiguration: 'Release'
packagesFolder: 'Build/packages'
2018-09-29 07:10:41 +00:00
steps:
- task: NuGetToolInstaller@0
- task: NuGetCommand@2
displayName: 'NuGet Restore Packages'
2018-09-29 07:10:41 +00:00
inputs:
command: 'restore'
2018-09-29 07:10:41 +00:00
restoreSolution: '$(solution)'
- task: DownloadSecureFile@1
displayName: 'Download SNK File'
inputs:
secureFile: 'DSInternals.Private.snk'
- task: CopyFiles@2
displayName: 'Copy SNK File to Keys'
inputs:
sourceFolder: '$(Agent.TempDirectory)'
contents: '*.snk'
targetFolder: 'Keys'
2018-09-29 07:10:41 +00:00
- task: VSBuild@1
displayName: 'VSBuild ($(buildConfiguration) x86)'
2018-09-29 07:10:41 +00:00
inputs:
solution: '$(solution)'
platform: 'x86'
2018-09-29 07:10:41 +00:00
configuration: '$(buildConfiguration)'
restoreNugetPackages: false
2018-09-29 07:10:41 +00:00
- task: VSBuild@1
displayName: 'VSBuild ($(buildConfiguration) x64)'
2018-09-29 07:10:41 +00:00
inputs:
solution: '$(solution)'
platform: 'x64'
2018-09-29 07:10:41 +00:00
configuration: '$(buildConfiguration)'
restoreNugetPackages: false
- task: PublishBuildArtifacts@1
displayName: 'Publish Raw PowerShell Module'
inputs:
pathtoPublish: 'Build/bin/Release/DSInternals'
artifactName: 'DSInternals'
- task: PowerShell@2
displayName: 'Pack PowerShell Module'
inputs:
targetType: 'filePath'
filePath: 'Scripts/Pack-PSModule.ps1'
- task: NuGetCommand@2
displayName: 'NuGet Pack (DSInternals.Common)'
inputs:
command: 'pack'
packagesToPack: '**/DSInternals.Common.csproj'
configuration: '$(BuildConfiguration)'
packDestination: '$(packagesFolder)'
includeReferencedProjects: true
verbosityPack: 'detailed'
- task: NuGetCommand@2
displayName: 'NuGet Pack (DSInternals.DataStore)'
inputs:
command: 'pack'
packagesToPack: '**/DSInternals.DataStore.csproj'
configuration: '$(BuildConfiguration)'
packDestination: '$(packagesFolder)'
includeReferencedProjects: true
verbosityPack: 'detailed'
- task: NuGetCommand@2
displayName: 'NuGet Pack (DSInternals.Replication)'
inputs:
command: 'pack'
packagesToPack: '**/DSInternals.Replication.csproj'
configuration: '$(BuildConfiguration)'
packDestination: '$(packagesFolder)'
includeReferencedProjects: true
verbosityPack: 'detailed'
- task: NuGetCommand@2
displayName: 'NuGet Pack (DSInternals.SAM)'
inputs:
command: 'pack'
packagesToPack: '**/DSInternals.SAM.csproj'
configuration: '$(BuildConfiguration)'
packDestination: '$(packagesFolder)'
includeReferencedProjects: true
verbosityPack: 'detailed'
- task: PublishBuildArtifacts@1
displayName: 'Publish NuGet Packages'
inputs:
pathtoPublish: '$(packagesFolder)'
artifactName: 'NuGet'
- task: PowerShell@2
displayName: 'Run Smoke Tests'
inputs:
targetType: 'filePath'
filePath: 'Scripts/Invoke-SmokeTests.ps1'
- task: PublishTestResults@2
displayName: 'Publish Smoke Test Results'
inputs:
testResultsFormat: 'NUnit'
testResultsFiles: '**/*.xml'
searchFolder: 'TestResults'
#testRunTitle: # Optional