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." } } }