From f2c5490ff3bd84423e12d2cbb61b6c03fc5b4afc Mon Sep 17 00:00:00 2001 From: dzaitsev Date: Wed, 7 May 2025 19:53:13 +0300 Subject: [PATCH] pipelines zip and gdrive upload updated --- build/jenkins/GDriveUpload | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/build/jenkins/GDriveUpload b/build/jenkins/GDriveUpload index 22bad3d..91230c3 100644 --- a/build/jenkins/GDriveUpload +++ b/build/jenkins/GDriveUpload @@ -6,13 +6,12 @@ pipeline { } parameters { - string(name: 'buildPath', defaultValue: 'C:/Jenkins/workspace/Azaion//suite', description: 'Path to folder containing zip builds.') + string(name: 'buildPath', defaultValue: 'C:/Jenkins/workspace/Azaion/suite', description: 'Path to folder containing zip builds.') } environment { GOOGLE_DRIVE_FOLDER = 'AzaionSuiteBuilds' // Hardcoded folder on Google Drive RCLONE_CONFIG = 'C:/Program Files/rclone/rclone.conf' - LATEST_ZIP_FILENAME = '' // Will be set during the "Find Latest Zip" stage } stages { @@ -31,7 +30,9 @@ pipeline { stage('Find Latest Zip') { steps { script { + echo "Using build path: ${params.buildPath}" // Debug output for build path echo "Finding latest zip file in: ${params.buildPath}" + def latestZipFilename = '' dir("${params.buildPath}") { def output = powershell(returnStdout: true, script: ''' $pattern = "AzaionSuite*.zip" @@ -50,13 +51,15 @@ pipeline { def match = output =~ /::SET-ENV::LATEST_ZIP_FILENAME=(.+)/ if (!match || !match[0][1]?.trim()) { echo "⚠️ No ZIP files matching the pattern were found. Skipping upload and cleanup stages." - env.LATEST_ZIP_FILENAME = '' } else { - def zipFileName = match[0][1] - echo "✅ Latest zip file selected: ${zipFileName}" - env.LATEST_ZIP_FILENAME = zipFileName + latestZipFilename = match[0][1] + echo "✅ Latest zip file selected: ${latestZipFilename}" } } + + // Pass the filename to the next stages directly + env.LATEST_ZIP_FILENAME = latestZipFilename + echo "LATEST_ZIP_FILENAME after processing: ${env.LATEST_ZIP_FILENAME}" } } }