zip update

This commit is contained in:
dzaitsev
2025-05-04 14:13:16 +03:00
parent 366aab294e
commit 604e3d132e
+19 -5
View File
@@ -128,14 +128,28 @@ pipeline {
exit 1 exit 1
} }
# Output the final zip filename # This is the critical fix - we need to make sure this is the last thing output
Write-Output $zipFilename # And ensure it's on its own line with no other text
Write-Host "ZIPFILENAME=$zipFilename"
exit 0 exit 0
''' '''
// Trim the output and set the environment variable // Extract the zip filename from the PowerShell output by looking for "ZIPFILENAME=" prefix
env.CREATED_ZIP_FILENAME = zipFilenameOutput.trim() def outputLines = zipFilenameOutput.split('\n')
echo "Zip filename: ${env.CREATED_ZIP_FILENAME}" def zipFilename = null
for (line in outputLines) {
if (line.trim().startsWith("ZIPFILENAME=")) {
zipFilename = line.trim() - "ZIPFILENAME="
break
}
}
if (zipFilename) {
env.CREATED_ZIP_FILENAME = zipFilename.trim()
echo "Found zip filename: ${env.CREATED_ZIP_FILENAME}"
} else {
error "Failed to extract zip filename from PowerShell output. Check PowerShell script."
}
} }
} }
} }