155 строки
3.7 KiB
YAML
155 строки
3.7 KiB
YAML
trigger:
|
|
- main
|
|
- dev/*
|
|
- rel/*
|
|
|
|
pr:
|
|
- main
|
|
- dev/*
|
|
- rel/*
|
|
|
|
pool:
|
|
vmImage: windows-2019
|
|
|
|
variables:
|
|
BuildConfiguration: Release
|
|
|
|
jobs:
|
|
### BUILD ###
|
|
- job: BuildBits
|
|
timeoutInMinutes: 60
|
|
|
|
steps:
|
|
- task: BatchScript@1
|
|
inputs:
|
|
filename: "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Enterprise\\Common7\\Tools\\VsDevCmd.bat"
|
|
arguments: -no_logo
|
|
modifyEnvironment: true
|
|
displayName: Setup Environment Variables
|
|
|
|
- task: NuGetToolInstaller@1
|
|
displayName: Use NuGet 5.8.1
|
|
inputs:
|
|
versionSpec: 5.8.1
|
|
|
|
- task: NuGetAuthenticate@0
|
|
displayName: 'NuGet Authenticate'
|
|
inputs:
|
|
forceReinstallCredentialProvider: true
|
|
|
|
- task: UseDotNet@2
|
|
displayName: 'Install .NET Core SDK'
|
|
inputs:
|
|
version: 5.0.402
|
|
performMultiLevelLookup: true
|
|
|
|
- task: DotNetCoreCLI@2
|
|
inputs:
|
|
command: custom
|
|
custom: tool
|
|
arguments: install --tool-path . nbgv
|
|
displayName: Install NBGV tool
|
|
|
|
- script: nbgv cloud
|
|
displayName: Set Version
|
|
|
|
#- powershell: .\build\Install-WindowsSdkISO.ps1 19041
|
|
# displayName: Insider SDK
|
|
|
|
- powershell: .\build\build.ps1 -Target Build
|
|
displayName: Build
|
|
|
|
### Unit Tests ###
|
|
|
|
# - powershell: .\build\build.ps1 -Target Test
|
|
# displayName: Test
|
|
|
|
- task: PublishTestResults@2
|
|
inputs:
|
|
testResultsFormat: 'VSTest'
|
|
testResultsFiles: '**/VsTestResults*.trx'
|
|
displayName: Publish Test Results
|
|
condition: always()
|
|
|
|
### UI Integration Tests ###
|
|
|
|
- powershell: .\build\build.ps1 -Target UITest
|
|
displayName: UI Integration Tests
|
|
|
|
- task: PublishPipelineArtifact@1
|
|
displayName: Publish UI Test Results
|
|
inputs:
|
|
targetPath: .\build\UITestResults.wtl
|
|
artifactName: WexUITestLogFileOutput
|
|
condition: always()
|
|
|
|
- task: PublishPipelineArtifact@1
|
|
displayName: Publish Test WexLogFileOutput
|
|
inputs:
|
|
targetPath: .\build\WexLogFileOutput
|
|
artifactName: WexUnitTestErrorLogFileOutput
|
|
condition: failed()
|
|
|
|
### Package ###
|
|
|
|
- powershell: .\build\build.ps1 -Target Package
|
|
displayName: Package
|
|
|
|
- task: PowerShell@2
|
|
displayName: Authenticode Sign Packages
|
|
inputs:
|
|
filePath: build/Sign-Package.ps1
|
|
env:
|
|
SignClientUser: $(SignClientUser)
|
|
SignClientSecret: $(SignClientSecret)
|
|
ArtifactDirectory: bin\nupkg
|
|
condition: and(succeeded(), not(eq(variables['build.reason'], 'PullRequest')), not(eq(variables['SignClientSecret'], '')), not(eq(variables['SignClientUser'], '')))
|
|
|
|
- task: PublishPipelineArtifact@1
|
|
displayName: Publish Package Artifacts
|
|
inputs:
|
|
targetPath: .\bin\nupkg
|
|
artifactName: Packages
|
|
|
|
### Smoke Tests ###
|
|
|
|
#- job: SmokeTests
|
|
# dependsOn: BuildBits
|
|
# timeoutInMinutes: 60
|
|
#
|
|
# steps:
|
|
# - task: DownloadPipelineArtifact@2
|
|
# displayName: Download NuGet Packages Artifact
|
|
# inputs:
|
|
# artifact: Packages
|
|
# path: .\bin\nupkg
|
|
#
|
|
# - task: DotNetCoreCLI@2
|
|
# inputs:
|
|
# command: custom
|
|
# custom: tool
|
|
# arguments: install --tool-path . nbgv
|
|
# displayName: Install NBGV tool
|
|
#
|
|
# - script: nbgv cloud
|
|
# displayName: Set Version
|
|
#
|
|
# - powershell: .\build\build.ps1 -Target SmokeTest
|
|
# displayName: SmokeTest
|
|
#
|
|
# - task: CopyFiles@2
|
|
# inputs:
|
|
# sourceFolder: .\SmokeTests\AppPackages
|
|
# contents: '**\*.msixbundle'
|
|
# targetFolder: $(build.artifactstagingdirectory)\SmokeTestBundles
|
|
#
|
|
# - task: PublishBuildArtifacts@1
|
|
# displayName: Publish Smoke Test Artifacts
|
|
# inputs:
|
|
# pathToPublish: $(build.artifactstagingdirectory)\SmokeTestBundles
|
|
# artifactType: container
|
|
# artifactName: SmokeTestBundles
|
|
|
|
# - powershell: .\SmokeTests\SmokeTestAnalysis.ps1
|
|
# displayName: Analyze Package Sizes
|