From d60484d32f77053bfed348c7afc67a8c5e09f7eb Mon Sep 17 00:00:00 2001 From: Joshua Larkin <70237359+j0shuams@users.noreply.github.com> Date: Wed, 19 Jan 2022 16:09:24 -0800 Subject: [PATCH] ADO Pipeline Variables (#1080) --- .gitignore | 1 - .../CsWinRT-BuildAndTest-Stage.yml | 24 +++++++++---------- .../CsWinRT-Pipeline.yml | 11 +++++---- .../CsWinRT-PublishToMaestro-Stage.yml | 4 ++++ .../CsWinRT-Variables.yml | 12 ++++++++++ 5 files changed, 35 insertions(+), 17 deletions(-) create mode 100644 build/AzurePipelineTemplates/CsWinRT-Variables.yml diff --git a/.gitignore b/.gitignore index ea48d6885..8e8bd3515 100644 --- a/.gitignore +++ b/.gitignore @@ -6,7 +6,6 @@ *.c *.winmd *test*.xml -build obj packages Debug diff --git a/build/AzurePipelineTemplates/CsWinRT-BuildAndTest-Stage.yml b/build/AzurePipelineTemplates/CsWinRT-BuildAndTest-Stage.yml index 0a520c811..9bca419c2 100644 --- a/build/AzurePipelineTemplates/CsWinRT-BuildAndTest-Stage.yml +++ b/build/AzurePipelineTemplates/CsWinRT-BuildAndTest-Stage.yml @@ -11,23 +11,23 @@ stages: maxParallel: 10 matrix: x64_Debug: - BuildPlatform: x64 - BuildConfiguration: debug + BuildPlatform: 'x64' + BuildConfiguration: 'debug' x86_Debug: - BuildPlatform: x86 - BuildConfiguration: debug + BuildPlatform: 'x86' + BuildConfiguration: 'debug' arm64_Debug: - BuildPlatform: arm64 - BuildConfiguration: debug + BuildPlatform: 'arm64' + BuildConfiguration: 'debug' x64_Release: - BuildPlatform: x64 - BuildConfiguration: release + BuildPlatform: 'x64' + BuildConfiguration: 'release' x86_Release: - BuildPlatform: x86 - BuildConfiguration: release + BuildPlatform: 'x86' + BuildConfiguration: 'release' arm64_Release: - BuildPlatform: arm64 - BuildConfiguration: release + BuildPlatform: 'arm64' + BuildConfiguration: 'release' steps: - checkout: self diff --git a/build/AzurePipelineTemplates/CsWinRT-Pipeline.yml b/build/AzurePipelineTemplates/CsWinRT-Pipeline.yml index d562207a7..dff565abb 100644 --- a/build/AzurePipelineTemplates/CsWinRT-Pipeline.yml +++ b/build/AzurePipelineTemplates/CsWinRT-Pipeline.yml @@ -1,4 +1,6 @@ -# This file is used as basis for the ADO pipeline +variables: +- template: CsWinRT-Variables.yml + name: $(MajorVersion).$(MinorVersion).$(PatchVersion)$(PrereleaseVersion).$(date:yyMMdd)$(rev:.r) stages: @@ -6,6 +8,7 @@ stages: - template: CsWinRT-PublishToNuget-Stage.yml -# if we are doing a release build, publish the build to Maestro -- ${{ if eq( '$(PrereleaseVersion)', '') }}: - template: CsWinRT-PublishToMaestro-Stage.yml \ No newline at end of file +- template: CsWinRT-PublishToMaestro-Stage.yml + parameters: + ${{ if eq(variables['PrereleaseVersion'], '') }}: + IsRelease: true \ No newline at end of file diff --git a/build/AzurePipelineTemplates/CsWinRT-PublishToMaestro-Stage.yml b/build/AzurePipelineTemplates/CsWinRT-PublishToMaestro-Stage.yml index bc1811fa6..38b52f50f 100644 --- a/build/AzurePipelineTemplates/CsWinRT-PublishToMaestro-Stage.yml +++ b/build/AzurePipelineTemplates/CsWinRT-PublishToMaestro-Stage.yml @@ -1,8 +1,12 @@ +parameters: + IsRelease: '' + stages: - stage: PublishToMaestro displayName: Trigger Maestro Publish jobs: - job: TriggerMaestroPublish + condition: eq('${{ parameters.IsRelease }}','true') variables: _DotNetCoreRuntimeVersion: 5.0.11 # matches with SDK v. 5.0.402 _WindowsSdkPackageVersion: 10.0.18362.22 # matches with one consumed in WindowsAppSdk diff --git a/build/AzurePipelineTemplates/CsWinRT-Variables.yml b/build/AzurePipelineTemplates/CsWinRT-Variables.yml new file mode 100644 index 000000000..f9b4288b4 --- /dev/null +++ b/build/AzurePipelineTemplates/CsWinRT-Variables.yml @@ -0,0 +1,12 @@ +variables: + DotNetRuntimeVersion: '5.0.11' + MajorVersion: 1 + MinorVersion: 4 + PatchVersion: 2 + PrereleaseVersion: '-prerelease' + WinRT.Runtime.AssemblyVersion: '1.4.0.0' + Net5.SDK.Feed: 'https://dotnetcli.blob.core.windows.net/dotnet' + Net5.SDK.Version: '5.0.402' + Net6.SDK.Version: '6.0.100-rc.2.21505.57' + NoSamples: 'false' +