v0.7.0 4c16dd8

sandbox-run.sh RawHistoryFolder

1#!/usr/bin/env bash
2set -euo pipefail
3cd "$(dirname "$0")/../.."
4
5compose=(docker compose -f scripts/demo/compose.yaml)
6artifacts=${VEV_SANDBOX_ARTIFACTS:-scripts/demo/out/sandbox-$(date +%Y%m%d-%H%M%S)}
7mkdir -p "$artifacts"
8cleanup() {
9  if [[ -n "${client:-}" ]]; then
10    docker exec "$client" sh -c 'find /tmp/vev-state -maxdepth 8 -type f -name "*.log" -print -exec tail -100 {} \;' >"$artifacts/client-state.log" 2>&1 || true
11  fi
12  "${compose[@]}" logs --no-color >"$artifacts/compose.log" 2>&1 || true
13  "${compose[@]}" down -v --remove-orphans --timeout 5 >>"$artifacts/cleanup.log" 2>&1 || true
14}
15trap cleanup EXIT INT TERM
16
17security=$(docker info --format '{{json .SecurityOptions}}')
18case "$security" in *'name=rootless'*) ;; *) echo "error: Docker daemon is not rootless: $security" >&2; exit 1;; esac
19
20go build -o build/vev .
21sha256sum build/vev | tee "$artifacts/vev.sha256"
22docker build --label vev.sandbox.binary-sha256="$(sha256sum build/vev | cut -d' ' -f1)" \
23  -t "vev-sandbox:${VEV_SANDBOX_TAG:-dev}" -f scripts/demo/Dockerfile . \
24  >"$artifacts/build.log" 2>&1
25"${compose[@]}" up -d --force-recreate remote-a remote-b client >"$artifacts/up.log" 2>&1
26
27client=$("${compose[@]}" ps -q client)
28timeout 10 docker exec "$client" sh -c 'mkdir -m 700 -p "$XDG_CONFIG_HOME/vev"; umask 077; printf %s '\''{"marker":"vev.broker.offline/v1","registrations":[]}'\'' > "$XDG_CONFIG_HOME/vev/broker.json"'
29for host in remote-a remote-b; do
30  echo "readiness: $host" | tee -a "$artifacts/acceptance.log"
31  ready=
32  for _ in $(seq 1 40); do
33    if timeout 3 docker exec "$client" ssh -o ConnectTimeout=2 "$host" true >/dev/null 2>&1; then ready=1; break; fi
34    sleep 0.25
35  done
36  if [[ -z $ready ]]; then echo "error: SSH readiness timeout for $host" >&2; exit 1; fi
37  if ! timeout 30 docker exec "$client" vev host add "$host" 2>&1 | tee -a "$artifacts/acceptance.log"; then
38    timeout 5 docker exec "$client" vev _broker-production-serve >"$artifacts/direct-broker.log" 2>&1 || true
39    exit 1
40  fi
41done
42
43timeout 180 python3 scripts/demo/sandbox_acceptance.py "$client" | tee -a "$artifacts/acceptance.log"
44echo "PASS artifacts=$artifacts"

Keyboard shortcuts

Single-key shortcuts are on. ctrl k and esc work whatever this says.

ctrl k :
go to a section, branch, tag, file or repository
?
this list
j k
move the row cursor down / up
enter
open the row under the cursor; on Files, a directory opens or closes in place
↑ ↓ ← → home end
in the file tree (focus on a row): previous / next row, close / open a directory or go to its parent / first entry, first / last row. They never open a file
l h
on Files: open a directory or a file / close a directory or go up to its parent, then to the parent page. Elsewhere: into the side panel (on a merge request, its files) / back to the content; there j k move between its controls
g g G
first / last row
/
filter the list; on Files, find a file anywhere in the repository (esc clears, enter opens the best match)
b
switch branch or tag
g s g f g c g b g m g i g r g a
tabs: summary, files, commits, branches & tags, merge requests, issues, releases, actions (when available)
g h
home
w
wide mode: use the whole width of the screen, or not (remembered)
y
copy a permalink pinned to the commit
d u x
diff: split / unified / collapse or expand all
e E
diff: the whole file in view / every file, with the lines the hunks hide
n
merge request: next note in the diff
esc
close a dialog, leave a field

Branches 12

Tags 11

↑↓ moveenter openesc close