mirror of
https://github.com/azaion/annotations.git
synced 2026-04-22 10:36:30 +00:00
updated pipelines zip and gdrive upload
This commit is contained in:
@@ -7,6 +7,7 @@ pipeline {
|
|||||||
|
|
||||||
parameters {
|
parameters {
|
||||||
string(name: 'GOOGLE_DRIVE_FOLDER', defaultValue: 'AzaionSuiteBuilds', description: 'The folder on Google Drive where the build will be uploaded.')
|
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 {
|
environment {
|
||||||
@@ -29,8 +30,8 @@ pipeline {
|
|||||||
stage('Find Latest Zip') {
|
stage('Find Latest Zip') {
|
||||||
steps {
|
steps {
|
||||||
script {
|
script {
|
||||||
echo "Finding latest zip file..."
|
echo "Finding latest zip file in: ${params.buildPath}"
|
||||||
dir("C:/Jenkins/workspace/AzaionSuite/suite") {
|
dir("${params.buildPath}") {
|
||||||
def output = powershell(returnStdout: true, script: '''
|
def output = powershell(returnStdout: true, script: '''
|
||||||
$pattern = "AzaionSuite*-*-*.zip"
|
$pattern = "AzaionSuite*-*-*.zip"
|
||||||
$zipFiles = Get-ChildItem -Filter $pattern | Sort-Object Name -Descending
|
$zipFiles = Get-ChildItem -Filter $pattern | Sort-Object Name -Descending
|
||||||
@@ -66,7 +67,7 @@ pipeline {
|
|||||||
\$fileName = "${env.LATEST_ZIP_FILENAME}"
|
\$fileName = "${env.LATEST_ZIP_FILENAME}"
|
||||||
\$folder = "${params.GOOGLE_DRIVE_FOLDER}"
|
\$folder = "${params.GOOGLE_DRIVE_FOLDER}"
|
||||||
\$rcloneRemote = "AzaionGoogleDrive:\$folder"
|
\$rcloneRemote = "AzaionGoogleDrive:\$folder"
|
||||||
\$localFilePath = "C:/Jenkins/workspace/AzaionSuite/suite/\$fileName"
|
\$localFilePath = "${params.buildPath}/\$fileName"
|
||||||
|
|
||||||
Write-Output "Checking for existing files in: \$rcloneRemote"
|
Write-Output "Checking for existing files in: \$rcloneRemote"
|
||||||
\$existingFiles = rclone lsf --files-only \$rcloneRemote
|
\$existingFiles = rclone lsf --files-only \$rcloneRemote
|
||||||
|
|||||||
+9
-7
@@ -107,15 +107,17 @@ pipeline {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
stage('Trigger Google Drive Upload') {
|
stage('Trigger Google Drive Upload') {
|
||||||
steps {
|
steps {
|
||||||
script {
|
script {
|
||||||
echo "Triggering Google Drive Upload pipeline: ${env.GOOGLE_DRIVE_UPLOAD_JOB_NAME}"
|
echo "Triggering Google Drive Upload pipeline: ${env.GOOGLE_DRIVE_UPLOAD_JOB_NAME}"
|
||||||
build job: 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 {
|
post {
|
||||||
success {
|
success {
|
||||||
|
|||||||
Reference in New Issue
Block a user