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
+14 -14
View File
@@ -1,23 +1,23 @@
distro = "ubuntu"
distro = "ubuntu"
version = "18.04"
iso = {
url = "http://cdimage.ubuntu.com/ubuntu/releases/18.04/release/ubuntu-18.04.6-server-amd64.iso"
checksum = "f5cbb8104348f0097a8e513b10173a07dbc6684595e331cb06f93f385d0aecf6"
url = "http://cdimage.ubuntu.com/ubuntu/releases/18.04/release/ubuntu-18.04.6-server-amd64.iso"
checksum = "f5cbb8104348f0097a8e513b10173a07dbc6684595e331cb06f93f385d0aecf6"
}
boot_command = [
"<esc><wait1>",
"<f6><esc><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>",
"auto=true priority=critical ",
"locale=en_US.UTF-8 ",
"DEBIAN_FRONTEND=text ",
"preseed/url=http://{{.HTTPIP}}:{{.HTTPPort}}/preseed.cfg ",
"fsck.mode=skip ",
"console=tty0 ",
"--- net.ifnames=0 biosdevnames=0 ",
"<enter><wait1>"
"<esc><wait1>",
"<f6><esc><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>",
"auto=true priority=critical ",
"locale=en_US.UTF-8 ",
"DEBIAN_FRONTEND=text ",
"preseed/url=http://{{.HTTPIP}}:{{.HTTPPort}}/preseed.cfg ",
"fsck.mode=skip ",
"console=tty0 ",
"--- net.ifnames=0 biosdevnames=0 ",
"<enter><wait1>"
]
http_files = {
"/preseed.cfg" = <<HEREDOC
"/preseed.cfg" = <<HEREDOC
d-i debian-installer/locale string C.UTF-8
d-i keyboard-configuration/xkb-keymap select us
+1 -1
View File
@@ -9,7 +9,7 @@ apt upgrade -y
# Do some magic with init
sed -i -E -e 's,^(ACTIVE_CONSOLES="/dev/tty).*",\11,' /etc/default/console-setup
echo << EOF > /etc/ssh/sshd_config.d/00-vagrant_accept_pubkey.conf
cat << EOF > /etc/ssh/sshd_config.d/00-vagrant_accept_pubkey.conf
UseDNS no
PubkeyAcceptedKeyTypes +ssh-rsa
EOF
+11 -11
View File
@@ -1,19 +1,19 @@
distro = "ubuntu"
distro = "ubuntu"
version = "20.04"
iso = {
url = "https://releases.ubuntu.com/20.04/ubuntu-20.04.6-live-server-amd64.iso"
checksum = "b8f31413336b9393ad5d8ef0282717b2ab19f007df2e9ed5196c13d8f9153c8b"
url = "https://releases.ubuntu.com/20.04/ubuntu-20.04.6-live-server-amd64.iso"
checksum = "b8f31413336b9393ad5d8ef0282717b2ab19f007df2e9ed5196c13d8f9153c8b"
}
boot_wait = "3s"
boot_command = [
"<enter><enter><wait1><f6><esc><wait><bs><bs><bs><bs>",
"console=tty0 ",
"fsck.mode=skip ",
"locale=en_US ",
"auto=true ",
"priority=critical ",
"autoinstall ds=nocloud<enter><wait>"
"<enter><enter><wait1><f6><esc><wait><bs><bs><bs><bs>",
"console=tty0 ",
"fsck.mode=skip ",
"locale=en_US ",
"auto=true ",
"priority=critical ",
"autoinstall ds=nocloud<enter><wait>"
]
cd_files = [
"distros/ubuntu/20.04/disc/*"
"distros/ubuntu/20.04/disc/*"
]
+1 -1
View File
@@ -10,7 +10,7 @@ apt upgrade -y
sed -i -E -e 's,^(ACTIVE_CONSOLES="/dev/tty).*",\11,' /etc/default/console-setup
# Make sshd faster
echo << EOF > /etc/ssh/sshd_config.d/00-vagrant_accept_pubkey.conf
cat << EOF > /etc/ssh/sshd_config.d/00-vagrant_accept_pubkey.conf
UseDNS no
PubkeyAcceptedKeyTypes +ssh-rsa
EOF
+12 -12
View File
@@ -1,19 +1,19 @@
distro = "ubuntu"
distro = "ubuntu"
version = "22.04"
iso = {
url = "https://releases.ubuntu.com/22.04/ubuntu-22.04.3-live-server-amd64.iso"
checksum = "a4acfda10b18da50e2ec50ccaf860d7f20b389df8765611142305c0e911d16fd"
url = "https://releases.ubuntu.com/22.04/ubuntu-22.04.3-live-server-amd64.iso"
checksum = "a4acfda10b18da50e2ec50ccaf860d7f20b389df8765611142305c0e911d16fd"
}
boot_command = [
"e<down><down><down><end><bs><bs><bs>",
"console=tty0 ",
"fsck.mode=skip ",
"locale=en_US ",
"auto=true ",
"priority=critical ",
"autoinstall",
"<F10>",
"e<down><down><down><end><bs><bs><bs>",
"console=tty0 <wait>",
"fsck.mode=skip <wait>",
"locale=en_US <wait>",
"auto=true <wait>",
"priority=<wait>critical <wait>",
"autoinstall<wait>",
"<F10>",
]
cd_files = [
"distros/ubuntu/22.04/disc/*"
"distros/ubuntu/22.04/disc/*"
]
+1 -1
View File
@@ -10,7 +10,7 @@ apt upgrade -y
sed -i -E -e 's,^(ACTIVE_CONSOLES="/dev/tty).*",\11,' /etc/default/console-setup
# Make sshd faster
echo << EOF > /etc/ssh/sshd_config.d/00-vagrant_accept_pubkey.conf
cat << EOF > /etc/ssh/sshd_config.d/00-vagrant_accept_pubkey.conf
UseDNS no
PubkeyAcceptedKeyTypes +ssh-rsa
EOF
+12 -12
View File
@@ -1,19 +1,19 @@
distro = "ubuntu"
distro = "ubuntu"
version = "23.10"
iso = {
url = "http://releases.ubuntu.com/23.10/ubuntu-23.10-live-server-amd64.iso"
checksum = "d2fb80d9ce77511ed500bcc1f813e6f676d4a3577009dfebce24269ca23346a5"
url = "http://releases.ubuntu.com/23.10/ubuntu-23.10-live-server-amd64.iso"
checksum = "d2fb80d9ce77511ed500bcc1f813e6f676d4a3577009dfebce24269ca23346a5"
}
boot_command = [
"e<down><down><down><end><bs><bs><bs>",
"console=tty0 ",
"fsck.mode=skip ",
"locale=en_US ",
"auto=true ",
"priority=critical ",
"autoinstall",
"<F10>",
"e<down><down><down><end><bs><bs><bs>",
"console=tty0 <wait>",
"fsck.mode=skip <wait>",
"locale=en_US <wait>",
"auto=true <wait>",
"priority=critical <wait>",
"autoinstall<wait>",
"<F10>",
]
cd_files = [
"distros/ubuntu/23.10/disc/*"
"distros/ubuntu/23.10/disc/*"
]
+1 -1
View File
@@ -10,7 +10,7 @@ apt upgrade -y
sed -i -E -e 's,^(ACTIVE_CONSOLES="/dev/tty).*",\11,' /etc/default/console-setup
# Make sshd faster
echo << EOF > /etc/ssh/sshd_config.d/00-vagrant_accept_pubkey.conf
cat << EOF > /etc/ssh/sshd_config.d/00-vagrant_accept_pubkey.conf
UseDNS no
PubkeyAcceptedKeyTypes +ssh-rsa
EOF