From b165aa3ede38939335c751a9656327af53091d5d Mon Sep 17 00:00:00 2001 From: dzaitsev Date: Sun, 4 May 2025 13:58:40 +0300 Subject: [PATCH] zip update --- build/jenkins/zip | 25 +++++++------------------ 1 file changed, 7 insertions(+), 18 deletions(-) diff --git a/build/jenkins/zip b/build/jenkins/zip index a3682b3..3b67a36 100644 --- a/build/jenkins/zip +++ b/build/jenkins/zip @@ -1,3 +1,6 @@ +// This pipeline job is triggered by the main AzaionSuite build pipeline. +// It operates directly within the main build job's artifact directory, +// zips the artifacts using PowerShell and 7-Zip, and then triggers the Google Drive upload pipeline. pipeline { // Agent should be your Windows VM agent // This job MUST run on the SAME agent as the main build job @@ -42,14 +45,6 @@ pipeline { dir("${env.MAIN_BUILD_ARTIFACTS_DIR}") { echo "Operating in directory: ${pwd()}" - // Define the expected artifact patterns relative to the current directory (MAIN_BUILD_ARTIFACTS_DIR) - // These are now defined as literals within the PowerShell script string - // def exePattern = 'AzaionSuite*.exe' - // def binPattern = 'AzaionSuite*.bin' - // Define defaultVersion here, used if no exe is found - // def defaultVersion = '1.0.0' - - // Use a powershell step to check for existing zip, or create a new one, then output the filename // Capture the output of the powershell script def zipFilenameOutput = powershell returnStdout: true, script: ''' @@ -168,15 +163,9 @@ pipeline { // Capture the output and set the environment variable // The PowerShell script outputs the zip filename as the last line - // Use readLines() to handle multi-line output and get the last line - def outputLines = zipFilenameOutput.readLines().findAll { it.trim() != '' } // Filter out empty lines - if (!outputLines.isEmpty()) { - env.CREATED_ZIP_FILENAME = outputLines.last().trim() - echo "Set CREATED_ZIP_FILENAME environment variable to: ${env.CREATED_ZIP_FILENAME}" - } else { - // This error should now be more informative if no output is captured - error "PowerShell script did not produce any non-empty output lines to capture the zip filename." - } + // Trim any leading/trailing whitespace or newlines from the captured output + env.CREATED_ZIP_FILENAME = zipFilenameOutput.trim() + echo "Set CREATED_ZIP_FILENAME environment variable to: ${env.CREATED_ZIP_FILENAME}" } // End dir block @@ -226,4 +215,4 @@ pipeline { } // End steps block } // End stage block } // End of stages block -} // End of pipeline block \ No newline at end of file +} // End of pipeline block