gdrive update

This commit is contained in:
dzaitsev
2025-05-04 14:59:16 +03:00
parent efde78ad93
commit 78caeac943
+10 -1
View File
@@ -88,7 +88,16 @@ pipeline {
# If there are files to delete, remove them
if (\$filesToDelete.Count -gt 0) {
Write-Output "Deleting files: \$filesToDelete"
rclone delete AzaionGoogleDrive:${params.GOOGLE_DRIVE_FOLDER} --files-from <(echo \$filesToDelete) --drive-chunk-size 64M
# Create a temporary file to store the list of files to delete
\$tempFile = [System.IO.Path]::GetTempFileName()
\$filesToDelete | Out-File -FilePath \$tempFile -Encoding utf8
# Use rclone to delete the files
rclone delete AzaionGoogleDrive:${params.GOOGLE_DRIVE_FOLDER} --files-from \$tempFile --drive-chunk-size 64M
# Clean up the temporary file
Remove-Item -Path \$tempFile
} else {
Write-Output "No files to delete."
}