mirror of
https://github.com/azaion/annotations.git
synced 2026-04-22 10:46:30 +00:00
pipelines zip and gdrive upload
updated
This commit is contained in:
@@ -6,13 +6,12 @@ pipeline {
|
|||||||
}
|
}
|
||||||
|
|
||||||
parameters {
|
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 {
|
environment {
|
||||||
GOOGLE_DRIVE_FOLDER = 'AzaionSuiteBuilds' // Hardcoded folder on Google Drive
|
GOOGLE_DRIVE_FOLDER = 'AzaionSuiteBuilds' // Hardcoded folder on Google Drive
|
||||||
RCLONE_CONFIG = 'C:/Program Files/rclone/rclone.conf'
|
RCLONE_CONFIG = 'C:/Program Files/rclone/rclone.conf'
|
||||||
LATEST_ZIP_FILENAME = '' // Will be set during the "Find Latest Zip" stage
|
|
||||||
}
|
}
|
||||||
|
|
||||||
stages {
|
stages {
|
||||||
@@ -31,7 +30,9 @@ pipeline {
|
|||||||
stage('Find Latest Zip') {
|
stage('Find Latest Zip') {
|
||||||
steps {
|
steps {
|
||||||
script {
|
script {
|
||||||
|
echo "Using build path: ${params.buildPath}" // Debug output for build path
|
||||||
echo "Finding latest zip file in: ${params.buildPath}"
|
echo "Finding latest zip file in: ${params.buildPath}"
|
||||||
|
def latestZipFilename = ''
|
||||||
dir("${params.buildPath}") {
|
dir("${params.buildPath}") {
|
||||||
def output = powershell(returnStdout: true, script: '''
|
def output = powershell(returnStdout: true, script: '''
|
||||||
$pattern = "AzaionSuite*.zip"
|
$pattern = "AzaionSuite*.zip"
|
||||||
@@ -50,13 +51,15 @@ pipeline {
|
|||||||
def match = output =~ /::SET-ENV::LATEST_ZIP_FILENAME=(.+)/
|
def match = output =~ /::SET-ENV::LATEST_ZIP_FILENAME=(.+)/
|
||||||
if (!match || !match[0][1]?.trim()) {
|
if (!match || !match[0][1]?.trim()) {
|
||||||
echo "⚠️ No ZIP files matching the pattern were found. Skipping upload and cleanup stages."
|
echo "⚠️ No ZIP files matching the pattern were found. Skipping upload and cleanup stages."
|
||||||
env.LATEST_ZIP_FILENAME = ''
|
|
||||||
} else {
|
} else {
|
||||||
def zipFileName = match[0][1]
|
latestZipFilename = match[0][1]
|
||||||
echo "✅ Latest zip file selected: ${zipFileName}"
|
echo "✅ Latest zip file selected: ${latestZipFilename}"
|
||||||
env.LATEST_ZIP_FILENAME = zipFileName
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 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