tests(packer): rewrite the way to build the tests images.
This commit is contained in:
parent
6d5a522dcb
commit
0b029ec42f
9 changed files with 98 additions and 254 deletions
|
|
@ -16,12 +16,6 @@ variable "password" {
|
|||
default = "user"
|
||||
}
|
||||
|
||||
variable "ssh_publickey" {
|
||||
description = "Path to the ssh public key"
|
||||
type = string
|
||||
default = "~/.ssh/id_ed25519.pub"
|
||||
}
|
||||
|
||||
variable "cpus" {
|
||||
description = "Default CPU of the VM"
|
||||
type = string
|
||||
|
|
@ -40,22 +34,28 @@ variable "disk_size" {
|
|||
default = "40G"
|
||||
}
|
||||
|
||||
variable "ssh_publickey" {
|
||||
description = "Path to the ssh public key"
|
||||
type = string
|
||||
default = "~/.ssh/id_ed25519.pub"
|
||||
}
|
||||
|
||||
variable "iso_dir" {
|
||||
description = "Original ISO file directory"
|
||||
type = string
|
||||
default = "/var/lib/libvirt/images"
|
||||
default = "~/.libvirt/iso"
|
||||
}
|
||||
|
||||
variable "base_dir" {
|
||||
description = "Final packer image output directory"
|
||||
type = string
|
||||
default = "/var/lib/libvirt/images"
|
||||
default = "~/.libvirt/base"
|
||||
}
|
||||
|
||||
variable "firmware" {
|
||||
description = "Path to the UEFI firmware"
|
||||
type = string
|
||||
default = "/usr/share/edk2/x64/OVMF_CODE.fd"
|
||||
default = "/usr/share/edk2/x64/OVMF.4m.fd"
|
||||
}
|
||||
|
||||
variable "output" {
|
||||
|
|
@ -70,38 +70,52 @@ variable "prefix" {
|
|||
default = "aa-"
|
||||
}
|
||||
|
||||
variable "dist" {
|
||||
description = "Distribution to target"
|
||||
type = string
|
||||
default = "ubuntu24"
|
||||
}
|
||||
|
||||
variable "flavor" {
|
||||
description = "Distribution flavor to use (server, desktop, gnome, kde...)"
|
||||
type = string
|
||||
default = ""
|
||||
}
|
||||
|
||||
variable "release" {
|
||||
description = "Distribution metadata to use"
|
||||
variable "DM" {
|
||||
description = "Distribution Metadata to use"
|
||||
type = map(object({
|
||||
codename = string
|
||||
version = string
|
||||
img_url = string
|
||||
img_checksum = string
|
||||
}))
|
||||
default = {
|
||||
"archlinux" : {
|
||||
img_url = "https://geo.mirror.pkgbuild.com/images/latest/Arch-Linux-x86_64-cloudimg.qcow2"
|
||||
img_checksum = "https://geo.mirror.pkgbuild.com/images/latest/Arch-Linux-x86_64-cloudimg.qcow2.SHA256"
|
||||
},
|
||||
"debian12" : {
|
||||
img_url = "https://cdimage.debian.org/images/cloud/bookworm/latest/debian-12-genericcloud-amd64.qcow2"
|
||||
img_checksum = "https://cdimage.debian.org/images/cloud/bookworm/latest/SHA512SUMS"
|
||||
}
|
||||
"debian13" : {
|
||||
img_url = "https://cdimage.debian.org/images/cloud/trixie/daily/latest/debian-13-genericcloud-amd64-daily.qcow2"
|
||||
img_checksum = "https://cdimage.debian.org/images/cloud/trixie/daily/latest/SHA512SUMS"
|
||||
}
|
||||
"ubuntu22" : {
|
||||
codename = "jammy",
|
||||
version = "22.04.2",
|
||||
img_url = "https://cloud-images.ubuntu.com/jammy/current/jammy-server-cloudimg-amd64.img"
|
||||
img_checksum = "https://cloud-images.ubuntu.com/jammy/current/SHA256SUMS"
|
||||
},
|
||||
"ubuntu24" : {
|
||||
codename = "noble",
|
||||
version = "24.04",
|
||||
img_url = "https://cloud-images.ubuntu.com/noble/current/noble-server-cloudimg-amd64.img"
|
||||
img_checksum = "https://cloud-images.ubuntu.com/noble/current/SHA256SUMS"
|
||||
},
|
||||
"ubuntu25" : {
|
||||
img_url = "https://cloud-images.ubuntu.com/plucky/current/plucky-server-cloudimg-amd64.img"
|
||||
img_checksum = "https://cloud-images.ubuntu.com/plucky/current/SHA256SUMS"
|
||||
},
|
||||
"debian" : {
|
||||
codename = "bookworm",
|
||||
version = "12",
|
||||
}
|
||||
"opensuse" : {
|
||||
codename = "tumbleweed",
|
||||
version = "",
|
||||
}
|
||||
"fedora" : {
|
||||
codename = "40",
|
||||
version = "1.14",
|
||||
img_url = "https://download.opensuse.org/tumbleweed/appliances/openSUSE-Tumbleweed-Minimal-VM.x86_64-Cloud.qcow2"
|
||||
img_checksum = "https://download.opensuse.org/tumbleweed/appliances/openSUSE-Tumbleweed-Minimal-VM.x86_64-Cloud.qcow2.sha256"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue