Skip to content

Commit af6336d

Browse files
authored
[pack] Use dotnet common artifacts output (#9858)
* Use dotnet common artifacts output * Fix test paths * Fix more tests * Compress-Archive fix attempt * Fix more tests * Remove verbose log from build script * Update build-extensions.ps1 * Remove release_* from esrp signing * Force build * Allow for packing via --pack * Use powershell core --pack * Force build --pack * Fix pwsh --pack * Upgrade back to .NET8 * Fix copy-paste error * Fix Verify_DepsJsonChanges * Undo SDK upgrade
1 parent fab4302 commit af6336d

38 files changed

+165
-152
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
bin
22
obj
3+
out
34
csx
45
.vs
56
.vscode

Directory.Build.props

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<Project>
2+
3+
<PropertyGroup>
4+
<ArtifactsPath>$(MSBuildThisFileDirectory)out</ArtifactsPath>
5+
<ArtifactsPublishOutputName>pub</ArtifactsPublishOutputName>
6+
<ArtifactsPackageOutputName>pkg</ArtifactsPackageOutputName>
7+
</PropertyGroup>
8+
9+
</Project>

azure-pipelines.yml

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ jobs:
4848
filePath: '$(Build.Repository.LocalPath)\build\initialize-pipeline.ps1'
4949
arguments: -minorVersionPrefix "$(minorVersionPrefix)"
5050
showWarnings: true
51+
pwsh: true
5152

5253
- job: BuildArtifacts
5354
dependsOn: InitializePipeline
@@ -82,15 +83,15 @@ jobs:
8283
filePath: '$(Build.Repository.LocalPath)\build\update-hostreferences.ps1'
8384
- task: CopyFiles@2
8485
inputs:
85-
SourceFolder: '$(Build.Repository.LocalPath)\buildoutput'
86-
Contents: '**\*.zip'
86+
SourceFolder: 'out/pub/WebJobs.Script.WebHost'
87+
Contents: '**/*.zip'
8788
TargetFolder: '$(Build.ArtifactStagingDirectory)'
8889
- task: DotNetCoreCLI@2
8990
displayName: 'Build host packages'
9091
inputs:
9192
command: 'custom'
9293
custom: 'pack'
93-
arguments: -o packages -p:BuildNumber=$(buildNumber) -c Release $(packSuffixSwitch)
94+
arguments: -p:BuildNumber=$(buildNumber) -c Release $(packSuffixSwitch)
9495
projects: |
9596
**\WebJobs.Script.csproj
9697
**\WebJobs.Script.WebHost.csproj
@@ -100,7 +101,7 @@ jobs:
100101
foreach ($baseName in @("WebJobs.Script", "WebJobs.Script.WebHost", "WebJobs.Script.Grpc"))
101102
{
102103
$packageName = "Microsoft.Azure." + $baseName + "*.nupkg"
103-
$sourcePath = "$(Build.Repository.LocalPath)/packages/$packageName"
104+
$sourcePath = "$(Build.Repository.LocalPath)/out/pkg/release/$packageName"
104105
if (-not (test-path $sourcePath))
105106
{
106107
throw "Unable to find '$packageName' at './package'"
@@ -138,7 +139,7 @@ jobs:
138139
displayName: 'ESRP CodeSigning: Strong Name and Authenticode'
139140
inputs:
140141
ConnectedServiceName: 'ESRP Service'
141-
FolderPath: 'src\WebJobs.Script.Abstractions\bin\Release'
142+
FolderPath: 'out/bin/WebJobs.Script.Abstractions/release'
142143
Pattern: Microsoft.Azure.WebJobs.Script.Abstractions*.dll
143144
signConfigType: inlineSignParams
144145
inlineOperation: |
@@ -173,14 +174,14 @@ jobs:
173174
inputs:
174175
command: 'custom'
175176
custom: 'pack'
176-
arguments: '--no-build -c Release -o packages'
177+
arguments: '--no-build -c Release'
177178
projects: |
178179
**\WebJobs.Script.Abstractions.csproj
179180
- task: SFP.build-tasks.custom-build-task-1.EsrpCodeSigning@2
180181
displayName: 'ESRP CodeSigning: Nupkg'
181182
inputs:
182183
ConnectedServiceName: 'ESRP Service'
183-
FolderPath: 'packages'
184+
FolderPath: 'out/pkg/release'
184185
Pattern: 'Microsoft.Azure.WebJobs.Script.Abstractions*.nupkg'
185186
signConfigType: inlineSignParams
186187
inlineOperation: |
@@ -204,8 +205,8 @@ jobs:
204205
displayName: 'ESRP CodeSigning: Strong Name and Authenticode'
205206
inputs:
206207
ConnectedServiceName: 'ESRP Service'
207-
FolderPath: 'tools\ExtensionsMetadataGenerator\src\ExtensionsMetadataGenerator\bin\Release'
208-
Pattern: Microsoft.Azure.WebJobs.Script.ExtensionsMetadataGenerator*.dll
208+
FolderPath: 'out/bin/ExtensionsMetadataGenerator'
209+
Pattern: 'Microsoft.Azure.WebJobs.Script.ExtensionsMetadataGenerator*.dll'
209210
signConfigType: inlineSignParams
210211
inlineOperation: |
211212
[
@@ -254,15 +255,15 @@ jobs:
254255
inputs:
255256
command: 'custom'
256257
custom: 'pack'
257-
arguments: '--no-build -c Release -o packages $(emgSuffixSwitch)'
258+
arguments: '--no-build -c Release $(emgSuffixSwitch)'
258259
projects: |
259260
**\ExtensionsMetadataGenerator.csproj
260261
steps:
261262
- task: SFP.build-tasks.custom-build-task-1.EsrpCodeSigning@2
262263
displayName: 'ESRP CodeSigning: Nupkg'
263264
inputs:
264265
ConnectedServiceName: 'ESRP Service'
265-
FolderPath: 'packages'
266+
FolderPath: 'out/pkg/release'
266267
Pattern: 'Microsoft.Azure.WebJobs.Script.ExtensionsMetadataGenerator*.nupkg'
267268
signConfigType: inlineSignParams
268269
inlineOperation: |
@@ -327,16 +328,16 @@ jobs:
327328
- task: ManifestGeneratorTask@0
328329
displayName: 'SBOM Generation Task - NugetPackages'
329330
inputs:
330-
BuildDropPath: '$(Build.Repository.LocalPath)\packages'
331+
BuildDropPath: 'out/pkg/release'
331332
Verbosity: 'Information'
332-
- publish: $(Build.Repository.LocalPath)\packages
333+
- publish: out/pkg/release
333334
artifact: NugetPackages
334335
- task: ManifestGeneratorTask@0
335336
displayName: 'SBOM Generation Task - Performance'
336337
inputs:
337-
BuildDropPath: '$(Build.Repository.LocalPath)\WebJobs.Script.Performance.App'
338+
BuildDropPath: 'WebJobs.Script.Performance.App'
338339
Verbosity: 'Information'
339-
- publish: $(Build.Repository.LocalPath)\WebJobs.Script.Performance.App
340+
- publish: WebJobs.Script.Performance.App
340341
artifact: Performance
341342

342343
- job: RunUnitTests

0 commit comments

Comments
 (0)