mirror of
https://github.com/azaion/annotations.git
synced 2026-04-22 11:26:31 +00:00
updated pipelines zip and gdrive upload
This commit is contained in:
@@ -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
|
||||
|
||||
+5
-3
@@ -111,11 +111,13 @@ pipeline {
|
||||
steps {
|
||||
script {
|
||||
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 {
|
||||
success {
|
||||
|
||||
Reference in New Issue
Block a user