-
Notifications
You must be signed in to change notification settings - Fork 19
Expand file tree
/
Copy pathTaskfile.dist.yaml
More file actions
128 lines (114 loc) · 3.19 KB
/
Taskfile.dist.yaml
File metadata and controls
128 lines (114 loc) · 3.19 KB
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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
version: "3"
silent: true
includes:
server:
taskfile: ./server/Taskfile.yaml
dir: ./server
client:
taskfile: ./client/Taskfile.yaml
dir: ./client
e2e:
taskfile: ./e2e/Taskfile.yaml
dir: ./e2e
docs:
taskfile: ./docs/Taskfile.yaml
dir: ./docs
release:
taskfile: ./release/Taskfile.yaml
dir: ./release
deps:
taskfile: https://raw.githubusercontent.com/werf/common-ci/refs/heads/main/Taskfile.deps.yml
flatten: true
vars:
paths: "e2e"
actions:
taskfile: ./actions/Taskfile.yaml
dir: ./actions
tasks:
sign:
desc: "Sign last version tag + origin/main and push signatures."
cmds:
- git fetch --tags -f
- git signatures pull {{.CLI_ARGS}}
- |
for ref in {{.refs | default "$(git tag --sort=v:refname | tail -n1) origin/main"}}; do
echo "Signing $ref..."
git signatures add {{.CLI_ARGS}} $ref
git signatures show {{.CLI_ARGS}} $ref
done
- git signatures push {{.CLI_ARGS}}
format:
desc: "Run all formattes in parallel."
cmds:
- task: server:format
- task: client:format
- task: e2e:format
- task: docs:format:prettier
- task: release:format
- task: actions:format:write
lint:
desc: "Run all linters."
cmds:
- task: server:lint
- task: client:lint
- task: e2e:lint
- task: docs:lint:prettier
- task: release:lint
- task: actions:lint
build:dev:all:
desc: "Build all dev binaries."
deps:
- client:build:dev
- server:build:dev
- release:build:dev
vars:
version: "{{.version}}"
build:dist:all:
desc: "Build all release binaries."
deps:
- client:build:dist
- server:build:dist
- release:build:dist
vars:
version: "{{.version}}"
_image:build:
cmds:
- docker build {{.CLI_ARGS}} -f "{{.dfilePath}}" -t "{{.imageName}}" "{{.context | default "."}}"
image:build:builder:
desc: 'Build main builder image. Important vars: "imageName".'
cmds:
- task: _image:build
vars:
dfilePath: trdl-builder.Dockerfile
imageName:
sh: "echo registry-write.werf.io/trdl/builder:$(git rev-parse HEAD)"
_image:push:
cmds:
- docker push {{.CLI_ARGS}} "{{.imageName}}"
image:publish:builder:
desc: 'Build and publish main builder image. Important vars: "imageName".'
deps:
- image:build:builder
cmds:
- task: _image:push
vars:
imageName:
sh: "echo registry-write.werf.io/trdl/builder:$(git rev-parse HEAD)"
clean:
desc: "Clean all temporary files and build artifacts."
deps:
- server:clean:binaries
- client:clean:binaries
- release:clean:binaries
ci:setup:git-config:
desc: "Setup git config."
cmds:
- git config --global init.defaultBranch main
- git config --global user.name "borya"
- git config --global user.email "borya@flant.com"
ci:install:3p-git-signatures:
desc: "Install 3p-git-signatires."
cmds:
- git clone https://github.com/werf/3p-git-signatures.git
- cd 3p-git-signatures && make install
- echo "~/.local/bin" >> $GITHUB_PATH