Remove Storage Account and VHD refs (#8581)

This commit is contained in:
Shamil Mubarakshin
2023-10-18 19:11:46 +02:00
committed by GitHub
parent e78225c349
commit e9fc71683f
4 changed files with 23 additions and 241 deletions

View File

@@ -74,9 +74,6 @@ jobs:
$ManagedImageName = "${{ parameters.image_type }}-$(Build.BuildId)"
Write-Host "##vso[task.setvariable variable=ManagedImageName;]$ManagedImageName"
$VhdName = "$ManagedImageName.vhd"
Write-Host "##vso[task.setvariable variable=VhdName;]$VhdName"
$TempResourceGroupName = "packer-temp-$ManagedImageName"
Write-Host "##vso[task.setvariable variable=TempResourceGroupName;]$TempResourceGroupName"
@@ -146,26 +143,6 @@ jobs:
-PrefixToPathTrim "$(TemplateDirectoryPath)" `
-PrintTopNLongest 25
- task: PowerShell@2
displayName: 'Convert managed image to VHD'
inputs:
targetType: filePath
filePath: ./images.CI/linux-and-win/convert-to-vhd.ps1
arguments: -SubscriptionId $(AZURE_SUBSCRIPTION) `
-Location $(AZURE_LOCATION) `
-ResourceGroupName $(AZURE_RESOURCE_GROUP) `
-ManagedImageName "$(ManagedImageName)" `
-GalleryName "github_imagegeneration_convert_to_vhd" `
-GalleryImageSku "${{ parameters.image_type }}" `
-GalleryImageVersion "0.0.$(Build.BuildId)" `
-StorageAccountName $(AZURE_STORAGE_ACCOUNT) `
-StorageAccountContainerName "images" `
-VhdName "$(VhdName)" `
-ClientId $(CLIENT_ID) `
-ClientSecret $(CLIENT_SECRET) `
-TenantId $(AZURE_TENANT) `
-RemoveManagedImage
- ${{ if eq(parameters.create_release, true) }}:
- task: PowerShell@2
displayName: 'Create release for VM deployment'
@@ -176,9 +153,8 @@ jobs:
-Organization $(RELEASE_TARGET_ORGANIZATION) `
-DefinitionId $(RELEASE_TARGET_DEFINITION_ID) `
-Project $(RELEASE_TARGET_PROJECT) `
-ImageName "${{ parameters.image_type }}" `
-StorageAccountContainerName "images" `
-VhdName "$(VhdName)" `
-ImageType "${{ parameters.image_type }}" `
-ManagedImageName "$(ManagedImageName)" `
-AccessToken $(RELEASE_TARGET_TOKEN)
- task: PowerShell@2
@@ -188,7 +164,6 @@ jobs:
targetType: filePath
filePath: ./images.CI/linux-and-win/cleanup.ps1
arguments: -TempResourceGroupName "$(TempResourceGroupName)" `
-StorageAccount $(AZURE_STORAGE_ACCOUNT) `
-SubscriptionId $(AZURE_SUBSCRIPTION) `
-ClientId $(CLIENT_ID) `
-ClientSecret $(CLIENT_SECRET) `