-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
kubeherd
executable file
·70 lines (62 loc) · 1.46 KB
/
kubeherd
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
#!/usr/bin/env variant
inputs:
- name: foo
flows:
- name: it
inputs:
- name: bar
script: |
echo echo {{.bar}}
- name: init
inputs:
- name: github-org
- name: github-user
- name: github-repo
- name: github-token
- name: slack-user
- name: slack-token
script: |
export KUBEHERD_GITHUB_ORG={{.github_org}}
export KUBEHERD_GITHUB_USER={{.github_user}}
export KUBEHERD_GITHUB_REPO={{.github_repo}}
export KUBEHERD_GITHUB_TOKEN={{.github_token}}
export KUBEHERD_SLACK_USER={{.slack_user}}
export KUBEHERD_SLACK_TOKEN={{.slack_token}}
kubeherd init system
flows:
- name: system
script: |
helmfile sync -f helmfiles/system.yaml
- name: user
script: |
helmfile sync -f helmfiles/user.yaml
- name: build
flows:
- name: dockerimage
script: |
$(dirname $0)builds/alpine-rails/imagebuild
- name: ami
script: |
packer build
- name: deploy
script: |
if [ ! -f $(which helmfile) ]; then
echo 'no executable named `helmfile` found in PATH' 1>&2
exit 1
fi
if [ ! -f charts.yaml ]; then
echo "no helmfile(charts.yaml) found in $(pwd)" 1>&2
exit 2
fi
helmfile sync
- name: undeploy
script: |
if [ ! -f $(which helmfile) ]; then
echo 'no executable named `helmfile` found in PATH' 1>&2
exit 1
fi
if [ ! -f charts.yaml ]; then
echo "no helmfile(charts.yaml) found in $(pwd)" 1>&2
exit 2
fi
helmfile delete