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
+10 -10
View File
@@ -1,16 +1,16 @@
distro = "debian"
distro = "debian"
version = "10"
iso = {
url = "https://cdimage.debian.org/cdimage/archive/10.13.0/amd64/iso-cd/debian-10.13.0-amd64-netinst.iso"
checksum = "75aa64071060402a594dcf1e14afd669ca0f8bf757b56d4c9c1a31b8f7c8f931"
url = "https://cdimage.debian.org/cdimage/archive/10.13.0/amd64/iso-cd/debian-10.13.0-amd64-netinst.iso"
checksum = "75aa64071060402a594dcf1e14afd669ca0f8bf757b56d4c9c1a31b8f7c8f931"
}
boot_command = [
"<esc><wait>",
"auto ",
"DEBIAN_FRONTEND=text ",
"preseed/url=http://{{.HTTPIP}}:{{ .HTTPPort }}/preseed.cfg ",
"console=tty0 ",
"--- net.ifnames=0 biosdevnames=0 ",
"<enter>"
"<esc><wait>",
"auto <wait>",
"DEBIAN_FRONTEND=text <wait>",
"preseed/url<wait>=http://{{.HTTPIP}}<wait>:{{ .HTTPPort }}/preseed.cfg <wait>",
"console=tty0 <wait>",
"--- <wait>net.ifnames=0 <wait>biosdevnames=0 <wait>",
"<enter>"
]
http_directory = "distros/debian/10/http/"
+3 -3
View File
@@ -1,10 +1,10 @@
#!/usr/bin/env bash
set -ex
packages="bzip2 dkms build-essential linux-headers-$(uname -r)"
apt install -y ${packages} # Intentionally not quoted
packages=(bzip2 dkms build-essential "linux-headers-$(uname -r)")
apt install -y "${packages[@]}"
mount -t auto /home/vagrant/VBoxGuestAdditions.iso /mnt
/mnt/VBoxLinuxAdditions.run install 2>&1 | tee /root/vbox_addon_install.log
apt remove -y ${packages} # Also intentionally not quoted
apt remove -y "${packages[@]}"
umount /mnt
rm /home/vagrant/VBoxGuestAdditions.iso
+10 -10
View File
@@ -1,16 +1,16 @@
distro = "debian"
distro = "debian"
version = "11"
iso = {
url = "http://cdimage.debian.org/cdimage/archive/11.8.0/amd64/iso-cd/debian-11.8.0-amd64-netinst.iso"
checksum = "d7a74813a734083df30c8d35784926deaa36bc41e5c0766388e9f591ab056b72"
url = "http://cdimage.debian.org/cdimage/archive/11.8.0/amd64/iso-cd/debian-11.8.0-amd64-netinst.iso"
checksum = "d7a74813a734083df30c8d35784926deaa36bc41e5c0766388e9f591ab056b72"
}
boot_command = [
"<esc><wait>",
"auto ",
"DEBIAN_FRONTEND=text ",
"preseed/url=http://{{.HTTPIP}}:{{ .HTTPPort }}/preseed.cfg ",
"console=tty0 ",
"--- net.ifnames=0 biosdevnames=0 ",
"<enter>"
"<esc><wait>",
"auto <wait>",
"DEBIAN_FRONTEND=text <wait>",
"preseed/url<wait>=http://{{.HTTPIP}}<wait>:{{ .HTTPPort }}/preseed.cfg <wait>",
"console=tty0 <wait>",
"--- <wait>net.ifnames=0 <wait>biosdevnames=0 <wait>",
"<enter>"
]
http_directory = "distros/debian/11/http/"
+1 -1
View File
@@ -6,7 +6,7 @@ apt autoremove -y
apt upgrade -y
# Configure sshd to be 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
+3 -3
View File
@@ -1,10 +1,10 @@
#!/usr/bin/env bash
set -ex
packages="bzip2 dkms build-essential linux-headers-$(uname -r)"
apt install -y ${packages} # Intentionally not quoted
packages=(bzip2 dkms build-essential "linux-headers-$(uname -r)")
apt install -y "${packages[@]}"
mount -t auto /home/vagrant/VBoxGuestAdditions.iso /mnt
/mnt/VBoxLinuxAdditions.run install 2>&1 | tee /root/vbox_addon_install.log
apt remove -y ${packages} # Also intentionally not quoted
apt remove -y "${packages[@]}"
umount /mnt
rm /home/vagrant/VBoxGuestAdditions.iso
+10 -10
View File
@@ -1,16 +1,16 @@
distro = "debian"
distro = "debian"
version = "12"
iso = {
url = "http://cdimage.debian.org/cdimage/release/12.2.0/amd64/iso-cd/debian-12.2.0-amd64-netinst.iso"
checksum = "23ab444503069d9ef681e3028016250289a33cc7bab079259b73100daee0af66"
url = "http://cdimage.debian.org/cdimage/release/12.2.0/amd64/iso-cd/debian-12.2.0-amd64-netinst.iso"
checksum = "23ab444503069d9ef681e3028016250289a33cc7bab079259b73100daee0af66"
}
boot_command = [
"<esc><wait>",
"auto ",
"DEBIAN_FRONTEND=text ",
"preseed/url=http://{{.HTTPIP}}:{{ .HTTPPort }}/preseed.cfg ",
"console=tty0 ",
"--- net.ifnames=0 biosdevnames=0 ",
"<enter>"
"<esc><wait>",
"auto <wait>",
"DEBIAN_FRONTEND=text <wait>",
"preseed/url<wait>=http://{{.HTTPIP}}<wait>:{{ .HTTPPort }}/preseed.cfg <wait>",
"console=tty0 <wait>",
"--- <wait>net.ifnames=0 <wait>biosdevnames=0 ",
"<enter>"
]
http_directory = "distros/debian/12/http/"
+1 -1
View File
@@ -6,7 +6,7 @@ apt autoremove -y
apt upgrade -y
# Configure sshd to be 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
+3 -3
View File
@@ -1,10 +1,10 @@
#!/usr/bin/env bash
set -ex
packages="bzip2 dkms build-essential linux-headers-$(uname -r)"
apt install -y ${packages} # Intentionally not quoted
packages=(bzip2 dkms build-essential "linux-headers-$(uname -r)")
apt install -y "${packages[@]}"
mount -t auto /home/vagrant/VBoxGuestAdditions.iso /mnt
/mnt/VBoxLinuxAdditions.run install 2>&1 | tee /root/vbox_addon_install.log
apt remove -y ${packages} # Also intentionally not quoted
apt remove -y "${packages[@]}"
umount /mnt
rm /home/vagrant/VBoxGuestAdditions.iso
+12 -12
View File
@@ -1,18 +1,18 @@
distro = "debian"
distro = "debian"
version = "9"
iso = {
url = "https://cdimage.debian.org/cdimage/archive/9.13.0/amd64/iso-cd/debian-9.13.0-amd64-netinst.iso"
checksum = "71c7e9eb292acc880f84605b1ca2b997f25737fe0a43fc9586f61d35cd2eb43b"
url = "https://cdimage.debian.org/cdimage/archive/9.13.0/amd64/iso-cd/debian-9.13.0-amd64-netinst.iso"
checksum = "71c7e9eb292acc880f84605b1ca2b997f25737fe0a43fc9586f61d35cd2eb43b"
}
boot_command = [
"<esc><wait>",
"auto ",
"DEBIAN_FRONTEND=text ",
"preseed/url=http://{{.HTTPIP}}:{{ .HTTPPort }}/preseed.cfg ",
"console=tty0 ",
"--- ", # Lines after this are copied to the resulting system?!
"biosdevnames=0 ",
"net.ifnames=0 ",
"<enter>"
"<esc><wait>",
"auto ",
"DEBIAN_FRONTEND=text ",
"preseed/url=http://{{.HTTPIP}}:{{ .HTTPPort }}/preseed.cfg ",
"console=tty0 ",
"--- ", # Lines after this are copied to the resulting system?!
"biosdevnames=0 ",
"net.ifnames=0 ",
"<enter>"
]
http_directory = "distros/debian/9/http/"
-6
View File
@@ -4,11 +4,5 @@ set -ex
apt update
apt upgrade -y
# Configure sshd to be faster
echo << EOF > /etc/ssh/sshd_config.d/00-vagrant_accept_pubkey.conf
UseDNS no
PubkeyAcceptedKeyTypes +ssh-rsa
EOF
# Clean up after ourselves
apt-get clean
+3 -3
View File
@@ -1,10 +1,10 @@
#!/usr/bin/env bash
set -ex
packages="bzip2 dkms build-essential linux-headers-$(uname -r)"
apt install -y ${packages} # Intentionally not quoted
packages=(bzip2 dkms build-essential "linux-headers-$(uname -r)")
apt install -y "${packages[@]}"
mount -t auto /home/vagrant/VBoxGuestAdditions.iso /mnt
/mnt/VBoxLinuxAdditions.run install 2>&1 | tee /root/vbox_addon_install.log
apt remove -y ${packages} # Also intentionally not quoted
apt remove -y "${packages[@]}"
umount /mnt
rm /home/vagrant/VBoxGuestAdditions.iso