Provisioning: Mount Vcpkg Cache Drive on Windows

Change-Id: Ib8d0722cdfc8cc16e52f3ac38ef5cc4ff210d751
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
This commit is contained in:
Amir Masoud Abdol
2023-10-30 11:51:04 +01:00
parent 10b0282ea2
commit 9d8337ac91
5 changed files with 24 additions and 0 deletions

View File

@@ -0,0 +1,20 @@
# Copyright (C) 2023 The Qt Company Ltd.
# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
$credentialsFile = "$env:USERPROFILE\vcpkg_samba_credentials"
# Extract username and password from the credentials
$username = "vcpkg"
$securePassword = Get-Content -Path "$credentialsFile" -TotalCount 1 | ConvertTo-SecureString -AsPlainText -Force
# Create a PSCredential object
$credential = New-Object PSCredential -ArgumentList $username, $securePassword
# Mount the SMB share
# Check if the mount was successful
if (New-PSDrive -Persist -Scope Global -Name V -PSProvider FileSystem -Root \\vcpkg-server.ci.qt.io\vcpkg -Credential $credential)
{
Write-Host "SMB share mounted successfully!"
} else {
Write-Host "Failed to mount SMB share."
}

View File

@@ -0,0 +1 @@
. "$PSScriptRoot\..\common\windows\mount-vcpkg-cache-drive.ps1"

View File

@@ -0,0 +1 @@
. "$PSScriptRoot\..\common\windows\mount-vcpkg-cache-drive.ps1"

View File

@@ -0,0 +1 @@
. "$PSScriptRoot\..\common\windows\mount-vcpkg-cache-drive.ps1"

View File

@@ -0,0 +1 @@
. "$PSScriptRoot\..\common\windows\mount-vcpkg-cache-drive.ps1"