build: ensure the justfile could fully replace the makefile.
This commit is contained in:
parent
fbb71fb47b
commit
8e2a7e8068
3 changed files with 163 additions and 29 deletions
|
|
@ -24,7 +24,7 @@ source "qemu" "default" {
|
|||
disk_compression = true
|
||||
disk_detect_zeroes = "unmap"
|
||||
disk_discard = "unmap"
|
||||
output_directory = pathexpand(var.output)
|
||||
output_directory = pathexpand(var.output_dir)
|
||||
vm_name = "${local.name}.qcow2"
|
||||
boot_wait = "10s"
|
||||
firmware = pathexpand(var.firmware)
|
||||
|
|
@ -85,7 +85,7 @@ build {
|
|||
|
||||
post-processor "shell-local" {
|
||||
inline = [
|
||||
"mv ${var.output}/${local.name}.qcow2 ${var.base_dir}/${local.name}.qcow2",
|
||||
"mv ${var.output_dir}/${local.name}.qcow2 ${var.base_dir}/${local.name}.qcow2",
|
||||
]
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -52,18 +52,18 @@ variable "base_dir" {
|
|||
default = "~/.libvirt/base"
|
||||
}
|
||||
|
||||
variable "output_dir" {
|
||||
description = "Output build directory"
|
||||
type = string
|
||||
default = "~/.libvirt/base/packer"
|
||||
}
|
||||
|
||||
variable "firmware" {
|
||||
description = "Path to the UEFI firmware"
|
||||
type = string
|
||||
default = "/usr/share/edk2/x64/OVMF.4m.fd"
|
||||
}
|
||||
|
||||
variable "output" {
|
||||
description = "Output build directory"
|
||||
type = string
|
||||
default = "/tmp/packer"
|
||||
}
|
||||
|
||||
variable "prefix" {
|
||||
description = "Image name prefix"
|
||||
type = string
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue