mirror of
https://github.com/azaion/annotations.git
synced 2026-04-22 06:56:29 +00:00
gdrive update
This commit is contained in:
@@ -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."
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user