-
Notifications
You must be signed in to change notification settings - Fork 20
/
justfile
71 lines (57 loc) · 1.54 KB
/
justfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
help:
@just --list
system_check:
#!/usr/bin/env python3
import os
import subprocess
devnull = open(os.devnull, 'w')
check = "\u2713"
cross = "\u2717"
space = "\t"
FAIL = 0
print("Checking dependencies:")
print(f"...Minkube{space}: ", end="")
try:
mini_version = subprocess.check_output("minikube version".split()).decode().split("\n")[0].strip()
print(f"{check} {mini_version}")
except:
FAIL += 1
print(f"{cross} NOT FOUND")
print(f"...GoLang{space}: ", end="")
try:
go_version = subprocess.check_output("go version".split()).decode().strip()
print(f"{check} {go_version}")
except:
FAIL += 1
print(f"{cross} NOT FOUND")
print(f"...Ngrok{space}: ", end="")
try:
ngrok_version = subprocess.check_output("ngrok version".split()).decode().strip()
print(f"{check} {ngrok_version}")
subprocess.check_output("ngrok config check".split()).decode().strip()
except:
FAIL += 1
print(f"{cross} NOT FOUND")
if FAIL > 0:
print(f"\n\u274c {FAIL} of the dependency and configuration checks have failed.\n")
exit(FAIL)
cluster_up:
minikube start --driver=docker --addons=dashboard,ingress --cpus='4' --memory='12g' --nodes=1
cluster_down:
minikube delete
# Creates a minikube tunnel
cluster_tunnel:
minikube tunnel
# Starts a minikube cluster and tilt
start: system_check cluster_up
tilt up
dump_crds:
cd tools/dump_crds/; go mod tidy; go run -v dump_crds.go ../../schemas
unit_test:
go test ./...
unit_test_race:
go test -race ./...
rebuild_docs:
./earthly.sh +rebuild-docs
ci-golang:
./earthly.sh +ci-golang