mirror of
https://github.com/azaion/annotations.git
synced 2026-04-22 10:46:30 +00:00
zip update
This commit is contained in:
+2
-11
@@ -166,7 +166,7 @@ pipeline {
|
|||||||
|
|
||||||
// Read the zip filename from the temporary file
|
// Read the zip filename from the temporary file
|
||||||
def createdZipFilename = ""
|
def createdZipFilename = ""
|
||||||
def tempFilenameFile = "zip_filename.txt" // Must match the name used in PowerShell
|
// Removed the duplicate declaration of tempFilenameFile here.
|
||||||
|
|
||||||
try {
|
try {
|
||||||
echo "Attempting to read zip filename from temporary file: ${tempFilenameFile}"
|
echo "Attempting to read zip filename from temporary file: ${tempFilenameFile}"
|
||||||
@@ -177,16 +177,6 @@ pipeline {
|
|||||||
echo "Warning: Temporary filename file '${tempFilenameFile}' not found. Zip creation might have failed."
|
echo "Warning: Temporary filename file '${tempFilenameFile}' not found. Zip creation might have failed."
|
||||||
} finally {
|
} finally {
|
||||||
// Clean up the temporary file
|
// 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 {
|
try {
|
||||||
echo "Cleaning up temporary filename file: ${tempFilenameFile} using fileOperations"
|
echo "Cleaning up temporary filename file: ${tempFilenameFile} using fileOperations"
|
||||||
fileOperations([genSandboxConfig: true, operations: [[excludes: null, includes: tempFilenameFile, pattern: null, type: 'DELETE']]])
|
fileOperations([genSandboxConfig: true, operations: [[excludes: null, includes: tempFilenameFile, pattern: null, type: 'DELETE']]])
|
||||||
@@ -194,6 +184,7 @@ pipeline {
|
|||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
echo "Warning: Failed to clean up temporary filename file '${tempFilenameFile}': ${e.getMessage()}"
|
echo "Warning: Failed to clean up temporary filename file '${tempFilenameFile}': ${e.getMessage()}"
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// Set the environment variable for subsequent stages
|
// Set the environment variable for subsequent stages
|
||||||
|
|||||||
Reference in New Issue
Block a user