mirror of
https://github.com/actions/runner-images.git
synced 2025-12-18 15:57:17 +00:00
Fix the cleanup script. (#856)
* Fix the cleanup script.The result is not returned to the variable because of the output redirect * Added the cancel timeout.
This commit is contained in:
@@ -8,6 +8,7 @@ jobs:
|
|||||||
- job:
|
- job:
|
||||||
pool: ci-agent-pool
|
pool: ci-agent-pool
|
||||||
timeoutInMinutes: 600
|
timeoutInMinutes: 600
|
||||||
|
cancelTimeoutInMinutes: 30
|
||||||
variables:
|
variables:
|
||||||
- group: Image Generation Variables
|
- group: Image Generation Variables
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ az login --service-principal --username $ClientId --password $ClientSecret --ten
|
|||||||
|
|
||||||
$TempResourceGroupName = "${ResourcesNamePrefix}_${Image}"
|
$TempResourceGroupName = "${ResourcesNamePrefix}_${Image}"
|
||||||
|
|
||||||
$groupExist = az group exists --name $TempResourceGroupName --subscription $SubscriptionId | Out-Null
|
$groupExist = az group exists --name $TempResourceGroupName --subscription $SubscriptionId
|
||||||
if ($groupExist -eq "true") {
|
if ($groupExist -eq "true") {
|
||||||
Write-Host "Found a match, deleting temporary files"
|
Write-Host "Found a match, deleting temporary files"
|
||||||
az group delete --name $TempResourceGroupName --subscription $SubscriptionId --yes | Out-Null
|
az group delete --name $TempResourceGroupName --subscription $SubscriptionId --yes | Out-Null
|
||||||
|
|||||||
Reference in New Issue
Block a user