From dc355831d79becee7c6ba3f9872e9f9ec8684b2b Mon Sep 17 00:00:00 2001 From: Dawa Ometto Date: Tue, 22 Oct 2024 10:24:42 +0200 Subject: [PATCH] Restore img_tag_suffix var --- ubuntu/src-ubuntu.pkr.hcl | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/ubuntu/src-ubuntu.pkr.hcl b/ubuntu/src-ubuntu.pkr.hcl index 3129491..6407cbe 100644 --- a/ubuntu/src-ubuntu.pkr.hcl +++ b/ubuntu/src-ubuntu.pkr.hcl @@ -8,6 +8,12 @@ variable "container_repo" { type = string } +# pack.sh will set this variable to "-pilot" for pilot versions of the images +variable "img_tag_suffix" { + default = "" + type = string +} + variable "ansible_host" { default = "packer-src" type = string @@ -222,12 +228,12 @@ build { post-processor "docker-tag" { only = ["docker.ubuntu"] - repository = "${var.container_repo}" + repository = "${var.container_repo}${var.img_tag_suffix}" } post-processor "shell-local" { only = ["podman.ubuntu"] - inline = ["podman tag ${build.ImageSha256} ${var.container_repo}", "podman system prune -f"] + inline = ["podman tag ${build.ImageSha256} ${var.container_repo}${var.img_tag_suffix}", "podman system prune -f"] } post-processor "shell-local" {