Skip to content

Commit 31046a6

Browse files
committed
do not use top level dir /tmp
1 parent d186f3d commit 31046a6

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

examples/justfile

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -116,21 +116,23 @@ bulletin-solo-zombienet-start runtime="bulletin-polkadot-runtime":
116116

117117
# Run zombienet from root directory so relative paths in config work correctly
118118
ZOMBIENET_CONFIG=$(cd .. && pwd)/zombienet/bulletin-westend-local.toml
119+
mkdir -p {{ ZOMBIENET_DIR }}
119120
(cd .. && POLKADOT_BINARY_PATH=$POLKADOT_BINARY_PATH \
120121
POLKADOT_PARACHAIN_BINARY_PATH=$POLKADOT_PARACHAIN_BINARY_PATH \
121-
$ZOMBIENET_BIN -p native spawn --dir {{ ZOMBIENET_DIR }} $ZOMBIENET_CONFIG > /tmp/zombienet.log 2>&1) &
122+
$ZOMBIENET_BIN -p native spawn --dir {{ ZOMBIENET_DIR }} $ZOMBIENET_CONFIG > {{ ZOMBIENET_DIR }}/zombienet.log 2>&1) &
122123
else # bulletin-polkadot-runtime
123124
echo " Setting up Polkadot runtime..."
124125
# Build the node binary (which will build the runtime as a dependency)
125126
cargo build --release -p polkadot-bulletin-chain
126127
BULLETIN_BINARY=$(cd .. && pwd)/target/release/polkadot-bulletin-chain
127128
ZOMBIENET_CONFIG=$(cd .. && pwd)/zombienet/bulletin-polkadot-local.toml
128-
(cd .. && POLKADOT_BULLETIN_BINARY_PATH=$BULLETIN_BINARY $ZOMBIENET_BIN -p native spawn --dir {{ ZOMBIENET_DIR }} $ZOMBIENET_CONFIG > /tmp/zombienet.log 2>&1) &
129+
mkdir -p {{ ZOMBIENET_DIR }}
130+
(cd .. && POLKADOT_BULLETIN_BINARY_PATH=$BULLETIN_BINARY $ZOMBIENET_BIN -p native spawn --dir {{ ZOMBIENET_DIR }} $ZOMBIENET_CONFIG > {{ ZOMBIENET_DIR }}/zombienet.log 2>&1) &
129131
fi
130132
ZOMBIENET_PID=$!
131133
echo $ZOMBIENET_PID > {{ PID_DIR }}/zombienet.pid
132134
echo " Zombienet PID: $ZOMBIENET_PID"
133-
echo " Log: /tmp/zombienet.log"
135+
echo " Log: {{ ZOMBIENET_DIR }}/zombienet.log"
134136
echo " Waiting for chain to start (120 seconds)..."
135137
sleep 120
136138

@@ -231,16 +233,17 @@ ipfs-reconnect-start runtime="bulletin-polkadot-runtime":
231233
echo "🔄 Starting IPFS reconnect script (Docker mode, runtime: {{ runtime }})..."
232234

233235
# Use different reconnect script for westend
236+
mkdir -p {{ ZOMBIENET_DIR }}
234237
if [ "{{ runtime }}" = "bulletin-westend-runtime" ]; then
235-
./scripts/ipfs-reconnect-westend.sh docker > /tmp/ipfs-reconnect-docker.log 2>&1 &
238+
./scripts/ipfs-reconnect-westend.sh docker > {{ ZOMBIENET_DIR }}/ipfs-reconnect.log 2>&1 &
236239
else
237-
./scripts/ipfs-reconnect-solo.sh docker > /tmp/ipfs-reconnect-docker.log 2>&1 &
240+
./scripts/ipfs-reconnect-solo.sh docker > {{ ZOMBIENET_DIR }}/ipfs-reconnect.log 2>&1 &
238241
fi
239242

240243
RECONNECT_PID=$!
241244
echo $RECONNECT_PID > {{ PID_DIR }}/ipfs-reconnect-docker.pid
242245
echo " Reconnect PID: $RECONNECT_PID"
243-
echo " Log: /tmp/ipfs-reconnect-docker.log"
246+
echo " Log: {{ ZOMBIENET_DIR }}/ipfs-reconnect.log"
244247
sleep 2
245248

246249
# Generate PAPI descriptors
@@ -273,7 +276,7 @@ setup-services runtime="bulletin-polkadot-runtime":
273276
echo " Zombienet process check:"
274277
ps aux | grep zombienet | grep -v grep || echo " ⚠ No zombienet process found"
275278
echo " Checking zombienet log:"
276-
tail -20 /tmp/zombienet.log || echo " ⚠ Could not read zombienet log"
279+
tail -20 {{ ZOMBIENET_DIR }}/zombienet.log || echo " ⚠ Could not read zombienet log"
277280

278281
just ipfs-connect {{ runtime }}
279282
just ipfs-reconnect-start {{ runtime }}

0 commit comments

Comments
 (0)