Skip to content

Commit

Permalink
Fix the cleanup script. (actions#856)
Browse files Browse the repository at this point in the history
* Fix the cleanup script.The result is not returned to the variable because of the output redirect

* Added the cancel timeout.
  • Loading branch information
simpleprovider authored and Mikhail Timofeev committed May 14, 2020
1 parent 66535aa commit d8e24ea
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion images.CI/azure-pipelines/image-generation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ jobs:
- job:
pool: ci-agent-pool
timeoutInMinutes: 600
cancelTimeoutInMinutes: 30
variables:
- group: Image Generation Variables

Expand Down Expand Up @@ -74,4 +75,4 @@ jobs:
-ClientSecret $(CLIENT_SECRET) `
-Image ${{ parameters.image_type }} `
-SubscriptionId $(AZURE_SUBSCRIPTION) `
-TenantId $(AZURE_TENANT)
-TenantId $(AZURE_TENANT)
2 changes: 1 addition & 1 deletion images.CI/cleanup.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit d8e24ea

Please sign in to comment.