Skip to content

Commit 399b5af

Browse files
authored
feat: preserve dir structure for custom recipes (#383)
1 parent 52bb905 commit 399b5af

20 files changed

+97
-88
lines changed
File renamed without changes.
File renamed without changes.

custom-recipes/buildernet/mkosi/playground.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,14 @@ recipe:
2525
depends_on:
2626
- builder-hub-proxy:healthy
2727
files:
28-
"/server.key": "server.key"
29-
"/server.crt": "server.crt"
28+
"/server.key": "config/server.key"
29+
"/server.crt": "config/server.crt"
3030

3131
builder:
3232
lifecycle_hooks: true
3333
init:
3434
- rm -rf .runtime/buildernet-vm.qcow2 || true
35-
- ./prepare.sh
36-
start: ./start.sh
35+
- ./scripts/prepare.sh
36+
start: ./scripts/start.sh
3737
stop:
38-
- ./stop.sh
38+
- ./scripts/stop.sh

custom-recipes/buildernet/mkosi/build.sh renamed to custom-recipes/buildernet/mkosi/scripts/build.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,12 @@
33
set -eu -o pipefail
44

55
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
6+
PROJECT_DIR="${SCRIPT_DIR}/.."
67

7-
FLASHBOTS_IMAGES_DIR="${SCRIPT_DIR}/.flashbots-images"
8+
FLASHBOTS_IMAGES_DIR="${PROJECT_DIR}/.flashbots-images"
89

910
if [[ ! -d "${FLASHBOTS_IMAGES_DIR}" ]]; then
10-
echo "Error: flashbots-images not found. Run ./sync.sh first."
11+
echo "Error: flashbots-images not found. Run ./scripts/sync.sh first."
1112
exit 1
1213
fi
1314

custom-recipes/buildernet/mkosi/builderhub-get-config.sh renamed to custom-recipes/buildernet/mkosi/scripts/builderhub-get-config.sh

File renamed without changes.

custom-recipes/buildernet/mkosi/clean.sh renamed to custom-recipes/buildernet/mkosi/scripts/clean.sh

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,15 @@
33
set -eu -o pipefail
44

55
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
6+
PROJECT_DIR="${SCRIPT_DIR}/.."
67

7-
FLASHBOTS_IMAGES_DIR="${SCRIPT_DIR}/.flashbots-images"
8-
RUNTIME_DIR="${SCRIPT_DIR}/.runtime"
8+
FLASHBOTS_IMAGES_DIR="${PROJECT_DIR}/.flashbots-images"
9+
RUNTIME_DIR="${PROJECT_DIR}/.runtime"
910
PIDFILE="${RUNTIME_DIR}/qemu.pid"
1011

1112
# Check if VM is running
1213
if [[ -f "${PIDFILE}" ]] && kill -0 $(cat "${PIDFILE}") 2>/dev/null; then
13-
echo "Error: VM is still running. Run ./stop.sh first."
14+
echo "Error: VM is still running. Run ./scripts/stop.sh first."
1415
exit 1
1516
fi
1617

custom-recipes/buildernet/mkosi/console.sh renamed to custom-recipes/buildernet/mkosi/scripts/console.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,12 @@
33
set -eu -o pipefail
44

55
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
6-
CONSOLE_SOCK="${SCRIPT_DIR}/.runtime/console.sock"
6+
PROJECT_DIR="${SCRIPT_DIR}/.."
7+
CONSOLE_SOCK="${PROJECT_DIR}/.runtime/console.sock"
78

89
if [[ ! -S "${CONSOLE_SOCK}" ]]; then
910
echo "Error: Console socket not found. Is the VM running?"
10-
echo "Run ./start.sh first."
11+
echo "Run ./scripts/start.sh first."
1112
exit 1
1213
fi
1314

custom-recipes/buildernet/mkosi/operator-api-action.sh renamed to custom-recipes/buildernet/mkosi/scripts/operator-api-action.sh

File renamed without changes.

custom-recipes/buildernet/mkosi/operator-api-health.sh renamed to custom-recipes/buildernet/mkosi/scripts/operator-api-health.sh

File renamed without changes.

custom-recipes/buildernet/mkosi/operator-api-logs.sh renamed to custom-recipes/buildernet/mkosi/scripts/operator-api-logs.sh

File renamed without changes.

0 commit comments

Comments
 (0)