-
Notifications
You must be signed in to change notification settings - Fork 44
Expand file tree
/
Copy pathjustfile
More file actions
59 lines (43 loc) · 1.46 KB
/
justfile
File metadata and controls
59 lines (43 loc) · 1.46 KB
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
default:
just --list
version := "0.0.1"
# build the binary in ./bin folder
build:
go build -o bin/netassert cmd/netassert/cli/*.go
# build and run the binary
run: build
bin/netassert
# run go test(s)
test:
go test -v -race ./...
# run the linter
lint:
golangci-lint run ./...
# remove the binary from ./bin folder
clean:
@rm -rf ./bin
# create a new kind k8s cluster called packet-test
kind-up:
kind create cluster --name packet-test --config ./e2e/clusters/kind/kind-config.yaml
# delete the kind k8s cluster called packet-test
kind-down:
kind delete clusters packet-test
# deployObj kubernetes manifests
k8s-apply:
kubectl apply -f ./e2e/manifests/workload.yaml
k8s-rm-apply:
kubectl delete -f ./e2e/manifests/workload.yaml
netpol-apply:
kubectl apply -f ./e2e/manifests/networkpolicies.yaml
netpol-rm-apply:
kubectl delete -f ./e2e/manifests/networkpolicies.yaml
calico-apply:
kubectl apply -f https://raw.githubusercontent.com/projectcalico/calico/v3.31.3/manifests/calico.yaml
calico-rm-apply:
kubectl delete -f https://raw.githubusercontent.com/projectcalico/calico/v3.31.3/manifests/calico.yaml
# build docker image and tag it 0.0.01
docker-build:
docker build -f Dockerfile --no-cache --tag packet-capture:{{version}} .
# import image into the local kind cluster called packet-test
kind-import-image:
kind load docker-image packet-capture:{{version}} --name packet-test && kind load docker-image netassert-client:{{version}} --name packet-test