Attempt to properly match build w/ source #3
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Danny Bessems 2023-01-25 14:40:28 +01:00
parent 3f2f19b36a
commit a4db841a7a
2 changed files with 7 additions and 9 deletions

View File

@ -6,18 +6,20 @@ packer {
build {
source "vsphere-iso.ubuntu" {
name = "bootstrap"
vm_name = "${var.vm_name}-bootstrap"
vm_name = "ova.bootstrap-${var.vm_name}"
export {
images = false
output_directory = "/scratch/airgapped-k8s/bootstrap"
}
}
source "vsphere-iso.ubuntu" {
name = "upgrade"
vm_name = "${var.vm_name}-upgrade"
vm_name = "ova.upgrade-${var.vm_name}"
export {
images = false
output_directory = "/scratch/airgapped-k8s/upgrade"
}
}
@ -44,11 +46,11 @@ build {
inline = [
"pwsh -command \"& scripts/Update-OvfConfiguration.ps1 \\",
" -ApplianceType '${source.name}' \\",
" -OVFFile '/scratch/airgapped-k8s/${source.name}/${var.vm_name}-${source.name}.ovf' \"",
" -OVFFile '/scratch/airgapped-k8s/${source.name}/ova.${source.name}-${var.vm_name}.ovf' \"",
"pwsh -file scripts/Update-Manifest.ps1 \\",
" -ManifestFileName '/scratch/airgapped-k8s/${source.name}/${var.vm_name}-${source.name}.mf'",
" -ManifestFileName '/scratch/airgapped-k8s/${source.name}/ova.${source.name}-${var.vm_name}.mf'",
"ovftool --acceptAllEulas --allowExtraConfig --overwrite \\",
" '/scratch/airgapped-k8s/${source.name}/${var.vm_name}-${source.name}.ovf' \\",
" '/scratch/airgapped-k8s/${source.name}/ova.${source.name}-${var.vm_name}.ovf' \\",
" /output/airgapped-k8s.${source.name}.ova"
]
}

View File

@ -53,8 +53,4 @@ source "vsphere-iso" "ubuntu" {
shutdown_timeout = "5m"
remove_cdrom = true
export {
images = false
}
}