mirror of
https://github.com/azaion/annotations.git
synced 2026-04-22 08:16:31 +00:00
pipelines zip and gdrive upload
updated
This commit is contained in:
@@ -12,7 +12,7 @@ pipeline {
|
||||
environment {
|
||||
GOOGLE_DRIVE_FOLDER = 'AzaionSuiteBuilds'
|
||||
RCLONE_CONFIG = 'C:/Program Files/rclone/rclone.conf'
|
||||
LATEST_ZIP_FILENAME = '' // Will be set in Find Latest Zip
|
||||
LATEST_ZIP_FILENAME = '' // Initial value
|
||||
}
|
||||
|
||||
stages {
|
||||
@@ -45,14 +45,17 @@ pipeline {
|
||||
''').trim()
|
||||
|
||||
echo "PowerShell output: ${output}"
|
||||
def m = (output =~ /::SET-ENV::LATEST_ZIP_FILENAME=(.+)/)
|
||||
if (m && m[0][1]) {
|
||||
latestZip = m[0][1]
|
||||
|
||||
def match = (output =~ /::SET-ENV::LATEST_ZIP_FILENAME=(.+)/)
|
||||
if (match) {
|
||||
latestZip = match[0][1]
|
||||
echo "✅ Latest zip file selected: ${latestZip}"
|
||||
} else {
|
||||
echo "⚠️ No zip found, skipping downstream stages."
|
||||
echo "⚠️ No zip found."
|
||||
latestZip = 'none' // Handle case where no file is found
|
||||
}
|
||||
}
|
||||
// Directly assign the value to the env variable for use in other stages
|
||||
env.LATEST_ZIP_FILENAME = latestZip
|
||||
}
|
||||
}
|
||||
@@ -61,8 +64,7 @@ pipeline {
|
||||
stage('Upload If Not Exists & Always Remove Local') {
|
||||
when {
|
||||
expression {
|
||||
echo "LATEST_ZIP_FILENAME is: '${env.LATEST_ZIP_FILENAME}'"
|
||||
return env.LATEST_ZIP_FILENAME?.trim()
|
||||
return env.LATEST_ZIP_FILENAME != 'none'
|
||||
}
|
||||
}
|
||||
steps {
|
||||
@@ -95,8 +97,7 @@ pipeline {
|
||||
stage('Cleanup Older Files on Google Drive') {
|
||||
when {
|
||||
expression {
|
||||
echo "LATEST_ZIP_FILENAME is: '${env.LATEST_ZIP_FILENAME}'"
|
||||
return env.LATEST_ZIP_FILENAME?.trim()
|
||||
return env.LATEST_ZIP_FILENAME != 'none'
|
||||
}
|
||||
}
|
||||
steps {
|
||||
|
||||
Reference in New Issue
Block a user