diff options
| author | Billy O'Neal <bion@microsoft.com> | 2020-09-28 13:54:10 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-09-28 13:54:10 -0700 |
| commit | 4dc9ecd32b972af1da00d7011f9b9822b4254ef7 (patch) | |
| tree | c4f582ebb51528084dcdfb21a648b4922c03da41 /scripts/azure-pipelines/windows/initialize-environment.ps1 | |
| parent | f25ffef6bf0ea5a28f36b6abcef57d2d1cfc6882 (diff) | |
| download | vcpkg-4dc9ecd32b972af1da00d7011f9b9822b4254ef7.tar.gz vcpkg-4dc9ecd32b972af1da00d7011f9b9822b4254ef7.zip | |
Add MSVC-internal testing scripts to public GitHub. (#13748)
Diffstat (limited to 'scripts/azure-pipelines/windows/initialize-environment.ps1')
| -rw-r--r-- | scripts/azure-pipelines/windows/initialize-environment.ps1 | 23 |
1 files changed, 9 insertions, 14 deletions
diff --git a/scripts/azure-pipelines/windows/initialize-environment.ps1 b/scripts/azure-pipelines/windows/initialize-environment.ps1 index 4a252df49..24520802e 100644 --- a/scripts/azure-pipelines/windows/initialize-environment.ps1 +++ b/scripts/azure-pipelines/windows/initialize-environment.ps1 @@ -8,23 +8,18 @@ Sets up the environment to run other vcpkg CI steps in an Azure Pipelines job. .DESCRIPTION
This script maps network drives from infrastructure and cleans out anything that
might have been leftover from a previous run.
-
-.PARAMETER ForceAllPortsToRebuildKey
-A subdirectory / key to use to force a build without any previous run caching,
-if necessary.
#>
-[CmdletBinding()]
-Param(
- [string]$ForceAllPortsToRebuildKey = ''
-)
-
-$StorageAccountName = $env:StorageAccountName
-$StorageAccountKey = $env:StorageAccountKey
+if ([string]::IsNullOrWhiteSpace($env:StorageAccountName) -or [string]::IsNullOrWhiteSpace($env:StorageAccountKey)) {
+ Write-Host 'No storage account and/or key set, skipping mount of W:\'
+} else {
+ $StorageAccountName = $env:StorageAccountName
+ $StorageAccountKey = $env:StorageAccountKey
-Write-Host 'Setting up archives mount'
-if (-Not (Test-Path W:)) {
- net use W: "\\$StorageAccountName.file.core.windows.net\archives" /u:"AZURE\$StorageAccountName" $StorageAccountKey
+ Write-Host 'Setting up archives mount'
+ if (-Not (Test-Path W:)) {
+ net use W: "\\$StorageAccountName.file.core.windows.net\archives" /u:"AZURE\$StorageAccountName" $StorageAccountKey
+ }
}
Write-Host 'Creating downloads directory'
|
