mirror of
https://github.com/actions/runner-images.git
synced 2025-12-20 06:35:47 +00:00
set parameters explicitly (#2221)
This commit is contained in:
@@ -39,7 +39,7 @@ param(
|
||||
Import-Module $PSScriptRoot\helpers.psm1 -DisableNameChecking
|
||||
|
||||
# Connection to a vCenter Server system
|
||||
Connect-VCServer
|
||||
Connect-VCServer -VIServer $VIServer -VIUserName $VIUserName -VIPassword $VIPassword
|
||||
|
||||
# Check vm clone status
|
||||
$chainId = (Get-VIEvent -Entity $VMName).ChainId
|
||||
|
||||
@@ -6,6 +6,18 @@ Helper functions to use in images.CI scripts
|
||||
|
||||
Function Connect-VCServer
|
||||
{
|
||||
[CmdletBinding()]
|
||||
param(
|
||||
[Parameter(Mandatory)]
|
||||
[System.String]$VIUserName,
|
||||
|
||||
[Parameter(Mandatory)]
|
||||
[System.String]$VIPassword,
|
||||
|
||||
[Parameter(Mandatory)]
|
||||
[System.String]$VIServer
|
||||
)
|
||||
|
||||
try
|
||||
{
|
||||
# Preference
|
||||
|
||||
@@ -46,7 +46,7 @@ param(
|
||||
Import-Module $PSScriptRoot\helpers.psm1 -DisableNameChecking
|
||||
|
||||
# Connection to a vCenter Server system
|
||||
Connect-VCServer
|
||||
Connect-VCServer -VIServer $VIServer -VIUserName $VIUserName -VIPassword $VIPassword
|
||||
|
||||
# Clear previously assigned tag with VM Name
|
||||
try {
|
||||
|
||||
@@ -99,7 +99,7 @@ function Select-DataStore {
|
||||
}
|
||||
|
||||
# Connection to a vCenter Server system
|
||||
Connect-VCServer
|
||||
Connect-VCServer -VIServer $VIServer -VIUserName $VIUserName -VIPassword $VIPassword
|
||||
|
||||
# Get a target datastore for current deployment
|
||||
Select-DataStore -VMName $VMName -TagCategory $TagCategory
|
||||
|
||||
Reference in New Issue
Block a user