Azure Pipelines Build Config (#72)

* Update azure-pipelines.yml for Azure Pipelines
This commit is contained in:
Michael Grafnetter 2019-01-01 11:46:56 +01:00 committed by GitHub
parent 44a1eb009f
commit 94828b955d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 98 additions and 10 deletions

View File

@ -29,7 +29,7 @@
<Keyword>ManagedCProj</Keyword> <Keyword>ManagedCProj</Keyword>
<RootNamespace>DSInternals.Replication.Interop</RootNamespace> <RootNamespace>DSInternals.Replication.Interop</RootNamespace>
<ProjectName>DSInternals.Replication.Interop</ProjectName> <ProjectName>DSInternals.Replication.Interop</ProjectName>
<WindowsTargetPlatformVersion>10.0.17763.0</WindowsTargetPlatformVersion> <WindowsTargetPlatformVersion>10.0.17134.0</WindowsTargetPlatformVersion>
</PropertyGroup> </PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">

View File

@ -1,30 +1,118 @@
# .NET Desktop # Azure Pipelines Build Configuration
# Build and run tests for .NET Desktop or Windows classic desktop solutions.
# Add steps that publish symbols, save build artifacts, and more:
# https://docs.microsoft.com/azure/devops/pipelines/apps/windows/dot-net
pool: pool:
vmImage: 'VS2017-Win2016' vmImage: 'VS2017-Win2016'
variables: variables:
solution: '**/*.sln' solution: '**/*.sln'
buildPlatform: 'Any CPU'
buildConfiguration: 'Release' buildConfiguration: 'Release'
packagesFolder: 'Build/packages'
steps: steps:
- task: NuGetToolInstaller@0 - task: NuGetToolInstaller@0
- task: NuGetCommand@2 - task: NuGetCommand@2
displayName: 'NuGet Restore Packages'
inputs: inputs:
command: 'restore'
restoreSolution: '$(solution)' 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 - task: VSBuild@1
displayName: 'VSBuild ($(buildConfiguration) x86)'
inputs: inputs:
solution: '$(solution)' solution: '$(solution)'
platform: '$(buildPlatform)' platform: 'x86'
configuration: '$(buildConfiguration)' configuration: '$(buildConfiguration)'
restoreNugetPackages: false
- task: VSTest@2 - task: VSBuild@1
displayName: 'VSBuild ($(buildConfiguration) x64)'
inputs: inputs:
platform: '$(buildPlatform)' solution: '$(solution)'
platform: 'x64'
configuration: '$(buildConfiguration)' 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