Compare commits
2 Commits
fe6ee25d1c
...
0c0f1ec715
| Author | SHA1 | Date | |
|---|---|---|---|
| 0c0f1ec715 | |||
| 83760025b6 |
BIN
rescue-objects.tar
Normal file
BIN
rescue-objects.tar
Normal file
Binary file not shown.
@@ -170,29 +170,39 @@ runcmd:
|
|||||||
- pacman -S --noconfirm --needed base-devel git wget curl rust cargo qemu-full edk2-ovmf squashfs-tools xorriso dosfstools mtools python bc rsync openssh tmux
|
- pacman -S --noconfirm --needed base-devel git wget curl rust cargo qemu-full edk2-ovmf squashfs-tools xorriso dosfstools mtools python bc rsync openssh tmux
|
||||||
|
|
||||||
# --- CLONE PROJECT ---------------------------------------------------------
|
# --- CLONE PROJECT ---------------------------------------------------------
|
||||||
|
# Try HTTPS (with SSL_NO_VERIFY for self-hosted Gitea), fall back to GitHub
|
||||||
- |
|
- |
|
||||||
su - darkforge -c '
|
su - darkforge -c '
|
||||||
cd /home/darkforge
|
cd /home/darkforge
|
||||||
git clone --recurse-submodules https://git.dannyhaslund.dk/danny8632/darkforge.git 2>/dev/null || \
|
GIT_SSL_NO_VERIFY=true git clone --recurse-submodules https://git.dannyhaslund.dk/danny8632/darkforge.git 2>/dev/null || \
|
||||||
git clone --recurse-submodules https://github.com/danny8632/darkforge.git 2>/dev/null || \
|
git clone --recurse-submodules https://github.com/danny8632/darkforge.git 2>/dev/null || \
|
||||||
echo "CLONE FAILED — manually clone the repo after login"
|
echo "CLONE FAILED — run manually: GIT_SSL_NO_VERIFY=true git clone --recurse-submodules https://git.dannyhaslund.dk/danny8632/darkforge.git ~/darkforge"
|
||||||
'
|
'
|
||||||
|
|
||||||
# --- INSTALL CONVENIENCE COMMAND -------------------------------------------
|
# --- INSTALL CONVENIENCE COMMAND -------------------------------------------
|
||||||
|
# NOTE: heredoc inside cloud-init runcmd must NOT be indented or the
|
||||||
|
# shebang gets leading spaces and the script won't execute properly.
|
||||||
- |
|
- |
|
||||||
cat > /usr/local/bin/darkforge-test << 'DTEOF'
|
cat > /usr/local/bin/darkforge-test << 'DTEOF'
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
SCRIPT="/home/darkforge/darkforge/tests/proxmox/run-in-vm.sh"
|
SCRIPT="/home/darkforge/darkforge/tests/proxmox/run-in-vm.sh"
|
||||||
if [ ! -f "$SCRIPT" ]; then
|
if [ ! -f "$SCRIPT" ]; then
|
||||||
echo "ERROR: Test script not found. Is the repo cloned?"
|
echo "ERROR: Test script not found at: $SCRIPT"
|
||||||
echo " git clone --recurse-submodules https://git.dannyhaslund.dk/danny8632/darkforge.git ~/darkforge"
|
echo ""
|
||||||
exit 1
|
echo "The git clone probably failed during provisioning."
|
||||||
fi
|
echo "Clone manually:"
|
||||||
ARGS="$*"
|
echo " git clone --recurse-submodules https://git.dannyhaslund.dk/danny8632/darkforge.git ~/darkforge"
|
||||||
exec tmux new-session -d -s darkforge \
|
echo ""
|
||||||
"bash ${SCRIPT} --tmux ${ARGS}; echo ''; echo 'Tests finished. Press Enter to close.'; read" \; \
|
echo "Then run: darkforge-test"
|
||||||
attach-session -t darkforge
|
exit 1
|
||||||
DTEOF
|
fi
|
||||||
|
ARGS="$*"
|
||||||
|
# Kill any existing tmux session first
|
||||||
|
tmux kill-session -t darkforge 2>/dev/null || true
|
||||||
|
exec tmux new-session -d -s darkforge \
|
||||||
|
"bash ${SCRIPT} --tmux ${ARGS}; echo ''; echo 'Tests finished. Press Enter to close.'; read" \; \
|
||||||
|
attach-session -t darkforge
|
||||||
|
DTEOF
|
||||||
chmod +x /usr/local/bin/darkforge-test
|
chmod +x /usr/local/bin/darkforge-test
|
||||||
|
|
||||||
# --- SIGNAL DONE -----------------------------------------------------------
|
# --- SIGNAL DONE -----------------------------------------------------------
|
||||||
|
|||||||
Reference in New Issue
Block a user