This repository has been archived by the owner on Feb 15, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathTaskfile.yml
73 lines (64 loc) · 1.91 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
version: '3'
silent: true
vars:
pwd:
sh: pwd
random_uuid:
sh: cat /proc/sys/kernel/random/uuid
token: ""
major_minor:
sh: "taskutils/version major-minor"
version:
sh: "taskutils/version"
commit:
sh: "git rev-parse --short HEAD"
container: bitbucket.local
network:
sh: "./taskutils/net '{{.container}}'"
name: ""
volume: "snake-runner-secrets"
includes:
go: tasks/go.yml
docker: tasks/docker.yml
release: tasks/release.yml
win: tasks/win.yml
tasks:
version:
desc: print version
cmds:
- printf "%s" "{{.version}}"
watch:
desc: watch for changes
cmds:
- ./taskutils/watch
rr:
cmds:
- task: go:build
- mkdir -p .runners/{{.random_uuid}}
- SNAKE_NAME={{.random_uuid}}
SNAKE_MASTER_ADDRESS=https://bitbucket.local/
SNAKE_ACCESS_TOKEN_PATH=.runners/{{.random_uuid}}/token
SNAKE_REGISTRATION_TOKEN={{.token}}
SNAKE_SSH_KEY_PATH=.runners/{{.random_uuid}}/id_rsa
SNAKE_PIPELINES_DIR=.runners/{{.random_uuid}}/pipelines
SNAKE_SIDECAR_DOCKER_VOLUMES=['/etc/ssl:/etc/ssl:ro','/etc/ca-certificates:/etc/ca-certificates:ro']
SNAKE_LOG_TRACE=true
./snake-runner -c ./conf/dev.conf
dock:
cmds:
- task: docker:snake-runner:build
- docker run -it
-e SNAKE_NAME={{.name}}
-e SNAKE_MASTER_ADDRESS=http://{{.container}}:7990/
-e SNAKE_REGISTRATION_TOKEN={{.token}}
-e SNAKE_LOG_DEBUG=true
-e SNAKE_LOG_TRACE=true
-e SNAKE_DOCKER_NETWORK={{.network}}
-e 'SNAKE_DOCKER_VOLUMES=["/var/run/docker.sock:/var/run/docker.sock"]'
-v {{.volume}}:/var/lib/snake-runner/secrets
-v /var/run/docker.sock:/var/run/docker.sock
--network {{.network}}
--rm
reconquest/snake-runner:latest
licenses:
glice -gh "{{.GITHUB_TOKEN}}" | taskutils/licenses > LICENSES_THIRD_PARTY