From 7d01f9ec5bc7686f5d487afda2070c5887662c18 Mon Sep 17 00:00:00 2001 From: Chidozie Ononiwu Date: Wed, 17 Jul 2019 16:57:29 -0700 Subject: [PATCH 1/2] Add release build configuration to release pipeline --- eng/pipelines/client.yml | 2 +- eng/pipelines/templates/jobs/archetype-sdk-client.yml | 8 ++++++-- eng/pipelines/templates/variables/globals.yml | 5 ++++- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/eng/pipelines/client.yml b/eng/pipelines/client.yml index 06d4a08230af8..42403366934f1 100644 --- a/eng/pipelines/client.yml +++ b/eng/pipelines/client.yml @@ -14,4 +14,4 @@ jobs: - template: templates/jobs/archetype-sdk-client.yml parameters: ServiceDirectory: $(ServiceDirectory) - VersioningProperties: /p:OfficialBuildId=$(OfficialBuildId) /p:PreRelaseVersionLabel=$(PreReleaseVersionLabel) /p:DotNetFinalVersionKind=$(DotNetFinalVersionKind) + VersioningProperties: /p:OfficialBuildId=$(OfficialBuildId) /p:PreRelaseVersionLabel=$(PreReleaseVersionLabel) /p:DotNetFinalVersionKind=$(DotNetFinalVersionKind) \ No newline at end of file diff --git a/eng/pipelines/templates/jobs/archetype-sdk-client.yml b/eng/pipelines/templates/jobs/archetype-sdk-client.yml index 7cb41aa5b04e3..665e74441395a 100644 --- a/eng/pipelines/templates/jobs/archetype-sdk-client.yml +++ b/eng/pipelines/templates/jobs/archetype-sdk-client.yml @@ -13,7 +13,9 @@ jobs: displayName: "Use .NET Core sdk $(DotNetCoreSDKVersion)" inputs: version: "$(DotNetCoreSDKVersion)" - - script: "dotnet pack eng/service.proj -o $(Build.ArtifactStagingDirectory) -warnaserror /p:ServiceDirectory=${{parameters.ServiceDirectory}} /p:PublicSign=false ${{ parameters.VersioningProperties }}" + - script: >- + dotnet pack eng/service.proj -o $(Build.ArtifactStagingDirectory) -warnaserror /p:ServiceDirectory=${{parameters.ServiceDirectory}} + /p:PublicSign=false ${{ parameters.VersioningProperties }} /p:Configuration=$(BuildConfiguration) displayName: "Build and Package" env: DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1 @@ -112,7 +114,9 @@ jobs: inputs: packageType: sdk version: "$(DotNetCoreSDKVersion)" - - script: dotnet test eng/service.proj --filter TestCategory!=Live --framework $(TestTargetFramework) --logger "trx;LogFileName=$(TestTargetFramework).trx" /p:ServiceDirectory=${{ parameters.ServiceDirectory }} /p:IncludeSrc=false + - script: >- + dotnet test eng/service.proj --filter TestCategory!=Live --framework $(TestTargetFramework) --logger "trx;LogFileName=$(TestTargetFramework).trx" + /p:ServiceDirectory=${{ parameters.ServiceDirectory }} /p:IncludeSrc=false /p:Configuration=$(BuildConfiguration) displayName: "Build & Test ($(TestTargetFramework))" env: DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1 diff --git a/eng/pipelines/templates/variables/globals.yml b/eng/pipelines/templates/variables/globals.yml index 42dd55c32a8a1..4d93f56619bbd 100644 --- a/eng/pipelines/templates/variables/globals.yml +++ b/eng/pipelines/templates/variables/globals.yml @@ -2,4 +2,7 @@ variables: DotNetCoreSDKVersion: '3.0.100-preview5-011568' DotNetCoreRuntimeVersion: '2.1.10' OfficialBuildId: $(Build.BuildNumber) - skipComponentGovernanceDetection: true \ No newline at end of file + skipComponentGovernanceDetection: true + BuildConfiguration: '' + ${{ if eq(variables['System.TeamProject'], 'internal') }}: + BuildConfiguration: 'Release' \ No newline at end of file From 67e2cd28a60dc35d79d75518aa9f0ad3bf2a0839 Mon Sep 17 00:00:00 2001 From: Chidozie Ononiwu Date: Mon, 29 Jul 2019 13:48:16 -0700 Subject: [PATCH 2/2] add conditional for not equals --- eng/pipelines/templates/variables/globals.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/eng/pipelines/templates/variables/globals.yml b/eng/pipelines/templates/variables/globals.yml index 4d93f56619bbd..f46bdb462afb3 100644 --- a/eng/pipelines/templates/variables/globals.yml +++ b/eng/pipelines/templates/variables/globals.yml @@ -3,6 +3,7 @@ variables: DotNetCoreRuntimeVersion: '2.1.10' OfficialBuildId: $(Build.BuildNumber) skipComponentGovernanceDetection: true - BuildConfiguration: '' + ${{ if ne(variables['System.TeamProject'], 'internal') }}: + BuildConfiguration: 'Debug' ${{ if eq(variables['System.TeamProject'], 'internal') }}: BuildConfiguration: 'Release' \ No newline at end of file