Skip to content

Commit d4890d2

Browse files
authored
Always pack in release mode (Azure#49204)
* always pack in 'Release' mode during artifact assembly
1 parent 2bf298a commit d4890d2

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

eng/pipelines/templates/steps/build.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -89,15 +89,18 @@ steps:
8989
parameters:
9090
LogFilePath: $(Build.ArtifactStagingDirectory)/pack.binlog
9191

92-
# only use the project list override file if the service directory is not auto
92+
# Due to discovering differing pack errors during debug vs release builds, we simply always opt into the more advanced
93+
# release pack. This ensures that the public ci is packing the same way as what we will eventually release, and we won't be
94+
# surprised by new errors that pop up only in internal when public CI was clean.
9395
- ${{ if eq(parameters.ServiceDirectory, 'auto') }}:
96+
# only use the project list override file if the service directory is not auto
9497
- pwsh: |
9598
dotnet pack eng/service.proj -warnaserror `
9699
/p:ValidateRunApiCompat=true `
97100
/p:SDKType=${{ parameters.SDKType }} `
98101
/p:IncludeTests=false `
99102
/p:PublicSign=false $(VersioningProperties) `
100-
/p:Configuration=$(BuildConfiguration) `
103+
/p:Configuration=Release `
101104
/p:CommitSHA=$(Build.SourceVersion) `
102105
/p:ArtifactsPackagesDir=$(Build.ArtifactStagingDirectory) `
103106
/p:ServiceDirectory=* `
@@ -116,7 +119,7 @@ steps:
116119
/p:ServiceDirectory=${{ parameters.ServiceDirectory }}
117120
/p:IncludeTests=false
118121
/p:PublicSign=false $(VersioningProperties)
119-
/p:Configuration=$(BuildConfiguration)
122+
/p:Configuration=Release
120123
/p:CommitSHA=$(Build.SourceVersion)
121124
/p:ArtifactsPackagesDir=$(Build.ArtifactStagingDirectory)
122125
$(DiagnosticArguments)
@@ -134,7 +137,7 @@ steps:
134137
arguments: >
135138
-RepoRoot $(Build.SourcesDirectory)
136139
-PackageInfoDirectory $(Build.ArtifactStagingDirectory)/PackageInfo
137-
-BuildConfiguration $(BuildConfiguration)
140+
-BuildConfiguration Release
138141
pwsh: true
139142
workingDirectory: $(Pipeline.Workspace)
140143
displayName: Update package properties with namespaces

0 commit comments

Comments
 (0)