mirror of
https://github.com/azaion/annotations.git
synced 2026-04-22 10:46:30 +00:00
e6ab8bde47
updated
47 lines
1.5 KiB
Plaintext
47 lines
1.5 KiB
Plaintext
pipeline {
|
|
agent { label 'Win10-BuildMachine' }
|
|
|
|
parameters {
|
|
string(name: 'buildPath', defaultValue: 'C:/Jenkins/workspace/Azaion/suite', description: 'Path where the zip file is located')
|
|
}
|
|
|
|
environment {
|
|
GOOGLE_DRIVE_FOLDER = 'AzaionSuiteBuilds'
|
|
}
|
|
|
|
stages {
|
|
stage('Upload to Google Drive') {
|
|
steps {
|
|
script {
|
|
echo "Looking for ZIP in: ${params.buildPath}"
|
|
echo "Target Google Drive folder: ${env.GOOGLE_DRIVE_FOLDER}"
|
|
dir("${params.buildPath}") {
|
|
def zipFilename = readFile('created_zip.txt').trim()
|
|
if (!fileExists(zipFilename)) {
|
|
error "Zip file '${zipFilename}' not found in ${params.buildPath}"
|
|
}
|
|
|
|
echo "Uploading '${zipFilename}' to Google Drive folder '${env.GOOGLE_DRIVE_FOLDER}'..."
|
|
|
|
// Add actual upload logic here (e.g., gsutil, rclone, or API)
|
|
// Example (placeholder):
|
|
powershell """
|
|
echo Uploading ${zipFilename} to Google Drive...
|
|
rclone copy \"${zipFilename}\" remote:\"${env.GOOGLE_DRIVE_FOLDER}\"
|
|
"""
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
post {
|
|
success {
|
|
echo "Upload completed."
|
|
}
|
|
failure {
|
|
echo "Upload failed."
|
|
}
|
|
}
|
|
}
|