Try to add Rawhide
This commit is contained in:
@@ -15,7 +15,7 @@ jobs:
|
||||
id: distros
|
||||
run: |-
|
||||
set -eo pipefail
|
||||
distros=$(ls distros/*.hcl | jq -cRs 'split("\n") | [ .[] | if length > 0 then . else empty end ]')
|
||||
distros=$(ls distros/*.hcl{,.sh} | jq -cRs 'split("\n") | [ .[] | if length > 0 then . else empty end ]')
|
||||
echo "::set-output name=distros::${distros}"
|
||||
|
||||
build:
|
||||
@@ -43,13 +43,18 @@ jobs:
|
||||
if: contains(matrix.needs_timeout, matrix.distro)
|
||||
shell: bash
|
||||
run: ./modify_timeout.sh "${{ matrix.distro }}"
|
||||
- name: Run generator, if necessary
|
||||
if: endsWith(matrix.distro, '.sh')
|
||||
run: "${{ matrix.distro }}"
|
||||
- name: try build
|
||||
shell: bash
|
||||
run: |
|
||||
set -e
|
||||
# Strip .sh if it is a dynamic one
|
||||
file="$(printf "${{ matrix.distro }}" | sed -E -e 's/^(.*).sh$/\1/')"
|
||||
# Add a retry in case something bogus like a network failure happens
|
||||
./packer build -var-file=${{ matrix.distro }} -var "qemu_accelerator=tcg" -except=upload sources || \
|
||||
./packer build -var-file=${{ matrix.distro }} -var "qemu_accelerator=tcg" -except=upload sources
|
||||
./packer build -var-file="${file}" -var "qemu_accelerator=tcg" -except=upload sources || \
|
||||
./packer build -var-file="${file}" -var "qemu_accelerator=tcg" -except=upload sources
|
||||
env:
|
||||
VAGRANT_CLOUD_TOKEN: ${{ secrets.VAGRANT_CLOUD_TOKEN }}
|
||||
PACKER_LOG: ${{ contains(matrix.needs_timeout, matrix.distro) && '1' || '0' }}
|
||||
|
||||
@@ -2,3 +2,6 @@ output_*
|
||||
*.box
|
||||
*.iso
|
||||
.vagrant
|
||||
|
||||
# Generated distros
|
||||
distros/fedora-rawhide-*.hcl
|
||||
|
||||
@@ -10,3 +10,7 @@
|
||||
path = http/fedora/f36
|
||||
url = https://pagure.io/fedora-kickstarts.git
|
||||
branch = f36
|
||||
[submodule "http/fedora/rawhide"]
|
||||
path = http/fedora/rawhide
|
||||
url = https://pagure.io/fedora-kickstarts.git
|
||||
branch = main
|
||||
|
||||
Executable
+45
@@ -0,0 +1,45 @@
|
||||
#!/usr/bin/env bash
|
||||
set -exo pipefail
|
||||
|
||||
# Name of the file to write out
|
||||
name="${0%.sh}"
|
||||
|
||||
# Base URL
|
||||
fedora=https://download.fedoraproject.org/pub/fedora/linux/development/rawhide/Server/x86_64/iso/
|
||||
|
||||
# Working directory
|
||||
tmp="$(mktemp -d)"
|
||||
listing="${tmp}/listing.html"
|
||||
checksums="${tmp}/checksums"
|
||||
|
||||
# First, find the proper URL, since it updates every build
|
||||
curl -L -o "${listing}" "${fedora}"
|
||||
links="$(cat "${listing}" | pup 'a[href*=".iso"] attr{href}' | grep dvd)"
|
||||
iso_name="$(echo "${links}" | grep -e 'iso$')"
|
||||
iso="${fedora}${iso_name}"
|
||||
|
||||
# Read the SHA256 sum value
|
||||
sums="$(cat "${listing}" | pup 'a[href*="CHECKSUM"] attr{href}')"
|
||||
until curl -f -L -o "${checksums}" "${fedora}${sums}"; do
|
||||
sleep 1
|
||||
done
|
||||
sha="$(cat "${checksums}" | grep dvd | grep SHA256 | cut -d' ' -f 4)"
|
||||
|
||||
# Write out HCL file
|
||||
cat << EOF > "${name}"
|
||||
distro = "fedora"
|
||||
arch = "x86_64"
|
||||
version = "rawhide"
|
||||
iso = {
|
||||
url = "${iso}"
|
||||
checksum = "${sha}"
|
||||
}
|
||||
boot_wait = "20s"
|
||||
boot_command = [
|
||||
"<up><tab><bs><bs><bs><bs><bs>",
|
||||
"edd=off net.ifnames=0 biosdevnames=0 inst.ks=http://{{.HTTPIP}}:{{.HTTPPort}}/fedora/rawhide-x86_64.ks console=ttyS0<enter><wait>"
|
||||
]
|
||||
ssh_handshake_attempts = 1000
|
||||
EOF
|
||||
|
||||
rm -r "${tmp}"
|
||||
Submodule
+1
Submodule http/fedora/rawhide added at 1fcebbbe22
Reference in New Issue
Block a user