Update CI actions according to demands (#7395)

This commit is contained in:
Alexey-Ayupov
2023-04-06 14:40:05 +02:00
committed by GitHub
parent 69d754cb77
commit 46f5d5470a
8 changed files with 11 additions and 7 deletions

View File

@@ -41,6 +41,8 @@ param(
[ValidateNotNullOrEmpty()]
[string]$VIPassword,
[string]$JobStatus,
[int32]$CpuCount,
[int32]$CoresPerSocketCount,
@@ -62,7 +64,7 @@ try {
}
$vm = Get-VM $VMName
if ($env:AGENT_JOBSTATUS -eq 'Failed') {
if (($env:AGENT_JOBSTATUS -and $env:AGENT_JOBSTATUS -eq 'Failed') -or ($JobStatus -and $JobStatus -eq 'failure')) {
try {
if($vm.PowerState -ne "PoweredOff") {
Stop-VM -VM $vm -Confirm:$false -ErrorAction Stop | Out-Null