From 2109acacd5478605be2590b6e5528dc6f4977a00 Mon Sep 17 00:00:00 2001 From: Alexey-Ayupov <116575425+Alexey-Ayupov@users.noreply.github.com> Date: Sun, 5 Feb 2023 16:08:22 +0300 Subject: [PATCH] Update the code for anka v3 compatibility (#7044) --- images.CI/macos/anka/Anka.Helpers.psm1 | 2 +- images/macos/templates/macOS-12.anka.pkr.hcl | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/images.CI/macos/anka/Anka.Helpers.psm1 b/images.CI/macos/anka/Anka.Helpers.psm1 index 7e57f36bd..fff0c7045 100644 --- a/images.CI/macos/anka/Anka.Helpers.psm1 +++ b/images.CI/macos/anka/Anka.Helpers.psm1 @@ -16,7 +16,7 @@ function Push-AnkaTemplateToRegistry { # if registry uuid doesn't match than delete an image in registry $images = anka --machine-readable registry --registry-path $RegistryUrl list | ConvertFrom-Json | ForEach-Object body $images | Where-Object name -eq $TemplateName | ForEach-Object { - $id = $_.id + $id = $_.uuid Show-StringWithFormat "Deleting '$TemplateName[$id]' VM and '$TagName' tag" $uri = '{0}/registry/vm?id={1}' -f $RegistryUrl, $id Invoke-WebRequest -Uri $uri -Method Delete | Out-Null diff --git a/images/macos/templates/macOS-12.anka.pkr.hcl b/images/macos/templates/macOS-12.anka.pkr.hcl index fa2fb2878..b92bd0642 100644 --- a/images/macos/templates/macOS-12.anka.pkr.hcl +++ b/images/macos/templates/macOS-12.anka.pkr.hcl @@ -1,3 +1,12 @@ +packer { + required_plugins { + veertu-anka = { + version = "= v3.1.0" + source = "github.com/veertuinc/veertu-anka" + } + } +} + variable "source_vm_name" { type = string }