forked from controlplaneio/netassert
-
Notifications
You must be signed in to change notification settings - Fork 0
/
justfile
48 lines (36 loc) · 1.16 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
default:
just --list
version := "0.0.1"
# build the binary in ./bin folder
build:
go build -ldflags="-X 'main.appName=NetAssert' -X 'main.version=2.0.0-dev'" -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 kubernetes/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 ./kubernetes/manifests
# delete kubernetes deployObj
k8s-rm-apply:
kubectl delete -f ./kubernetes/manifests
# 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