packer-images/library/variables.pkr.hcl
Ben Vincent 2d1ee5e2c6 feat: update Makefile
- build containers on master if greater than 24 hours, or the commit hash changes
2025-01-12 16:24:43 +11:00

124 lines
3.2 KiB
HCL

variable "use_docker" {
type = bool
default = true
}
variable "use_incus" {
type = bool
default = false
}
variable "os_name" {
description = "The name of the operating system."
type = string
default = env("OS_NAME")
}
variable "os_version_full" {
description = "The operating system full version number."
type = string
default = env("OS_VERSION_FULL")
}
variable "os_image" {
description = "The type of image to be built."
type = string
default = env("OS_IMAGE")
}
variable "os_version_major" {
description = "The operating system major version number."
type = string
default = env("OS_VERSION_MAJOR")
}
variable "date" {
description = "The current date in yyymmdd format."
type = string
default = env("DATE")
}
variable "packages" {
description = "List of packages to install."
type = list(string)
default = ["git"]
}
variable "scripts_pre_file_copy" {
description = "Scripts to run before the file copy process."
type = list(string)
default = ["true"]
}
variable "scripts_post_file_copy" {
description = "Scripts to run after the file copy process."
type = list(string)
default = ["true"]
}
variable "scripts_pre_packages" {
description = "Scripts to run before the package install process."
type = list(string)
default = ["true"]
}
variable "scripts_post_packages" {
description = "Scripts to run after the package install process."
type = list(string)
default = ["true"]
}
variable "scripts_final" {
description = "Scripts to run at the end of the build process."
type = list(string)
default = ["true"]
}
variable "deploy_files_from_image" {
description = "Whether to deploy files from images directory."
type = bool
default = false
}
variable "deploy_files_from_common" {
description = "Whether to deploy files from the common os name/image path."
type = bool
default = false
}
variable "docker_username" {
description = "The username to use when logging into docker registry."
type = string
default = env("DOCKER_USERNAME")
}
variable "docker_password" {
description = "The password to use when logging into docker registry."
type = string
default = env("DOCKER_PASSWORD")
}
variable "docker_server" {
description = "The docker registry to login to."
type = string
default = env("DOCKER_SERVER")
}
variable "docker_changes" {
description = "A list of metadata changes, e.g. CMD, WORKDIR, ENV, etc."
type = list(string)
default = []
}
variable "docker_source" {
description = "The docker_source image for the build."
type = string
default = env("DOCKER_SOURCE")
}
variable "incus_source" {
description = "The incus_source image for the build."
type = string
default = env("INCUS_SOURCE")
}
variable "incus_output_image" {
description = "The output image name for incus images for the build."
type = string
default = env("INCUS_OUTPUT_IMAGE")
}
variable "suffix" {
description = "The output image suffix. This should be unique per-run."
type = string
default = env("SUFFIX")
}
variable "git_commit" {
description = "The current git commit."
type = string
default = env("GIT_COMMIT")
}
variable "git_branch" {
description = "The current git branch."
type = string
default = env("GIT_BRANCH")
}