mirror of
https://github.com/actions/runner-images.git
synced 2025-12-14 22:05: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:
|
||||
pool: ci-agent-pool
|
||||
timeoutInMinutes: 600
|
||||
cancelTimeoutInMinutes: 30
|
||||
variables:
|
||||
- group: Image Generation Variables
|
||||
|
||||
@@ -74,4 +75,4 @@ jobs:
|
||||
-ClientSecret $(CLIENT_SECRET) `
|
||||
-Image ${{ parameters.image_type }} `
|
||||
-SubscriptionId $(AZURE_SUBSCRIPTION) `
|
||||
-TenantId $(AZURE_TENANT)
|
||||
-TenantId $(AZURE_TENANT)
|
||||
|
||||
@@ -11,7 +11,7 @@ az login --service-principal --username $ClientId --password $ClientSecret --ten
|
||||
|
||||
$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") {
|
||||
Write-Host "Found a match, deleting temporary files"
|
||||
az group delete --name $TempResourceGroupName --subscription $SubscriptionId --yes | Out-Null
|
||||
|
||||
Reference in New Issue
Block a user