mirror of
https://github.com/actions/runner-images.git
synced 2025-12-18 07:46:57 +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
|
||||||
|
|
||||||
@@ -74,4 +75,4 @@ jobs:
|
|||||||
-ClientSecret $(CLIENT_SECRET) `
|
-ClientSecret $(CLIENT_SECRET) `
|
||||||
-Image ${{ parameters.image_type }} `
|
-Image ${{ parameters.image_type }} `
|
||||||
-SubscriptionId $(AZURE_SUBSCRIPTION) `
|
-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}"
|
$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