Do some better linting (#13)

* Do some better linting

* Update names, Packer version, and more

* Do not lint on push

* More linting and scripting

* Cleanup shellcheck lint

* Add Packer format check

* Fix Packer formatting

* Limit to only one

* Remove generated HCL files

* Only lint checked files

* Use pipes instead

* Improve attempt to build

Actually go back to attempting to build boxes on GitHub. Maybe it will
work better with this structure

* Change to using environment files

* Initialize plugins, first

* More verbose usage of the file

* Do the output properly this time

* PACKER_LOG set to 1

* No need for python3 anymore

* Limit to only one result

* Choose a specific CPU model

* Init separately

* Update actions version

* Add version outputting

* Correct actions version

* Try to execute qemu properly

* Fix CPU model name

* Do not over-subscribe GitHub runners

* Try type instead of command to guard runs

* Do not write to non-existent folder

* Cache packer plugins

* Use ~ instead of /home/greg

* Try the proper path

* Move to intelligent matrix

* Set global env path

* Add lots of waits for VBoxManage on hosted runners

* Add more waits

* Add more waits
This commit is contained in:
Greg Hellings
2023-12-06 10:21:32 -06:00
committed by GitHub
parent 86dfe113a0
commit 634aae8d75
55 changed files with 536 additions and 495 deletions
+63 -48
View File
@@ -1,96 +1,111 @@
variable "iso" {
type = map(string)
description = "A map containing the URL and checksum for the ISO file"
type = map(string)
description = "A map containing the URL and checksum for the ISO file"
}
variable "distro" {
type = string
default = "unknown"
type = string
default = "unknown"
}
variable "arch" {
type = string
default = "amd64"
type = string
default = "amd64"
}
variable "version" {
type = string
description = "The distro version being specified"
type = string
description = "The distro version being specified"
}
variable "boot_wait" {
type = string
default = "15s"
description = "Length of time to wait before entering boot commands"
type = string
default = "15s"
description = "Length of time to wait before entering boot commands"
}
variable "boot_command" {
type = list(string)
default = []
type = list(string)
default = []
}
variable "shutdown_command" {
type = string
default = "sudo systemctl poweroff"
type = string
default = "sudo systemctl poweroff"
}
variable "headless" {
type = bool
default = true
type = bool
default = true
}
variable "vagrant_cloud_token" {
type = string
default = env("VAGRANT_CLOUD_TOKEN")
type = string
default = env("VAGRANT_CLOUD_TOKEN")
}
variable "build" {
type = string
default = "0.1"
type = string
default = "0.1"
}
variable "cd_content" {
type = map(string)
default = {}
type = map(string)
default = {}
}
variable "cd_files" {
type = list(string)
default = []
type = list(string)
default = []
}
variable "cd_label" {
type = string
default = "cidata"
type = string
default = "cidata"
}
variable "http_files" {
type = map(string)
default = {}
type = map(string)
default = {}
}
variable "http_directory" {
type = string
default = ""
type = string
default = ""
}
variable "cpu_model" {
type = string
default = "host"
}
variable "cpus" {
type = number
default = 4
}
variable "memory" {
type = number
default = 8192
}
locals {
name = "${var.distro}-${var.version}"
description = templatefile("../README.box.md", {
distro = var.distro
arch = var.arch
version = var.version
build = var.build
})
name = "${var.distro}-${var.version}"
description = templatefile("../README.box.md", {
distro = var.distro
arch = var.arch
version = var.version
build = var.build
})
cpus = 4
memory = 8192
disk_size = 10
ssh = {
username = "vagrant"
password = "vagrant"
handshake_attempts = 1000
timeout = "5h45m"
private_key_file = "vagrant/insecure_key"
}
cpus = var.cpus
memory = var.memory
disk_size = 10
ssh = {
username = "vagrant"
password = "vagrant"
handshake_attempts = 1000
timeout = "5h45m"
private_key_file = "vagrant/insecure_key"
}
}