mirror of
https://github.com/azaion/annotations.git
synced 2026-04-22 08:36:29 +00:00
pipelines zip and gdrive upload
updated
This commit is contained in:
@@ -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}"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user