From 990889bcf0571d8e7023b256da3d87d0017a9810 Mon Sep 17 00:00:00 2001 From: Mikhail Timofeev <48208649+miketimofeev@users.noreply.github.com> Date: Sat, 20 Feb 2021 15:40:18 +0300 Subject: [PATCH] [macOS] Improve select-datastore script (#2771) * select last one * Fix comment --- images.CI/macos/select-datastore.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/images.CI/macos/select-datastore.ps1 b/images.CI/macos/select-datastore.ps1 index 4714bb6d3..cb04945e2 100644 --- a/images.CI/macos/select-datastore.ps1 +++ b/images.CI/macos/select-datastore.ps1 @@ -78,8 +78,8 @@ function Select-DataStore { # Wait for 60 seconds to check if any other tags are assigned to the same datastore Start-Sleep -Seconds 60 - # Take only first 2 tags, all the others will go to the next round - $tagAssignments = (Get-TagAssignment -Entity $buildDatastore).Tag.Name | Select-Object -First 2 + # Take the last tag (Last in, first out), all the others will go to the next round + $tagAssignments = (Get-TagAssignment -Entity $buildDatastore).Tag.Name | Select-Object -Last 1 $isAllow = $tagAssignments -contains $VMName if ($isAllow)