-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTaskfile.yml
86 lines (74 loc) · 1.73 KB
/
Taskfile.yml
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
# Taskfile.yml
# Copyright (c) 2024 Neomantra BV
version: '3'
tasks:
default:
cmds:
- task: build
clean:
cmds:
- rm -f ./bin/nomad-device-onload ./bin/nomad-probe-onload ./bin/launcher
tidy:
cmds:
- go mod tidy
install-deps:
deps:
- tidy
cmds:
- go build -o ./bin/launcher github.com/hashicorp/nomad/plugins/shared/cmd/launcher
generates:
- ./bin/launcher
update-deps:
cmds:
- go get -u ./...
build:
deps:
- build-plugin
- build-onload-probe
eval:
deps:
- build-plugin
cmds:
- ./bin/launcher device ./bin/nomad-device-onload ./examples/onload-ubuntu.hcl
build-plugin:
deps:
- install-deps
- tidy
cmds:
- go build -o ./bin/nomad-device-onload cmd/nomad-device-onload/*.go
generates:
- ./bin/nomad-device-onload
sources:
- cmd/nomad-device-onload/*.go
- internal/**/*.go
silent: false
# for testing
dev-install-plugin:
deps:
- build-plugin
cmds:
- |
PLUGIN_DIR=${PLUGIN_DIR:-/local/nomad/plugins}
sudo mkdir -p ${PLUGIN_DIR}
sudo cp ./bin/nomad-device-onload ${PLUGIN_DIR}/
dev-install-plugin-restart-nomad:
deps:
- build-plugin
cmds:
- |
PLUGIN_DIR=${PLUGIN_DIR:-/local/nomad/plugins}
sudo systemctl stop nomad
sudo mkdir -p ${PLUGIN_DIR}
sudo cp ./bin/nomad-device-onload ${PLUGIN_DIR}/
sudo systemctl start nomad
build-onload-probe:
deps:
- tidy
cmds:
- go build -o ./bin/nomad-probe-onload cmd/onload-probe/*.go
generates:
- ./bin/nomad-probe-onload
sources:
- cmd/onload-probe/*.go
- internal/**/*.go
silent: false