Hi,
I'm working on a Packer build using the azure-arm builder and publishing
the image to a shared image gallery. But every time I have to overwrite the
existing version.See Bold text.
I want to variabalize the version so i don't use the same version every
time (like 1.0.0) or overwrite it. Is this possible in any way?
I have tried to get the Azure DevOps 'BuildId' variable as a env variable
into this parameter, but no luck so far. It seems difficult to pick up some
of these default Azure Devops variables.
"variables": {
<snip>
"sig_resource_group": "{{env `SIG_RG`}}",
"sig_gallery_name": "{{env `SIG_GALLERYNAME`}}",
"build_resource_group": "{{env `BUILD_RG`}}",
"repl_regions": "{{env `REPL_REGIONS`}}",
"os_distro": "{{env `OS_DISTRO`}}",
"os_version": "{{env `OS_VERSION`}}",
"managed_image": "{{env `MANAGED_IMAGE`}}",
"image_publisher": "{{env `IMAGE_PUBLISHER`}}",
"image_offer": "{{env `IMAGE_OFFER`}}",
"image_sku": "{{env `IMAGE_SKU`}}",
<snip>
"versionnumber": "{{env `Build.BuildNumber`}}"
},
"shared_image_gallery_destination": {
"resource_group": "{{user `sig_resource_group`}}",
"gallery_name": "{{user `sig_gallery_name`}}",
"image_name": "{{user `managed_image`}}",
*"image_version": "1.0.0", (replacing this with {{user
`versionnumber`}} did not yield results...*
"replication_regions": ["{{user `repl_regions`}}"]
},
"managed_image_resource_group_name": "{{user `sig_resource_group`}}",
"managed_image_name": "{{user `managed_image`}}",
Would love to know how anyone else is using it or have optimized this
process.
Thanks in advance
--
This mailing list is governed under the HashiCorp Community Guidelines -
https://www.hashicorp.com/community-guidelines.html. Behavior in violation of
those guidelines may result in your removal from this mailing list.
GitHub Issues: https://github.com/mitchellh/packer/issues
IRC: #packer-tool on Freenode
---
You received this message because you are subscribed to the Google Groups
"Packer" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/packer-tool/23b835ca-2726-4256-b3c7-84634bf75bb5%40googlegroups.com.