mirror of
https://github.com/azaion/annotations.git
synced 2026-04-22 08:36:29 +00:00
gdrive update
This commit is contained in:
@@ -100,9 +100,12 @@ pipeline {
|
|||||||
if (\$filesToDelete.Count -gt 0) {
|
if (\$filesToDelete.Count -gt 0) {
|
||||||
Write-Output "Deleting files: \$filesToDelete"
|
Write-Output "Deleting files: \$filesToDelete"
|
||||||
|
|
||||||
|
# Extract file names (without timestamps)
|
||||||
|
\$fileNamesToDelete = \$filesToDelete -replace '^\S+ ', ''
|
||||||
|
|
||||||
# Create a temporary file to store the list of files to delete
|
# Create a temporary file to store the list of files to delete
|
||||||
\$tempFile = [System.IO.Path]::GetTempFileName()
|
\$tempFile = [System.IO.Path]::GetTempFileName()
|
||||||
\$filesToDelete | Out-File -FilePath \$tempFile -Encoding utf8
|
\$fileNamesToDelete | Out-File -FilePath \$tempFile -Encoding utf8
|
||||||
|
|
||||||
# Use rclone to delete the files
|
# Use rclone to delete the files
|
||||||
rclone delete AzaionGoogleDrive:${params.GOOGLE_DRIVE_FOLDER} --files-from \$tempFile --drive-chunk-size 64M
|
rclone delete AzaionGoogleDrive:${params.GOOGLE_DRIVE_FOLDER} --files-from \$tempFile --drive-chunk-size 64M
|
||||||
|
|||||||
Reference in New Issue
Block a user