-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathTaskfile.yaml
More file actions
62 lines (56 loc) · 1.43 KB
/
Taskfile.yaml
File metadata and controls
62 lines (56 loc) · 1.43 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
version: "3"
tasks:
test:
cmds:
- helm unittest chart/
nestedSchemas:
desc: Generate nested schemas
internal: true
silent: true
dir: chart/schemas
cmds:
- |
for file in *.yaml; do
helm schema --use-helm-docs --bundle --bundle-without-id --k8s-schema-version=v1.35.1 -f "$file" -o "${file%.*}.schema.json"
done
docs:
desc: Generate the readme
dir: chart
cmds:
- helm-docs --template-files README.tpl.md
schema:
desc: Generate the schema for the chart
dir: chart
cmds:
- task: nestedSchemas
- helm schema --use-helm-docs --bundle --bundle-without-id --k8s-schema-version=v1.35.1
dev:
desc: Run the schema, docs and tests
watch: true
sources:
- "*.yaml"
- "**/*.yaml"
cmds:
- task: schema
- task: test
release:
env:
TAG: "{{ .TAG }}"
preconditions:
- sh: "[[ ! -z $TAG ]]"
msg: Please set the tag
- sh: 'echo $TAG | grep -E "^[0-9]+\.[0-9]+\.[0-9]+$"'
msg: Please provide tag in format X.X.X
cmds:
- yq -i '.version = strenv(TAG)' chart/Chart.yaml
- sleep 1
- task: schema
- task: docs
- git add chart/Chart.yaml
- git add chart/values.schema.json || true
- git add chart/README.md || true
- |
git commit -m "chore: update to v$TAG"
- git push
- git tag "v$TAG"
- git push origin "v$TAG"