Skip to content

Commit 5388142

Browse files
committed
patch build farm ssh
1 parent 76b68d2 commit 5388142

1 file changed

Lines changed: 26 additions & 0 deletions

File tree

.github/scripts/firesim-manager-entrypoint.sh

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,32 @@ path.write_text(text)
226226
print("Patched FireSim build-farm wait to require SSH/login-shell readiness.")
227227
PY
228228

229+
grep -q 'FIRESIM_BUILD_HOST_SSH_READY_TIMEOUT_SECONDS' deploy/buildtools/buildfarm.py
230+
231+
python - <<'PY'
232+
from pathlib import Path
233+
234+
path = Path("deploy/firesim")
235+
text = path.read_text()
236+
needle = " from fabric.api import local, hide, warn_only, env, execute, parallel # type: ignore\n"
237+
patch = (
238+
needle
239+
+ "\n"
240+
+ 'env.user = os.environ.get("FIRESIM_BUILD_HOST_USER", "ubuntu")\n'
241+
+ 'env.key_filename = os.environ.get("FIRESIM_BUILD_HOST_KEY", os.path.expanduser("~/firesim.pem"))\n'
242+
)
243+
244+
if patch in text:
245+
pass
246+
elif needle in text:
247+
text = text.replace(needle, patch, 1)
248+
else:
249+
raise SystemExit("Could not find Fabric import in deploy/firesim")
250+
251+
path.write_text(text)
252+
print("Configured Fabric build-host SSH user/key for FireSim.")
253+
PY
254+
229255
had_nounset=0
230256
case "$-" in
231257
*u*)

0 commit comments

Comments
 (0)