From 94828b955dd61832efec19351bca9c1c757dcb29 Mon Sep 17 00:00:00 2001 From: Michael Grafnetter Date: Tue, 1 Jan 2019 11:46:56 +0100 Subject: [PATCH] Azure Pipelines Build Config (#72) * Update azure-pipelines.yml for Azure Pipelines --- .../DSInternals.Replication.Interop.vcxproj | 4 +- azure-pipelines.yml | 104 ++++++++++++++++-- 2 files changed, 98 insertions(+), 10 deletions(-) diff --git a/Src/DSInternals.Replication.Interop/DSInternals.Replication.Interop.vcxproj b/Src/DSInternals.Replication.Interop/DSInternals.Replication.Interop.vcxproj index 6b38383..64b7b91 100644 --- a/Src/DSInternals.Replication.Interop/DSInternals.Replication.Interop.vcxproj +++ b/Src/DSInternals.Replication.Interop/DSInternals.Replication.Interop.vcxproj @@ -29,7 +29,7 @@ ManagedCProj DSInternals.Replication.Interop DSInternals.Replication.Interop - 10.0.17763.0 + 10.0.17134.0 @@ -292,4 +292,4 @@ - \ No newline at end of file + diff --git a/azure-pipelines.yml b/azure-pipelines.yml index f05be06..f8a9ca0 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -1,30 +1,118 @@ -# .NET Desktop -# 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 +# Azure Pipelines Build Configuration pool: vmImage: 'VS2017-Win2016' variables: solution: '**/*.sln' - buildPlatform: 'Any CPU' buildConfiguration: 'Release' + packagesFolder: 'Build/packages' steps: - task: NuGetToolInstaller@0 - 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: '$(buildPlatform)' + platform: 'x86' configuration: '$(buildConfiguration)' + restoreNugetPackages: false -- task: VSTest@2 +- task: VSBuild@1 + displayName: 'VSBuild ($(buildConfiguration) x64)' inputs: - platform: '$(buildPlatform)' + solution: '$(solution)' + platform: 'x64' 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 \ No newline at end of file