mirror of
https://github.com/azaion/annotations.git
synced 2026-04-22 22:46:30 +00:00
zip update
This commit is contained in:
+19
-5
@@ -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."
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user