updated pipelines zip and gdrive upload

This commit is contained in:
dzaitsev
2025-05-07 18:37:26 +03:00
parent 5c87f536c1
commit c3e4b741c8
2 changed files with 13 additions and 10 deletions
+4 -3
View File
@@ -7,6 +7,7 @@ pipeline {
parameters {
string(name: 'GOOGLE_DRIVE_FOLDER', defaultValue: 'AzaionSuiteBuilds', description: 'The folder on Google Drive where the build will be uploaded.')
string(name: 'buildPath', defaultValue: 'C:/Jenkins/workspace/AzaionSuite/suite', description: 'Path to folder containing zip builds.')
}
environment {
@@ -29,8 +30,8 @@ pipeline {
stage('Find Latest Zip') {
steps {
script {
echo "Finding latest zip file..."
dir("C:/Jenkins/workspace/AzaionSuite/suite") {
echo "Finding latest zip file in: ${params.buildPath}"
dir("${params.buildPath}") {
def output = powershell(returnStdout: true, script: '''
$pattern = "AzaionSuite*-*-*.zip"
$zipFiles = Get-ChildItem -Filter $pattern | Sort-Object Name -Descending
@@ -66,7 +67,7 @@ pipeline {
\$fileName = "${env.LATEST_ZIP_FILENAME}"
\$folder = "${params.GOOGLE_DRIVE_FOLDER}"
\$rcloneRemote = "AzaionGoogleDrive:\$folder"
\$localFilePath = "C:/Jenkins/workspace/AzaionSuite/suite/\$fileName"
\$localFilePath = "${params.buildPath}/\$fileName"
Write-Output "Checking for existing files in: \$rcloneRemote"
\$existingFiles = rclone lsf --files-only \$rcloneRemote
+9 -7
View File
@@ -107,15 +107,17 @@ pipeline {
}
}
stage('Trigger Google Drive Upload') {
steps {
script {
echo "Triggering Google Drive Upload pipeline: ${env.GOOGLE_DRIVE_UPLOAD_JOB_NAME}"
build job: env.GOOGLE_DRIVE_UPLOAD_JOB_NAME
}
}
stage('Trigger Google Drive Upload') {
steps {
script {
echo "Triggering Google Drive Upload pipeline: ${env.GOOGLE_DRIVE_UPLOAD_JOB_NAME}"
build job: env.GOOGLE_DRIVE_UPLOAD_JOB_NAME, parameters: [
string(name: 'buildPath', value: params.buildPath),
string(name: 'GOOGLE_DRIVE_FOLDER', value: params.GOOGLE_DRIVE_FOLDER)
]
}
}
}
post {
success {