2019-01-01 10:46:56 +00:00
|
|
|
# Azure Pipelines Build Configuration
|
2018-09-29 07:10:41 +00:00
|
|
|
|
2019-01-01 22:59:54 +00:00
|
|
|
trigger:
|
|
|
|
batch: true
|
2019-02-01 20:19:00 +00:00
|
|
|
branches:
|
|
|
|
include:
|
|
|
|
- master
|
2019-01-01 22:59:54 +00:00
|
|
|
paths:
|
2019-01-01 23:02:21 +00:00
|
|
|
include:
|
2019-02-01 20:19:00 +00:00
|
|
|
- Src/*
|
2019-01-01 22:59:54 +00:00
|
|
|
|
|
|
|
pr:
|
|
|
|
branches:
|
|
|
|
include:
|
|
|
|
- master
|
|
|
|
paths:
|
2019-01-01 23:02:21 +00:00
|
|
|
exclude:
|
2019-02-01 20:19:00 +00:00
|
|
|
- '**/*.md'
|
2019-01-01 22:59:54 +00:00
|
|
|
|
2018-09-29 07:10:41 +00:00
|
|
|
variables:
|
|
|
|
solution: '**/*.sln'
|
2019-01-01 10:46:56 +00:00
|
|
|
packagesFolder: 'Build/packages'
|
2018-09-29 07:10:41 +00:00
|
|
|
|
2019-01-01 23:21:17 +00:00
|
|
|
jobs:
|
|
|
|
- job: Test
|
|
|
|
displayName: 'Test'
|
|
|
|
pool:
|
2020-03-18 06:56:11 +00:00
|
|
|
vmImage: 'windows-2019'
|
2019-01-01 23:21:17 +00:00
|
|
|
variables:
|
|
|
|
buildConfiguration: 'Debug'
|
2019-02-01 20:19:00 +00:00
|
|
|
steps:
|
2020-03-18 07:17:25 +00:00
|
|
|
- task: NuGetToolInstaller@1
|
|
|
|
inputs:
|
|
|
|
versionSpec: '5.x'
|
2019-02-01 20:19:00 +00:00
|
|
|
|
|
|
|
- task: NuGetCommand@2
|
|
|
|
displayName: 'NuGet Restore Packages'
|
|
|
|
inputs:
|
|
|
|
command: 'restore'
|
|
|
|
restoreSolution: '$(solution)'
|
|
|
|
|
|
|
|
- task: VSBuild@1
|
|
|
|
displayName: 'VSBuild ($(buildConfiguration) x86)'
|
|
|
|
inputs:
|
|
|
|
solution: '$(solution)'
|
|
|
|
platform: 'x86'
|
|
|
|
configuration: '$(buildConfiguration)'
|
|
|
|
restoreNugetPackages: false
|
|
|
|
|
|
|
|
- task: VSBuild@1
|
|
|
|
displayName: 'VSBuild ($(buildConfiguration) x64)'
|
|
|
|
inputs:
|
|
|
|
solution: '$(solution)'
|
|
|
|
platform: 'x64'
|
|
|
|
configuration: '$(buildConfiguration)'
|
|
|
|
restoreNugetPackages: false
|
|
|
|
|
2023-09-16 19:38:23 +00:00
|
|
|
- task: VSBuild@1
|
|
|
|
displayName: 'VSBuild ($(buildConfiguration) ARM64)'
|
|
|
|
inputs:
|
|
|
|
solution: '$(solution)'
|
|
|
|
platform: 'ARM64'
|
|
|
|
configuration: '$(buildConfiguration)'
|
|
|
|
restoreNugetPackages: false
|
|
|
|
|
2019-02-01 20:19:00 +00:00
|
|
|
- task: VSTest@2
|
|
|
|
displayName: 'VSTest Unit Tests'
|
|
|
|
inputs:
|
|
|
|
testRunTitle: 'VSTest Unit Tests'
|
|
|
|
testSelector: 'testAssemblies'
|
|
|
|
testAssemblyVer2: 'Build/**/DSInternals/*.Test.dll'
|
|
|
|
codeCoverageEnabled: false
|
|
|
|
configuration: '$(buildConfiguration)'
|
|
|
|
|
|
|
|
# Only proceed with the Release build if Test succeeds and the build was requested manually.
|
2019-01-01 23:21:17 +00:00
|
|
|
|
|
|
|
- job: Release
|
|
|
|
displayName: 'Release'
|
|
|
|
dependsOn: Test
|
2019-02-01 20:19:00 +00:00
|
|
|
condition: and(succeeded(), eq(variables['Build.Reason'], 'Manual'))
|
2019-01-01 23:21:17 +00:00
|
|
|
pool:
|
2020-03-18 06:56:11 +00:00
|
|
|
vmImage: 'windows-2019'
|
2019-01-01 23:21:17 +00:00
|
|
|
variables:
|
|
|
|
buildConfiguration: 'Release'
|
|
|
|
steps:
|
2020-03-18 07:17:25 +00:00
|
|
|
- task: NuGetToolInstaller@1
|
|
|
|
inputs:
|
|
|
|
versionSpec: '5.x'
|
2019-01-01 23:21:17 +00:00
|
|
|
|
|
|
|
- task: NuGetCommand@2
|
|
|
|
displayName: 'NuGet Restore Packages'
|
|
|
|
inputs:
|
|
|
|
command: 'restore'
|
|
|
|
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'
|
|
|
|
|
|
|
|
- task: VSBuild@1
|
|
|
|
displayName: 'VSBuild ($(buildConfiguration) x86)'
|
|
|
|
inputs:
|
|
|
|
solution: '$(solution)'
|
|
|
|
platform: 'x86'
|
|
|
|
configuration: '$(buildConfiguration)'
|
|
|
|
restoreNugetPackages: false
|
|
|
|
|
|
|
|
- task: VSBuild@1
|
|
|
|
displayName: 'VSBuild ($(buildConfiguration) x64)'
|
|
|
|
inputs:
|
|
|
|
solution: '$(solution)'
|
|
|
|
platform: 'x64'
|
|
|
|
configuration: '$(buildConfiguration)'
|
|
|
|
restoreNugetPackages: false
|
|
|
|
|
2019-05-09 13:14:18 +00:00
|
|
|
- task: PowerShell@2
|
|
|
|
displayName: 'ZIP Pack (PowerShell Module)'
|
2019-01-01 23:21:17 +00:00
|
|
|
inputs:
|
2019-05-09 13:14:18 +00:00
|
|
|
targetType: 'filePath'
|
|
|
|
filePath: 'Scripts/Pack-PSModule.ps1'
|
2019-01-01 23:21:17 +00:00
|
|
|
|
|
|
|
- task: PowerShell@2
|
2019-05-09 13:14:18 +00:00
|
|
|
displayName: 'Chocolatey Pack (PowerShell Module)'
|
2019-01-01 23:21:17 +00:00
|
|
|
inputs:
|
|
|
|
targetType: 'filePath'
|
2019-05-09 13:14:18 +00:00
|
|
|
filePath: 'Scripts/Pack-Chocolatey.ps1'
|
2019-01-01 23:21:17 +00:00
|
|
|
|
|
|
|
- task: NuGetCommand@2
|
|
|
|
displayName: 'NuGet Pack (DSInternals.Common)'
|
|
|
|
inputs:
|
|
|
|
command: 'pack'
|
|
|
|
packagesToPack: '**/DSInternals.Common.csproj'
|
|
|
|
configuration: '$(BuildConfiguration)'
|
2019-05-09 13:14:18 +00:00
|
|
|
packDestination: '$(packagesFolder)/NuGet'
|
2019-01-01 23:21:17 +00:00
|
|
|
includeReferencedProjects: true
|
|
|
|
verbosityPack: 'detailed'
|
|
|
|
|
|
|
|
- task: NuGetCommand@2
|
|
|
|
displayName: 'NuGet Pack (DSInternals.DataStore)'
|
|
|
|
inputs:
|
|
|
|
command: 'pack'
|
|
|
|
packagesToPack: '**/DSInternals.DataStore.csproj'
|
|
|
|
configuration: '$(BuildConfiguration)'
|
2019-05-09 13:14:18 +00:00
|
|
|
packDestination: '$(packagesFolder)/NuGet'
|
2019-01-01 23:21:17 +00:00
|
|
|
includeReferencedProjects: true
|
|
|
|
verbosityPack: 'detailed'
|
|
|
|
|
|
|
|
- task: NuGetCommand@2
|
|
|
|
displayName: 'NuGet Pack (DSInternals.Replication)'
|
|
|
|
inputs:
|
|
|
|
command: 'pack'
|
|
|
|
packagesToPack: '**/DSInternals.Replication.csproj'
|
|
|
|
configuration: '$(BuildConfiguration)'
|
2019-05-09 13:14:18 +00:00
|
|
|
packDestination: '$(packagesFolder)/NuGet'
|
2019-01-01 23:21:17 +00:00
|
|
|
includeReferencedProjects: true
|
|
|
|
verbosityPack: 'detailed'
|
|
|
|
|
|
|
|
- task: NuGetCommand@2
|
|
|
|
displayName: 'NuGet Pack (DSInternals.SAM)'
|
|
|
|
inputs:
|
|
|
|
command: 'pack'
|
|
|
|
packagesToPack: '**/DSInternals.SAM.csproj'
|
|
|
|
configuration: '$(BuildConfiguration)'
|
2019-05-09 13:14:18 +00:00
|
|
|
packDestination: '$(packagesFolder)/NuGet'
|
2019-01-01 23:21:17 +00:00
|
|
|
includeReferencedProjects: true
|
|
|
|
verbosityPack: 'detailed'
|
|
|
|
|
|
|
|
- task: PublishBuildArtifacts@1
|
|
|
|
displayName: 'Publish NuGet Packages'
|
|
|
|
inputs:
|
2019-05-09 13:14:18 +00:00
|
|
|
pathtoPublish: '$(packagesFolder)/NuGet'
|
2019-01-01 23:21:17 +00:00
|
|
|
artifactName: 'NuGet'
|
|
|
|
|
2019-05-09 13:14:18 +00:00
|
|
|
- task: PublishBuildArtifacts@1
|
|
|
|
displayName: 'Publish Chocolatey Package'
|
|
|
|
inputs:
|
|
|
|
pathtoPublish: '$(packagesFolder)/Chocolatey'
|
|
|
|
artifactName: 'Chocolatey'
|
|
|
|
|
|
|
|
- task: PublishBuildArtifacts@1
|
|
|
|
displayName: 'Publish GitHub Package'
|
|
|
|
inputs:
|
|
|
|
pathtoPublish: '$(packagesFolder)/Module'
|
|
|
|
artifactName: 'GitHub'
|
|
|
|
|
2019-01-01 23:21:17 +00:00
|
|
|
- task: PowerShell@2
|
|
|
|
displayName: 'Run Smoke Tests'
|
|
|
|
inputs:
|
|
|
|
targetType: 'filePath'
|
|
|
|
filePath: 'Scripts/Invoke-SmokeTests.ps1'
|
|
|
|
|
|
|
|
- task: PublishTestResults@2
|
|
|
|
displayName: 'Publish Smoke Test Results'
|
|
|
|
inputs:
|
2019-02-01 20:19:00 +00:00
|
|
|
testRunTitle: 'Pester Smoke Tests'
|
2019-01-01 23:21:17 +00:00
|
|
|
testResultsFormat: 'NUnit'
|
2020-03-18 06:56:11 +00:00
|
|
|
testResultsFiles: '**/*.xml'
|
|
|
|
searchFolder: 'TestResults'
|