2021-07-16 08:30:19 +03:00
|
|
|
# see https://docs.microsoft.com/azure/devops/pipelines/process/phases for info on yaml ADO jobs
|
2020-08-26 01:12:02 +03:00
|
|
|
name: $(BuildDefinitionName)_$(date:yyMM).$(date:dd)$(rev:rrr)
|
|
|
|
variables:
|
2021-07-16 08:30:19 +03:00
|
|
|
- template: WindowsAppSDK-Versions.yml
|
|
|
|
- template: WindowsAppSDK-CommonVariables.yml
|
2022-02-25 22:29:13 +03:00
|
|
|
- name: buildOutputDir
|
|
|
|
value: $(Build.SourcesDirectory)\BuildOutput
|
2022-06-15 09:58:45 +03:00
|
|
|
|
2020-08-26 01:12:02 +03:00
|
|
|
jobs:
|
2022-04-05 00:33:41 +03:00
|
|
|
- job: PreChecks
|
2021-02-26 23:12:43 +03:00
|
|
|
pool:
|
|
|
|
vmImage: 'windows-2019'
|
|
|
|
steps:
|
2022-04-05 00:33:41 +03:00
|
|
|
- task: PowerShell@2
|
|
|
|
displayName: 'Smoke test props and targets in \build\NuSpecs'
|
|
|
|
inputs:
|
|
|
|
targetType: 'inline'
|
|
|
|
script: |
|
|
|
|
$targetPaths = "$(Build.SourcesDirectory)\build\NuSpecs\*.targets"
|
|
|
|
$propPaths = "$(Build.SourcesDirectory)\build\NuSpecs\*.props"
|
|
|
|
Get-ChildItem $targetPaths | ForEach-Object { $_.Name; [xml](Get-Content $_) | Out-Null }
|
|
|
|
Get-ChildItem $propPaths | ForEach-Object { $_.Name; [xml](Get-Content $_) | Out-Null }
|
|
|
|
failOnStderr: true
|
|
|
|
|
2022-06-22 01:14:09 +03:00
|
|
|
# Scans the root source folder for security vulnerability
|
|
|
|
- task: CredScan@2
|
|
|
|
inputs:
|
|
|
|
toolMajorVersion: 'V2'
|
|
|
|
|
|
|
|
# This PostAnalysis will fail the pipeline if CredScan identifies an issue
|
|
|
|
- task: PostAnalysis@1
|
|
|
|
inputs:
|
|
|
|
AllTools: false
|
|
|
|
APIScan: false
|
|
|
|
BinSkim: false
|
|
|
|
CodesignValidation: false
|
|
|
|
CredScan: true
|
|
|
|
FortifySCA: false
|
|
|
|
FxCop: false
|
|
|
|
ModernCop: false
|
|
|
|
PoliCheck: false
|
|
|
|
RoslynAnalyzers: false
|
|
|
|
SDLNativeRules: false
|
|
|
|
Semmle: false
|
|
|
|
TSLint: false
|
|
|
|
ToolLogsNotFoundAction: 'Standard'
|
2021-02-26 23:12:43 +03:00
|
|
|
|
2020-08-26 01:12:02 +03:00
|
|
|
- job: Build
|
|
|
|
pool:
|
|
|
|
vmImage: 'windows-2019'
|
|
|
|
timeoutInMinutes: 120
|
|
|
|
strategy:
|
|
|
|
maxParallel: 10
|
|
|
|
matrix:
|
|
|
|
Debug_x86:
|
|
|
|
buildPlatform: 'x86'
|
|
|
|
buildConfiguration: 'Debug'
|
|
|
|
Release_x86:
|
|
|
|
buildPlatform: 'x86'
|
|
|
|
buildConfiguration: 'Release'
|
|
|
|
PGOBuildMode: 'Optimize'
|
|
|
|
Release_x64:
|
|
|
|
buildPlatform: 'x64'
|
|
|
|
buildConfiguration: 'Release'
|
|
|
|
PGOBuildMode: 'Optimize'
|
|
|
|
Release_Arm64:
|
|
|
|
buildPlatform: 'arm64'
|
|
|
|
buildConfiguration: 'Release'
|
|
|
|
|
|
|
|
variables:
|
|
|
|
publishDir : $(Build.ArtifactStagingDirectory)
|
|
|
|
steps:
|
2021-07-16 08:30:19 +03:00
|
|
|
- template: AzurePipelinesTemplates\WindowsAppSDK-BuildDevProject-Steps.yml
|
2021-10-20 04:56:27 +03:00
|
|
|
parameters:
|
|
|
|
channel: ${{ variables.channel }}
|
2022-06-22 01:14:09 +03:00
|
|
|
# This pipeline is unable to access OneBranch, so skip running BinaryAnalysis.
|
|
|
|
runSDLBinaryAnalysis: false
|
2021-10-20 04:56:27 +03:00
|
|
|
|
2021-07-16 08:30:19 +03:00
|
|
|
- template: AzurePipelinesTemplates\WindowsAppSDK-PublishProjectOutput-Steps.yml
|
2022-03-15 00:28:08 +03:00
|
|
|
parameters:
|
|
|
|
GenerateSBOM: false
|
2020-08-26 01:12:02 +03:00
|
|
|
|
2022-02-25 22:29:13 +03:00
|
|
|
- task: PublishBuildArtifacts@1
|
|
|
|
displayName: 'Publish BuildOutput'
|
|
|
|
inputs:
|
|
|
|
artifactName: BuildOutput
|
|
|
|
PathtoPublish: '$(buildOutputDir)'
|
|
|
|
|
2022-06-22 01:14:09 +03:00
|
|
|
- task: BinSkim@3
|
|
|
|
inputs:
|
|
|
|
InputType: 'Basic'
|
|
|
|
Function: 'analyze'
|
|
|
|
AnalyzeTarget: '$(Build.ArtifactStagingDirectory)\*.dll;$(Build.ArtifactStagingDirectory)\*.exe'
|
|
|
|
AnalyzeVerbose: true
|
|
|
|
condition: ne(variables['buildConfiguration'], 'Debug')
|
|
|
|
|
|
|
|
- task: PostAnalysis@1
|
|
|
|
inputs:
|
|
|
|
AllTools: false
|
|
|
|
APIScan: false
|
|
|
|
BinSkim: true
|
|
|
|
BinSkimBreakOn: 'Error'
|
|
|
|
CodesignValidation: false
|
|
|
|
CredScan: false
|
|
|
|
FortifySCA: false
|
|
|
|
FxCop: false
|
|
|
|
ModernCop: false
|
|
|
|
PoliCheck: false
|
|
|
|
RoslynAnalyzers: false
|
|
|
|
SDLNativeRules: false
|
|
|
|
Semmle: false
|
|
|
|
TSLint: false
|
|
|
|
ToolLogsNotFoundAction: 'Standard'
|
|
|
|
|
2021-02-24 06:45:02 +03:00
|
|
|
- job: BuildMRT
|
|
|
|
pool:
|
|
|
|
vmImage: 'windows-latest'
|
|
|
|
strategy:
|
|
|
|
maxParallel: 10
|
|
|
|
matrix:
|
|
|
|
Release_x86:
|
|
|
|
buildPlatform: 'x86'
|
|
|
|
buildConfiguration: 'Release'
|
|
|
|
Release_x64:
|
|
|
|
buildPlatform: 'x64'
|
|
|
|
buildConfiguration: 'Release'
|
|
|
|
Release_Arm64:
|
|
|
|
buildPlatform: 'ARM64'
|
|
|
|
buildConfiguration: 'Release'
|
|
|
|
steps:
|
2021-04-25 03:15:20 +03:00
|
|
|
- template: build-mrt.yml
|
2021-02-24 06:45:02 +03:00
|
|
|
parameters:
|
|
|
|
buildJobName: 'BuildMRTCore'
|
2022-03-15 00:28:08 +03:00
|
|
|
GenerateSBOM: false
|
2022-06-22 01:14:09 +03:00
|
|
|
# This pipeline is unable to access OneBranch, so skip running BinaryAnalysis.
|
|
|
|
runSDLBinaryAnalysis: false
|
2021-02-24 06:45:02 +03:00
|
|
|
|
2022-02-25 22:29:13 +03:00
|
|
|
- task: PublishBuildArtifacts@1
|
|
|
|
displayName: 'Publish BuildOutput'
|
|
|
|
inputs:
|
|
|
|
artifactName: BuildOutput
|
|
|
|
PathtoPublish: '$(buildOutputDir)'
|
|
|
|
|
2022-06-22 01:14:09 +03:00
|
|
|
- task: BinSkim@3
|
|
|
|
inputs:
|
|
|
|
InputType: 'Basic'
|
|
|
|
Function: 'analyze'
|
|
|
|
AnalyzeTarget: '$(Build.ArtifactStagingDirectory)\*.dll;$(Build.ArtifactStagingDirectory)\*.exe'
|
|
|
|
AnalyzeVerbose: true
|
|
|
|
|
|
|
|
- task: PostAnalysis@1
|
|
|
|
inputs:
|
|
|
|
AllTools: false
|
|
|
|
APIScan: false
|
|
|
|
BinSkim: true
|
|
|
|
BinSkimBreakOn: 'Error'
|
|
|
|
CodesignValidation: false
|
|
|
|
CredScan: false
|
|
|
|
FortifySCA: false
|
|
|
|
FxCop: false
|
|
|
|
ModernCop: false
|
|
|
|
PoliCheck: false
|
|
|
|
RoslynAnalyzers: false
|
|
|
|
SDLNativeRules: false
|
|
|
|
Semmle: false
|
|
|
|
TSLint: false
|
|
|
|
ToolLogsNotFoundAction: 'Standard'
|
|
|
|
|
2021-02-24 06:45:02 +03:00
|
|
|
- job: PublishMRT
|
|
|
|
dependsOn:
|
|
|
|
- BuildMRT
|
|
|
|
condition: in(dependencies.BuildMRT.result, 'Succeeded')
|
|
|
|
pool:
|
|
|
|
vmImage: 'windows-latest'
|
|
|
|
steps:
|
2021-04-25 03:15:20 +03:00
|
|
|
- template: publish-mrt.yml
|
2021-02-24 06:45:02 +03:00
|
|
|
|
2021-07-16 08:30:19 +03:00
|
|
|
- template: AzurePipelinesTemplates\WindowsAppSDK-RunHelixTests-Job.yml
|
2020-10-20 20:27:16 +03:00
|
|
|
parameters:
|
|
|
|
name: 'RunTestsInHelix'
|
2021-04-25 03:15:20 +03:00
|
|
|
dependsOn:
|
2020-11-13 02:42:27 +03:00
|
|
|
- Build
|
2021-06-30 04:43:29 +03:00
|
|
|
- BuildMRT
|
|
|
|
condition: in(dependencies.Build.result, 'Succeeded', 'SucceededWithIssues')
|
2020-10-20 20:27:16 +03:00
|
|
|
|
2020-08-26 01:12:02 +03:00
|
|
|
# Create Nuget Package
|
2021-07-16 08:30:19 +03:00
|
|
|
- template: AzurePipelinesTemplates\WindowsAppSDK-CreateNugetPackage-Job.yml
|
2020-08-26 01:12:02 +03:00
|
|
|
parameters:
|
2021-05-25 02:05:17 +03:00
|
|
|
publishToMaestro: false
|
2020-08-26 01:12:02 +03:00
|
|
|
jobName: CreateNugetPackage
|
2020-10-22 02:07:27 +03:00
|
|
|
dependsOn:
|
|
|
|
- Build
|
|
|
|
- PublishMRT
|
2020-08-26 01:12:02 +03:00
|
|
|
prereleaseVersionTag: ci
|
2020-10-22 02:07:27 +03:00
|
|
|
condition: |
|
|
|
|
and
|
|
|
|
(
|
|
|
|
in(dependencies.PublishMRT.result, 'Succeeded', 'SucceededWithIssues', 'Skipped'),
|
|
|
|
in(dependencies.Build.result, 'Succeeded', 'SucceededWithIssues', 'Skipped')
|
|
|
|
)
|