-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTaskfile.yml
104 lines (85 loc) · 2.12 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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
version: '2'
tasks:
build:
cmds:
- mkdir -p ./dist
- go build -o ./dist/factd
generates:
- ./dist/factd
release:
cmds:
- goreleaser --snapshot --rm-dist
generates:
- dist/
release:dist:
cmds:
- goreleaser
generates:
- dist/
lint:
cmds:
- gometalinter --vendor ./...
test:
cmds:
- go test ./...
deps:
cmds:
- dep ensure --vendor-only
sources:
- Gopkg.lock
- Gopkg.toml
generates:
- vendor/
deps:update:
cmds:
- dep ensure --update
generates:
- vendor/
ci:image:build:
cmds:
- docker build -t registry.gitlab.com/twhiston/factd/test-deps:latest .gitlab/
ci:image:push:
cmds:
- docker push registry.gitlab.com/twhiston/factd/test-deps:latest
build:docker:
deps: ["build"]
cmds:
- task: image:build
vars:
command: docker
push:docker:
deps: ["docker:build"]
cmds:
- docker push tomwhiston/factd:latest
run:docker:
deps: ["build:docker"]
cmds:
- task: image:run
vars:
command: docker
run:atomic:
deps: ["build:docker"]
cmds:
- atomic run tomwhiston/factd:latest
build:podman:
deps: ["build"]
cmds:
- task: image:build
vars:
command: docker
run:podman:
deps: ["build:podman"]
cmds:
- task: image:run
vars:
command: podman
# Internal tasks, don't call these directly
image:build:
cmds:
- "{{ .command }} build -t tomwhiston/factd:latest --file deployment/Dockerfile ."
image:run:
cmds:
- "{{ .command }} run --rm --privileged --ipc=host --net=host --pid=host -e HOST=/host -v /run:/run -v /var/log:/var/log -v ~/:/root -v /etc/localtime:/etc/localtime -v /:/host tomwhiston/factd:latest run"
image:serve:
cmds:
- "{{ .command }} run -it --privileged --name=factd --ipc=host --net=host --pid=host -e HOST=/host -e NAME=factd -e IMAGE=tomwhiston/factd:latest -v /run:/run -v /var/log:/var/log -v ~/:/root -v /etc/localtime:/etc/localtime -v /:/host tomwhiston/factd:latest serve"