zip update

This commit is contained in:
dzaitsev
2025-05-04 13:58:40 +03:00
parent 05b830b7fb
commit b165aa3ede
+7 -18
View File
@@ -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
} // End of pipeline block