DevOps Task - Not flagging destination image as LATEST to Azure Compute Gallery
cyclelabs-ryanberger opened this issue · 0 comments
Hi all,
I am struggling to get this issue resolved. I've put an issue in to Azure support, and done a ton of reading through the documentation, Git issues, and I am at a wall with this issue. I do believe this to potentially be a bug or maybe a configuration issue on my end.
I am using the AIB DevOps task to pull a source image from our Azure Compute Gallery (lets say, version 1.0.0), run some customizers (installs the new build of the software my company develops) and then pushes that new image back to our Azure Compute Gallery (as say, version 1.0.1). My expectation would be after the AIB task runs successfully, our LATEST version of our Image Definition would be updated with 1.0.1, from 1.0.0. But this is not happening.
Our Scale Set that is hooked into the Azure Compute Gallery to run Azure DevOps Pipelines continues to pull the previous version until I manually swap it around in the Scale Set -> Operating System dialog box from the Azure Portal. Even if I run Az CLI commands against the scale set, it shows the old version of the image UNTIL I manually change the version around in the dialog box below.
Please note, the upgrade policy on the ScaleSet is also set to automatic. This does not seem to make a difference. The ScaleSet is integrated with Azure DevOps as an agent pool and I know they tell you set the upgrade policy to manual, but I do not believe this be the issue.
The AIB task is not flagging the destination image as latest, and to me this feels like that should not be the case.
Can anyone point me in the right direction with this? I am stuck and this is a blocker for the solution I've been working on that incorporates the AIB, Azure Compute Gallery, and some Azure DevOps pipelines.
Here is my Azure DevOps task and subsequent info. Redacted sensitive data.
steps:
- task: AzureImageBuilder.devOps-task-for-azure-image-builder.custom-build-release-task.AzureImageBuilderTask@1
displayName: 'Azure VM Image Builder Task'
inputs:
managedIdentity: 'REDACTED'
imageSource: sig
ImageVersionId: ''REDACTED'
provisioner: powershell
windowsUpdateProvisioner: true
runElevated: true
runAsSystem: true
packagePath: '$(System.DefaultWorkingDirectory)/_Cycle 2 Build Pipeline/MyBuildOutputs'
inlineScript: '& ‘c:\buildartifacts\uninstall-then-install-cycle.ps1’'
storageAccountName: cycaplimages
distributeType: sig
galleryImageId: 'REDACTED'
replicationRegions: 'eastus, eastus2'
ibSubscription: 'REDACTED'
ibAzureResourceGroup: 'REDACTED'
ibLocation: eastus2
vmSize: 'Standard_B4ms'