Files
bun.sh/scripts/packer/variables.pkr.hcl
Dylan Conway 08b348935d Fix image naming: publish-image must match ci.mjs getImageName()
[publish images] and normal CI expect 'windows-x64-2019-v13' but
machine.mjs was publishing as 'windows-x64-2019-build-v13'.

Now image_name is passed directly to Packer, matching ci.mjs:
  - publish-image: windows-x64-2019-v13
  - create-image:  windows-x64-2019-build-37194

[build images]
2026-02-13 10:59:50 -08:00

75 lines
1.4 KiB
HCL

packer {
required_plugins {
azure = {
source = "github.com/hashicorp/azure"
version = "= 2.5.0"
}
}
}
// Shared variables for all Windows image builds
variable "client_id" {
type = string
default = env("AZURE_CLIENT_ID")
}
variable "client_secret" {
type = string
sensitive = true
default = env("AZURE_CLIENT_SECRET")
}
variable "subscription_id" {
type = string
default = env("AZURE_SUBSCRIPTION_ID")
}
variable "tenant_id" {
type = string
default = env("AZURE_TENANT_ID")
}
variable "resource_group" {
type = string
default = env("AZURE_RESOURCE_GROUP")
}
variable "location" {
type = string
default = "eastus2"
}
variable "gallery_name" {
type = string
default = "bunCIGallery2"
}
variable "build_number" {
type = string
default = "0"
}
variable "image_name" {
type = string
default = ""
description = "Gallery image definition name. If empty, derived from build_number."
}
variable "bootstrap_script" {
type = string
default = "scripts/bootstrap.ps1"
}
variable "agent_script" {
type = string
default = ""
description = "Path to bundled agent.mjs. If empty, agent install is skipped."
}
variable "gallery_resource_group" {
type = string
default = "BUN-CI"
description = "Resource group containing the Compute Gallery (may differ from build RG)"
}