-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy path.drone.yml
85 lines (75 loc) · 1.77 KB
/
.drone.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
---
helm_image: &helm_image
image: lowess/helm:v2.14.2
cr_image: &cr_image
image: lowess/chart-releaser:v0.2.3
cr_env: &cr_env
environment:
CR_OWNER: Lowess
CR_CHARTS_REPO: https://lowess.github.io/helm-charts
CR_GIT_REPO: helm-charts
CR_PACKAGE_PATH: .cr-release-packages
CR_INDEX_PATH: .cr-index
CR_TOKEN:
from_secret: github_token
when_promoted: &when_promoted
when:
event:
- promote
target:
- production
kind: pipeline
name: helm-release
steps:
- name: helm_lint
<<: *helm_image
commands:
- helm lint charts/*
- name: helm_package
<<: *helm_image
<<: *cr_env
environment:
CHARTS: $CHARTS
commands:
- mkdir -p $CR_PACKAGE_PATH
- helm repo add lowess-helm-charts https://lowess.github.io/helm-charts/
- for CHART in ${CHARTS//,/ }; do
- helm dependency update charts/$CHART
- helm package charts/$CHART --destination $CR_PACKAGE_PATH;
- done
<<: *when_promoted
- name: release_charts
<<: *cr_image
<<: *cr_env
commands:
- cr upload
<<: *when_promoted
- name: generate_index
<<: *cr_image
<<: *cr_env
commands:
- mkdir -p $CR_INDEX_PATH
- cr index
- cat $CR_INDEX_PATH/index.yaml
<<: *when_promoted
- name: publish_index
image: plugins/gh-pages
environment:
DRONE_REMOTE_URL: [email protected]:Lowess/helm-charts.git
settings:
username: Lowess
ssh_key:
from_secret: github_ssh_key
pages_directory: .cr-index
<<: *when_promoted
- name: display_urls
image: lowess/drone-tabulate
<<: *cr_env
settings:
headers:
- Name
- URLs
rows:
-
- Helm Repo
- https://lowess.github.io/helm-charts