Skip to content

Commit 6d8e400

Browse files
committed
add tar.gz
1 parent 35682e9 commit 6d8e400

File tree

1 file changed

+19
-10
lines changed

1 file changed

+19
-10
lines changed

azure-pipelines-release.yml

Lines changed: 19 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ extends:
152152
]
153153
154154
- task: PowerShell@2
155-
displayName: "Pack Spark Worker Zip"
155+
displayName: "Pack Spark Worker Archives"
156156
inputs:
157157
targetType: "inline"
158158
script: |
@@ -163,6 +163,12 @@ extends:
163163
Get-ChildItem -Path "$binaryFolder\$OSType" -Recurse | Move-Item -Destination "$binaryFolder\$OSType-archive\Microsoft.Spark.Worker-$(DotnetPackageVersion)"
164164
$archiveFile_zip = "$binaryFolder\$OSType-archive\Microsoft.Spark.Worker.net8.0.$OSType-$(DotnetPackageVersion).zip"
165165
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+
}
166172
}
167173
$binaryFolder = "$(ArtifactPath)\Microsoft.Spark.Worker\net48"
168174
New-Item -Path "$binaryFolder\win-x64-archive" -ItemType Directory -Force
@@ -171,10 +177,12 @@ extends:
171177
Compress-Archive -Path $binaryFolder\win-x64-archive\Microsoft.Spark.Worker-$(DotnetPackageVersion) -DestinationPath $archiveFile_zip
172178
173179
- 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'
175181
inputs:
176182
SourceFolder: '$(ArtifactPath)\Microsoft.Spark.Worker\net8.0'
177-
Contents: '*\*.zip'
183+
Contents: |
184+
*\*.zip
185+
*\*.tar.gz
178186
TargetFolder: '$(ArtifactPath)\Output'
179187

180188
- task: CopyFiles@2
@@ -216,19 +224,20 @@ extends:
216224
Expand-Archive -Path $zipPath -DestinationPath $extractPath -Force
217225
Remove-Item -Path $zipPath -Force
218226
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
220228
Get-ChildItem -Path $extractPath\lib -Directory | ForEach-Object {
221229
$frameworkDir = $_.Name
222230
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"
224233
New-Item -Path $targetPath -ItemType Directory -Force
225234
Copy-Item $_.FullName -Destination $targetPath
226235
}
227236
}
228237
}
229238
230239
- task: EsrpCodeSigning@5
231-
displayName: 'Sign Microsoft.Spark.*.dll files'
240+
displayName: 'Sign Microsoft.Spark*.dll files'
232241
inputs:
233242
ConnectedServiceName: $(ConnectedServiceName)
234243
AppRegistrationClientId: $(AppRegistrationClientId)
@@ -238,7 +247,7 @@ extends:
238247
AuthAKVName: $(AuthAKVName)
239248
AuthSignCertName: $(AuthSignCertName)
240249
FolderPath: '$(ArtifactPath)\NuGetExtract\ToSign'
241-
Pattern: '**\Microsoft.Spark.*.dll'
250+
Pattern: '**\Microsoft.Spark*.dll'
242251
UseMinimatch: true
243252
OpusName: 'Microsoft'
244253
OpusInfo: 'http://www.microsoft.com'
@@ -279,12 +288,12 @@ extends:
279288
$packageDir = $package.FullName
280289
$packageName = $package.Name
281290
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
283292
$frameworks = Get-ChildItem -Path (Join-Path $packageDir "lib") -Directory
284293
foreach ($framework in $frameworks) {
285294
$dllFiles = Get-ChildItem -Path $framework.FullName -Filter "Microsoft.Spark*.dll"
286295
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)"
288297
if (Test-Path $signedDllPath) {
289298
Copy-Item -Path $signedDllPath -Destination $dll.FullName -Force
290299
}
@@ -351,4 +360,4 @@ extends:
351360
- script: |
352361
cd $(Build.SourcesDirectory)
353362
dir /B /S
354-
displayName: '[TEMP] Print SourcesDirectory'
363+
displayName: '[TEMP] Print SourcesDirectory'

0 commit comments

Comments
 (0)