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
|
Import-Module $PSScriptRoot\helpers.psm1 -DisableNameChecking
|
||||||
|
|
||||||
# Connection to a vCenter Server system
|
# Connection to a vCenter Server system
|
||||||
Connect-VCServer
|
Connect-VCServer -VIServer $VIServer -VIUserName $VIUserName -VIPassword $VIPassword
|
||||||
|
|
||||||
# Check vm clone status
|
# Check vm clone status
|
||||||
$chainId = (Get-VIEvent -Entity $VMName).ChainId
|
$chainId = (Get-VIEvent -Entity $VMName).ChainId
|
||||||
|
|||||||
@@ -6,6 +6,18 @@ Helper functions to use in images.CI scripts
|
|||||||
|
|
||||||
Function Connect-VCServer
|
Function Connect-VCServer
|
||||||
{
|
{
|
||||||
|
[CmdletBinding()]
|
||||||
|
param(
|
||||||
|
[Parameter(Mandatory)]
|
||||||
|
[System.String]$VIUserName,
|
||||||
|
|
||||||
|
[Parameter(Mandatory)]
|
||||||
|
[System.String]$VIPassword,
|
||||||
|
|
||||||
|
[Parameter(Mandatory)]
|
||||||
|
[System.String]$VIServer
|
||||||
|
)
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
# Preference
|
# Preference
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ param(
|
|||||||
Import-Module $PSScriptRoot\helpers.psm1 -DisableNameChecking
|
Import-Module $PSScriptRoot\helpers.psm1 -DisableNameChecking
|
||||||
|
|
||||||
# Connection to a vCenter Server system
|
# Connection to a vCenter Server system
|
||||||
Connect-VCServer
|
Connect-VCServer -VIServer $VIServer -VIUserName $VIUserName -VIPassword $VIPassword
|
||||||
|
|
||||||
# Clear previously assigned tag with VM Name
|
# Clear previously assigned tag with VM Name
|
||||||
try {
|
try {
|
||||||
|
|||||||
@@ -99,7 +99,7 @@ function Select-DataStore {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# Connection to a vCenter Server system
|
# Connection to a vCenter Server system
|
||||||
Connect-VCServer
|
Connect-VCServer -VIServer $VIServer -VIUserName $VIUserName -VIPassword $VIPassword
|
||||||
|
|
||||||
# Get a target datastore for current deployment
|
# Get a target datastore for current deployment
|
||||||
Select-DataStore -VMName $VMName -TagCategory $TagCategory
|
Select-DataStore -VMName $VMName -TagCategory $TagCategory
|
||||||
|
|||||||
Reference in New Issue
Block a user