Update azure-pipelines.yml for Azure Pipelines
This commit is contained in:
parent
04546a54cf
commit
fe4bfc1448
|
@ -1,118 +1,139 @@
|
||||||
# Azure Pipelines Build Configuration
|
# Azure Pipelines Build Configuration
|
||||||
|
|
||||||
|
trigger:
|
||||||
|
batch: true
|
||||||
|
paths:
|
||||||
|
include: 'Src/*'
|
||||||
|
|
||||||
|
pr:
|
||||||
|
branches:
|
||||||
|
include:
|
||||||
|
- master
|
||||||
|
paths:
|
||||||
|
exclude: '**/*.md'
|
||||||
|
|
||||||
pool:
|
pool:
|
||||||
vmImage: 'VS2017-Win2016'
|
vmImage: 'VS2017-Win2016'
|
||||||
|
|
||||||
variables:
|
variables:
|
||||||
solution: '**/*.sln'
|
solution: '**/*.sln'
|
||||||
buildConfiguration: 'Release'
|
|
||||||
packagesFolder: 'Build/packages'
|
packagesFolder: 'Build/packages'
|
||||||
|
|
||||||
steps:
|
jobs:
|
||||||
- task: NuGetToolInstaller@0
|
-job: Test
|
||||||
|
variables:
|
||||||
|
buildConfiguration: 'Debug'
|
||||||
|
|
||||||
- task: NuGetCommand@2
|
-job: Release
|
||||||
displayName: 'NuGet Restore Packages'
|
displayName: 'Release'
|
||||||
inputs:
|
dependsOn: Test
|
||||||
command: 'restore'
|
condition: succeeded()
|
||||||
restoreSolution: '$(solution)'
|
variables:
|
||||||
|
buildConfiguration: 'Release'
|
||||||
|
steps:
|
||||||
|
- task: NuGetToolInstaller@0
|
||||||
|
|
||||||
- task: DownloadSecureFile@1
|
- task: NuGetCommand@2
|
||||||
displayName: 'Download SNK File'
|
displayName: 'NuGet Restore Packages'
|
||||||
inputs:
|
inputs:
|
||||||
secureFile: 'DSInternals.Private.snk'
|
command: 'restore'
|
||||||
|
restoreSolution: '$(solution)'
|
||||||
|
|
||||||
- task: CopyFiles@2
|
- task: DownloadSecureFile@1
|
||||||
displayName: 'Copy SNK File to Keys'
|
displayName: 'Download SNK File'
|
||||||
inputs:
|
inputs:
|
||||||
sourceFolder: '$(Agent.TempDirectory)'
|
secureFile: 'DSInternals.Private.snk'
|
||||||
contents: '*.snk'
|
|
||||||
targetFolder: 'Keys'
|
|
||||||
|
|
||||||
- task: VSBuild@1
|
- task: CopyFiles@2
|
||||||
displayName: 'VSBuild ($(buildConfiguration) x86)'
|
displayName: 'Copy SNK File to Keys'
|
||||||
inputs:
|
inputs:
|
||||||
solution: '$(solution)'
|
sourceFolder: '$(Agent.TempDirectory)'
|
||||||
platform: 'x86'
|
contents: '*.snk'
|
||||||
configuration: '$(buildConfiguration)'
|
targetFolder: 'Keys'
|
||||||
restoreNugetPackages: false
|
|
||||||
|
|
||||||
- task: VSBuild@1
|
- task: VSBuild@1
|
||||||
displayName: 'VSBuild ($(buildConfiguration) x64)'
|
displayName: 'VSBuild ($(buildConfiguration) x86)'
|
||||||
inputs:
|
inputs:
|
||||||
solution: '$(solution)'
|
solution: '$(solution)'
|
||||||
platform: 'x64'
|
platform: 'x86'
|
||||||
configuration: '$(buildConfiguration)'
|
configuration: '$(buildConfiguration)'
|
||||||
restoreNugetPackages: false
|
restoreNugetPackages: false
|
||||||
|
|
||||||
- task: PublishBuildArtifacts@1
|
- task: VSBuild@1
|
||||||
displayName: 'Publish Raw PowerShell Module'
|
displayName: 'VSBuild ($(buildConfiguration) x64)'
|
||||||
inputs:
|
inputs:
|
||||||
pathtoPublish: 'Build/bin/Release/DSInternals'
|
solution: '$(solution)'
|
||||||
artifactName: 'DSInternals'
|
platform: 'x64'
|
||||||
|
configuration: '$(buildConfiguration)'
|
||||||
|
restoreNugetPackages: false
|
||||||
|
|
||||||
- task: PowerShell@2
|
- task: PublishBuildArtifacts@1
|
||||||
displayName: 'Pack PowerShell Module'
|
displayName: 'Publish Raw PowerShell Module'
|
||||||
inputs:
|
inputs:
|
||||||
targetType: 'filePath'
|
pathtoPublish: 'Build/bin/Release/DSInternals'
|
||||||
filePath: 'Scripts/Pack-PSModule.ps1'
|
artifactName: 'DSInternals'
|
||||||
|
|
||||||
- task: NuGetCommand@2
|
- task: PowerShell@2
|
||||||
displayName: 'NuGet Pack (DSInternals.Common)'
|
displayName: 'Pack PowerShell Module'
|
||||||
inputs:
|
inputs:
|
||||||
command: 'pack'
|
targetType: 'filePath'
|
||||||
packagesToPack: '**/DSInternals.Common.csproj'
|
filePath: 'Scripts/Pack-PSModule.ps1'
|
||||||
configuration: '$(BuildConfiguration)'
|
|
||||||
packDestination: '$(packagesFolder)'
|
|
||||||
includeReferencedProjects: true
|
|
||||||
verbosityPack: 'detailed'
|
|
||||||
|
|
||||||
- task: NuGetCommand@2
|
- task: NuGetCommand@2
|
||||||
displayName: 'NuGet Pack (DSInternals.DataStore)'
|
displayName: 'NuGet Pack (DSInternals.Common)'
|
||||||
inputs:
|
inputs:
|
||||||
command: 'pack'
|
command: 'pack'
|
||||||
packagesToPack: '**/DSInternals.DataStore.csproj'
|
packagesToPack: '**/DSInternals.Common.csproj'
|
||||||
configuration: '$(BuildConfiguration)'
|
configuration: '$(BuildConfiguration)'
|
||||||
packDestination: '$(packagesFolder)'
|
packDestination: '$(packagesFolder)'
|
||||||
includeReferencedProjects: true
|
includeReferencedProjects: true
|
||||||
verbosityPack: 'detailed'
|
verbosityPack: 'detailed'
|
||||||
|
|
||||||
- task: NuGetCommand@2
|
- task: NuGetCommand@2
|
||||||
displayName: 'NuGet Pack (DSInternals.Replication)'
|
displayName: 'NuGet Pack (DSInternals.DataStore)'
|
||||||
inputs:
|
inputs:
|
||||||
command: 'pack'
|
command: 'pack'
|
||||||
packagesToPack: '**/DSInternals.Replication.csproj'
|
packagesToPack: '**/DSInternals.DataStore.csproj'
|
||||||
configuration: '$(BuildConfiguration)'
|
configuration: '$(BuildConfiguration)'
|
||||||
packDestination: '$(packagesFolder)'
|
packDestination: '$(packagesFolder)'
|
||||||
includeReferencedProjects: true
|
includeReferencedProjects: true
|
||||||
verbosityPack: 'detailed'
|
verbosityPack: 'detailed'
|
||||||
|
|
||||||
- task: NuGetCommand@2
|
- task: NuGetCommand@2
|
||||||
displayName: 'NuGet Pack (DSInternals.SAM)'
|
displayName: 'NuGet Pack (DSInternals.Replication)'
|
||||||
inputs:
|
inputs:
|
||||||
command: 'pack'
|
command: 'pack'
|
||||||
packagesToPack: '**/DSInternals.SAM.csproj'
|
packagesToPack: '**/DSInternals.Replication.csproj'
|
||||||
configuration: '$(BuildConfiguration)'
|
configuration: '$(BuildConfiguration)'
|
||||||
packDestination: '$(packagesFolder)'
|
packDestination: '$(packagesFolder)'
|
||||||
includeReferencedProjects: true
|
includeReferencedProjects: true
|
||||||
verbosityPack: 'detailed'
|
verbosityPack: 'detailed'
|
||||||
|
|
||||||
- task: PublishBuildArtifacts@1
|
- task: NuGetCommand@2
|
||||||
displayName: 'Publish NuGet Packages'
|
displayName: 'NuGet Pack (DSInternals.SAM)'
|
||||||
inputs:
|
inputs:
|
||||||
pathtoPublish: '$(packagesFolder)'
|
command: 'pack'
|
||||||
artifactName: 'NuGet'
|
packagesToPack: '**/DSInternals.SAM.csproj'
|
||||||
|
configuration: '$(BuildConfiguration)'
|
||||||
|
packDestination: '$(packagesFolder)'
|
||||||
|
includeReferencedProjects: true
|
||||||
|
verbosityPack: 'detailed'
|
||||||
|
|
||||||
- task: PowerShell@2
|
- task: PublishBuildArtifacts@1
|
||||||
displayName: 'Run Smoke Tests'
|
displayName: 'Publish NuGet Packages'
|
||||||
inputs:
|
inputs:
|
||||||
targetType: 'filePath'
|
pathtoPublish: '$(packagesFolder)'
|
||||||
filePath: 'Scripts/Invoke-SmokeTests.ps1'
|
artifactName: 'NuGet'
|
||||||
|
|
||||||
- task: PublishTestResults@2
|
- task: PowerShell@2
|
||||||
displayName: 'Publish Smoke Test Results'
|
displayName: 'Run Smoke Tests'
|
||||||
inputs:
|
inputs:
|
||||||
testResultsFormat: 'NUnit'
|
targetType: 'filePath'
|
||||||
testResultsFiles: '**/*.xml'
|
filePath: 'Scripts/Invoke-SmokeTests.ps1'
|
||||||
searchFolder: 'TestResults'
|
|
||||||
#testRunTitle: # Optional
|
- task: PublishTestResults@2
|
||||||
|
displayName: 'Publish Smoke Test Results'
|
||||||
|
inputs:
|
||||||
|
testResultsFormat: 'NUnit'
|
||||||
|
testResultsFiles: '**/*.xml'
|
||||||
|
searchFolder: 'TestResults'
|
Loading…
Reference in New Issue