pipelines zip and gdrive upload

updated
This commit is contained in:
dzaitsev
2025-05-07 19:48:38 +03:00
parent e0fd55d908
commit 8df405c898
+11 -2
View File
@@ -44,6 +44,9 @@ pipeline {
}
''').trim()
// Debug output to verify the response from the powershell script
echo "PowerShell output: ${output}"
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."
@@ -60,7 +63,10 @@ pipeline {
stage('Upload If Not Exists & Always Remove Local') {
when {
expression { return env.LATEST_ZIP_FILENAME?.trim() }
expression {
echo "LATEST_ZIP_FILENAME is: '${env.LATEST_ZIP_FILENAME}'" // Debug output
return env.LATEST_ZIP_FILENAME?.trim()
}
}
steps {
echo "Checking Google Drive for existing ZIP and uploading if needed..."
@@ -95,7 +101,10 @@ pipeline {
stage('Cleanup Older Files on Google Drive') {
when {
expression { return env.LATEST_ZIP_FILENAME?.trim() }
expression {
echo "LATEST_ZIP_FILENAME is: '${env.LATEST_ZIP_FILENAME}'" // Debug output
return env.LATEST_ZIP_FILENAME?.trim()
}
}
steps {
echo "Cleaning up older files on Google Drive..."