-
Notifications
You must be signed in to change notification settings - Fork 26
/
Copy pathMakefile
61 lines (50 loc) · 1.75 KB
/
Makefile
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
git_commit = $(shell git log -1 --pretty=format:"%H")
test_folder ?= container
test_unit:
dagger call --mod=dagger --progress=plain unit-test \
--src=. \
--with-race=false
test_functional_all:
dagger call --mod=dagger functional-test-all \
--src=$(shell pwd)/examples \
--jumppad=$(which jumppad)
test_functional_podman:
GOOS=linux go build -ldflags "-X main.version=${git_commit}" -gcflags=all="-N -l" -o bin/jumppad main.go
dagger call --mod=dagger functional-test \
--src=$(shell pwd)/examples \
--working-directory=$(test_folder) \
--runtime=podman \
--jumppad=./bin/jumppad
test_functional_docker:
GOOS=linux go build -ldflags "-X main.version=${git_commit}" -gcflags=all="-N -l" -o bin/jumppad main.go
dagger call --mod=dagger functional-test \
--src=$(shell pwd)/examples \
--working-directory=$(test_folder) \
--runtime=docker \
--jumppad=./bin/jumppad
test_e2e_cmd: install_local
jumppad up --no-browser ./examples/single_k3s_cluster
jumppad down
dagger_build:
dagger call -m dagger all \
--output=./all_archive \
--src=. \
--notorize-cert=${QUILL_SIGN_P12} \
--notorize-cert-password=QUILL_SIGN_PASSWORD \
--notorize-key=${QUILL_NOTARY_KEY} \
--notorize-id=${QUILL_NOTARY_KEY_ID} \
--notorize-issuer=${QUILL_NOTARY_ISSUER}
dagger_release:
dagger call -m dagger release \
--github-token=GITHUB_TOKEN \
--archives=./all_archive \
--src=.
generate_mocks:
go install github.com/vektra/mockery/[email protected]
go generate ./...
install_local:
go build -ldflags "-X main.version=${git_commit}" -gcflags=all="-N -l" -o bin/jumppad main.go
sudo mv /usr/bin/jumppad /usr/local/bin/jumppad-old || true
sudo cp bin/jumppad /usr/local/bin/jumppad
remove_local:
sudo mv /usr/local/bin/jumppad-old /usr/local/bin/jumppad || true