mirror of
https://github.com/azaion/annotations.git
synced 2026-04-22 11:26:31 +00:00
zip update
This commit is contained in:
+8
-17
@@ -166,7 +166,7 @@ pipeline {
|
||||
|
||||
// Read the zip filename from the temporary file
|
||||
def createdZipFilename = ""
|
||||
def tempFilenameFile = "zip_filename.txt" // Must match the name used in PowerShell
|
||||
// Removed the duplicate declaration of tempFilenameFile here.
|
||||
|
||||
try {
|
||||
echo "Attempting to read zip filename from temporary file: ${tempFilenameFile}"
|
||||
@@ -177,22 +177,13 @@ pipeline {
|
||||
echo "Warning: Temporary filename file '${tempFilenameFile}' not found. Zip creation might have failed."
|
||||
} finally {
|
||||
// Clean up the temporary file
|
||||
echo "Cleaning up temporary filename file: ${tempFilenameFile}"
|
||||
deleteDir() // Use deleteDir() to remove files/dirs in the current dir block
|
||||
// Or more specifically: fileOperations([genSandboxConfig: true, operations: [[excludes: null, includes: tempFilenameFile, pattern: null, type: 'DELETE']]])
|
||||
// Let's use deleteDir() within the dir block for simplicity here. Note: deleteDir() removes everything in the current dir block.
|
||||
// A more targeted approach might be needed if other files must persist.
|
||||
// For now, let's assume it's safe to clean the entire dir block.
|
||||
// Wait, deleteDir() is too aggressive. Let's use the fileOperations step.
|
||||
}
|
||||
|
||||
// Re-implementing cleanup using fileOperations
|
||||
try {
|
||||
echo "Cleaning up temporary filename file: ${tempFilenameFile} using fileOperations"
|
||||
fileOperations([genSandboxConfig: true, operations: [[excludes: null, includes: tempFilenameFile, pattern: null, type: 'DELETE']]])
|
||||
echo "Temporary filename file cleaned up."
|
||||
} catch (Exception e) {
|
||||
echo "Warning: Failed to clean up temporary filename file '${tempFilenameFile}': ${e.getMessage()}"
|
||||
try {
|
||||
echo "Cleaning up temporary filename file: ${tempFilenameFile} using fileOperations"
|
||||
fileOperations([genSandboxConfig: true, operations: [[excludes: null, includes: tempFilenameFile, pattern: null, type: 'DELETE']]])
|
||||
echo "Temporary filename file cleaned up."
|
||||
} catch (Exception e) {
|
||||
echo "Warning: Failed to clean up temporary filename file '${tempFilenameFile}': ${e.getMessage()}"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user