@@ -152,7 +152,7 @@ extends:
152
152
]
153
153
154
154
- task : PowerShell@2
155
- displayName : " Pack Spark Worker Zip "
155
+ displayName : " Pack Spark Worker Archives "
156
156
inputs :
157
157
targetType : " inline"
158
158
script : |
@@ -163,6 +163,12 @@ extends:
163
163
Get-ChildItem -Path "$binaryFolder\$OSType" -Recurse | Move-Item -Destination "$binaryFolder\$OSType-archive\Microsoft.Spark.Worker-$(DotnetPackageVersion)"
164
164
$archiveFile_zip = "$binaryFolder\$OSType-archive\Microsoft.Spark.Worker.net8.0.$OSType-$(DotnetPackageVersion).zip"
165
165
Compress-Archive -Path $binaryFolder\$OSType-archive\Microsoft.Spark.Worker-$(DotnetPackageVersion) -DestinationPath $archiveFile_zip
166
+
167
+ # Create tar.gz for linux-x64
168
+ if ($OSType -eq "linux-x64") {
169
+ $archiveFile_targz = "$binaryFolder\$OSType-archive\Microsoft.Spark.Worker.net8.0.$OSType-$(DotnetPackageVersion).tar.gz"
170
+ tar -czf $archiveFile_targz -C "$binaryFolder\$OSType-archive" Microsoft.Spark.Worker-$(DotnetPackageVersion)
171
+ }
166
172
}
167
173
$binaryFolder = "$(ArtifactPath)\Microsoft.Spark.Worker\net48"
168
174
New-Item -Path "$binaryFolder\win-x64-archive" -ItemType Directory -Force
@@ -171,10 +177,12 @@ extends:
171
177
Compress-Archive -Path $binaryFolder\win-x64-archive\Microsoft.Spark.Worker-$(DotnetPackageVersion) -DestinationPath $archiveFile_zip
172
178
173
179
- task : CopyFiles@2
174
- displayName : ' [COPY] Spark.Net .net8.0 worker archive -> $(ArtifactPath)/Output'
180
+ displayName : ' [COPY] Spark.Net .net8.0 worker archives -> $(ArtifactPath)/Output'
175
181
inputs :
176
182
SourceFolder : ' $(ArtifactPath)\Microsoft.Spark.Worker\net8.0'
177
- Contents : ' *\*.zip'
183
+ Contents : |
184
+ *\*.zip
185
+ *\*.tar.gz
178
186
TargetFolder : ' $(ArtifactPath)\Output'
179
187
180
188
- task : CopyFiles@2
@@ -216,19 +224,20 @@ extends:
216
224
Expand-Archive -Path $zipPath -DestinationPath $extractPath -Force
217
225
Remove-Item -Path $zipPath -Force
218
226
219
- # Copy all Microsoft.Spark. *.dll files to a temp location for signing while preserving the lib folder structure
227
+ # Copy all Microsoft.Spark*.dll files to a temp location for signing while preserving the lib folder structure
220
228
Get-ChildItem -Path $extractPath\lib -Directory | ForEach-Object {
221
229
$frameworkDir = $_.Name
222
230
Get-ChildItem -Path $_.FullName -Filter "Microsoft.Spark*.dll" | ForEach-Object {
223
- $targetPath = Join-Path $workingDir "ToSign\$frameworkDir"
231
+ $packageName = (Split-Path $extractPath -Leaf)
232
+ $targetPath = Join-Path $workingDir "ToSign\$packageName\$frameworkDir"
224
233
New-Item -Path $targetPath -ItemType Directory -Force
225
234
Copy-Item $_.FullName -Destination $targetPath
226
235
}
227
236
}
228
237
}
229
238
230
239
- task : EsrpCodeSigning@5
231
- displayName : ' Sign Microsoft.Spark. *.dll files'
240
+ displayName : ' Sign Microsoft.Spark*.dll files'
232
241
inputs :
233
242
ConnectedServiceName : $(ConnectedServiceName)
234
243
AppRegistrationClientId : $(AppRegistrationClientId)
@@ -238,7 +247,7 @@ extends:
238
247
AuthAKVName : $(AuthAKVName)
239
248
AuthSignCertName : $(AuthSignCertName)
240
249
FolderPath : ' $(ArtifactPath)\NuGetExtract\ToSign'
241
- Pattern : ' **\Microsoft.Spark. *.dll'
250
+ Pattern : ' **\Microsoft.Spark*.dll'
242
251
UseMinimatch : true
243
252
OpusName : ' Microsoft'
244
253
OpusInfo : ' http://www.microsoft.com'
@@ -279,12 +288,12 @@ extends:
279
288
$packageDir = $package.FullName
280
289
$packageName = $package.Name
281
290
282
- # Replace Microsoft.Spark. *.dll files with their signed versions for each framework
291
+ # Replace Microsoft.Spark*.dll files with their signed versions for each framework
283
292
$frameworks = Get-ChildItem -Path (Join-Path $packageDir "lib") -Directory
284
293
foreach ($framework in $frameworks) {
285
294
$dllFiles = Get-ChildItem -Path $framework.FullName -Filter "Microsoft.Spark*.dll"
286
295
foreach ($dll in $dllFiles) {
287
- $signedDllPath = Join-Path $workingDir "ToSign\$($framework.Name)\$($dll.Name)"
296
+ $signedDllPath = Join-Path $workingDir "ToSign\$packageName\$ ($framework.Name)\$($dll.Name)"
288
297
if (Test-Path $signedDllPath) {
289
298
Copy-Item -Path $signedDllPath -Destination $dll.FullName -Force
290
299
}
@@ -351,4 +360,4 @@ extends:
351
360
- script : |
352
361
cd $(Build.SourcesDirectory)
353
362
dir /B /S
354
- displayName: '[TEMP] Print SourcesDirectory'
363
+ displayName: '[TEMP] Print SourcesDirectory'
0 commit comments