Skip to content

Commit 6186a31

Browse files
hrideshmgcanihavesomecoffee
authored andcommitted
perf: optimize startup time by using rclone copy directly
1 parent fd80f8f commit 6186a31

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

install/ci-vm/ci-windows/startup-script.ps1

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ curl.exe https://downloads.rclone.org/v1.59.0/rclone-v1.59.0-windows-amd64.zip -
77
Expand-Archive -Path rclone.zip -DestinationPath .\
88
New-Item -Path '.\repository' -ItemType Directory
99
Copy-Item -Path .\rclone-v1.59.0-windows-amd64\rclone.exe -Destination .\repository\
10+
Add-MpPreference -ExclusionProcess 'C:\Windows\Temp\repository\rclone.exe'
1011

1112
cd repository
1213
New-Item -Path '.\reports' -ItemType Directory
@@ -29,13 +30,10 @@ Start-Sleep -Seconds 5
2930
start powershell {.\rclone.exe mount $env:mount_path\TestData\ci-windows .\temp --config=".\rclone.conf" --no-console --read-only}
3031
Start-Sleep -Seconds 5
3132

32-
start powershell {.\rclone.exe mount $env:mount_path\TestResults .\TestResultsRemote --config=".\rclone.conf" --no-console --read-only}
33-
Start-Sleep -Seconds 5
34-
3533
start powershell {.\rclone.exe mount $env:mount_path\vm_data\$env:vm_name .\vm_data --config=".\rclone.conf" --no-console --read-only}
3634
Start-Sleep -Seconds 5
3735

3836
Copy-Item -Path "temp\*" -Destination "."
39-
Copy-Item -Path "TestResultsRemote" -Destination "TestResults" -Force -Recurse
37+
.\rclone.exe copy $env:mount_path\TestResults .\TestResults --config=".\rclone.conf"
4038

4139
powershell -command "Start-Process runCI.bat -Verb runas"

0 commit comments

Comments
 (0)