mirror of
https://github.com/outbackdingo/Biohazard.git
synced 2026-01-27 10:18:27 +00:00
fix(vyos-build): cp ISO in build
rm module building it doesn't work, other stuff from rolling still break the build
This commit is contained in:
14
.github/workflows/vyos-build.yaml
vendored
14
.github/workflows/vyos-build.yaml
vendored
@@ -91,6 +91,12 @@ jobs:
|
||||
name: "vyos-v${{ env.VYOS_VERSION }}-${{ env.VYOS_BUILDER }}-${{ env.VYOS_BUILD_TIME }}-${{ env.VYOS_ARCH }}-iso"
|
||||
path: "./vyos-build/build/vyos-${{ env.VYOS_VERSION }}-${{ env.VYOS_BUILDER }}-${{ env.VYOS_BUILD_TIME }}-${{ env.VYOS_ARCH }}.iso"
|
||||
|
||||
- name: Upload output ISO as artifact
|
||||
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
|
||||
with:
|
||||
name: "lts-${{ env.VYOS_ARCH }}"
|
||||
path: "./vyos-build/build/lts-${{ env.VYOS_ARCH }}.iso"
|
||||
|
||||
upload:
|
||||
needs: build
|
||||
runs-on: ubuntu-latest
|
||||
@@ -116,11 +122,9 @@ jobs:
|
||||
RCLONE_USE_SERVER_MODTIME: "true"
|
||||
run:
|
||||
| # first copies ISO as is, then copies ISO with common "latest" filename (with some filters to avoid hardcoding and safeguard against uploading the wrong thing if somehow >1 file), then deletes files older than the past 5 number of files under that arch and builder name
|
||||
export FILE=$(find . -type f | tail -n 1)
|
||||
echo "File to upload:"
|
||||
echo "${FILE}"
|
||||
rclone copy ./ r2:vyos-build/
|
||||
rclone copyto "${FILE}" r2:vyos-build/${{ env.VYOS_ARCH }}.iso --s3-no-check-bucket
|
||||
for i in $(find . -type f -iname "*.iso"); do mv $i ./; done
|
||||
ls -AlhR .
|
||||
rclone copy ./ r2:vyos-build/ --s3-no-check-bucket
|
||||
rclone lsf --format=p r2:vyos-build | grep "${{ env.VYOS_BUILDER }}" | grep "${{ env.VYOS_ARCH }}" | tail -n +3 | rclone delete --files-from - r2:vyos-build
|
||||
rclone cleanup r2:vyos-build
|
||||
# --s3-no-list-bucket needed for single file copyto bucket root, https://github.com/rclone/rclone/issues/5271 https://forum.rclone.org/t/issue-using-copyto-for-single-files/38842
|
||||
|
||||
@@ -32,7 +32,8 @@ DUO_VERSION="${DUO_VERSION#*duo_unix-}"
|
||||
TAILSCALE_VERSION="v1.60.1"
|
||||
TAILSCALE_VERSION="${TAILSCALE_VERSION#*v}"
|
||||
|
||||
pwd
|
||||
echo "STAGE 1: Clone vyos-build Git repository, with ${VYOS_VERSION} tag"
|
||||
echo "=========="
|
||||
git clone --depth=1 --branch "${VYOS_VERSION}" "${VYOS_URL}" ./vyos-build
|
||||
cd ./vyos-build
|
||||
VYOSDIR=$(pwd)
|
||||
@@ -40,6 +41,8 @@ git switch -c "${VYOS_VERSION}" # T6064
|
||||
mkdir -p ${VYOSDIR}/build ${VYOSDIR}/packages
|
||||
ls -AlhR ${VYOSDIR} # debug
|
||||
|
||||
echo "STAGE 2: Download packages outside of Debian & VyOS repos"
|
||||
echo "=========="
|
||||
cd ${VYOSDIR}/packages
|
||||
curl -vLO "https://github.com/getsops/sops/releases/download/v${SOPS_VERSION}/sops_${SOPS_VERSION}_${VYOS_ARCH}.deb"
|
||||
curl -vL -o ./vyaml_${VYAML_VERSION}_${VYOS_ARCH}.deb "https://github.com/p3lim/vyaml/releases/download/${VYAML_VERSION}/vyaml-${VYOS_ARCH}.deb"
|
||||
@@ -52,17 +55,9 @@ OP_VERSION=$(dpkg-deb --field ./1password-cli-${VYOS_ARCH}-latest.deb version)
|
||||
mv ./1password-cli-${VYOS_ARCH}-latest.deb ./1password-cli_${OP_VERSION}_${VYOS_ARCH}.deb
|
||||
cd ${VYOSDIR}
|
||||
|
||||
# build out-of-tree modules (because upstream VyOS APT repos don't align kernel version dependency with version tag branch's kernel version)
|
||||
cd ${VYOSDIR}/packages/linux-kernel
|
||||
git clone --depth=1 https://github.com/accel-ppp/accel-ppp.git
|
||||
./build-accel-ppp.sh
|
||||
./build-intel-drivers.sh
|
||||
./build-intel-qat.sh
|
||||
ls -AlhR ./*.deb
|
||||
mv ./*.deb ${VYOSDIR}/packages/
|
||||
cd ${VYOSDIR}
|
||||
|
||||
# script assumes running as sudo/root
|
||||
echo "STAGE 3: Build VyOS ISO"
|
||||
echo "=========="
|
||||
make clean
|
||||
ls -AlhR ${VYOSDIR}/packages # debug
|
||||
./build-vyos-image iso \
|
||||
@@ -83,3 +78,5 @@ ls -AlhR ${VYOSDIR}/packages # debug
|
||||
# VyOS doesn't build kernel with zram :(
|
||||
# --custom-package "zram-tools" \
|
||||
# --custom-package "systemd-zram-generator" # jank city
|
||||
|
||||
cp -r ${VYOSDIR}/build/*.iso ${VYOSDIR}/build/${VYOS_VERSION_TYPE:=lts}-${VYOS_ARCH}.iso
|
||||
Reference in New Issue
Block a user