gdrive update

This commit is contained in:
dzaitsev
2025-05-04 14:34:33 +03:00
parent 0c0cc1bb83
commit f0f6e05b0d
+14 -5
View File
@@ -1,5 +1,13 @@
pipeline { pipeline {
agent { label 'windows' } agent { label 'Win10-BuildMachine' }
tools {
git 'Default'
}
environment {
GOOGLE_DRIVE_UPLOAD_JOB_NAME = 'YourGoogleDriveUploadPipelineName' // <<== Update this
}
stages { stages {
stage('Initialize Workspace') { stage('Initialize Workspace') {
@@ -44,14 +52,15 @@ pipeline {
} }
} }
stage('Retention on Google Drive') { stage('Upload to Google Drive using rclone') {
steps { steps {
echo "Uploading ${env.LATEST_ZIP_FILENAME} to Google Drive..." echo "Uploading ${env.LATEST_ZIP_FILENAME} to Google Drive..."
// Example command (replace with actual upload command)
powershell """ powershell """
\$filePath = "C:/Jenkins/workspace/AzaionSuite/suite/${env.LATEST_ZIP_FILENAME}" \$filePath = "C:/Jenkins/workspace/AzaionSuite/suite/${env.LATEST_ZIP_FILENAME}"
Write-Output "Would upload: \$filePath" Write-Output "Preparing to upload: \$filePath"
# Add your actual GDrive upload logic here
# Use rclone to upload the file to Google Drive
rclone copy "\$filePath" remote:YourFolderNameOnGDrive --progress --drive-chunk-size 64M
""" """
} }
} }