-
Notifications
You must be signed in to change notification settings - Fork 1
/
.gitlab-ci.yml
62 lines (59 loc) · 2.45 KB
/
.gitlab-ci.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
variables:
HELM_VERSION: 3.10.1
lint:
stage: lint
image: dtzar/helm-kubectl:$HELM_VERSION
script:
- helm dependency build elasticsearch
&& helm dependency list elasticsearch
&& helm lint elasticsearch --strict
&& helm template elasticsearch > template-result-elasticsearch.yaml
- helm dependency build jackrabbit
&& helm dependency list jackrabbit
&& helm lint jackrabbit --strict
&& helm template jackrabbit > template-result-jackrabbit.yaml
- helm dependency build mediaproxy
&& helm dependency list mediaproxy
&& helm lint mediaproxy --strict
&& helm template mediaproxy > template-result-mediaproxy.yaml
- helm dependency build sulu
&& helm dependency list sulu
&& helm lint sulu --strict
&& helm template sulu > template-result-sulu.yaml
- helm dependency build varnish
&& helm dependency list varnish
&& helm lint varnish --strict
&& helm template varnish > template-result-varnish.yaml
artifacts:
name: template-results
paths:
- template-result-*.yaml
build:
stage: build
image: google/cloud-sdk:slim
before_script:
# install helm
- HELM_SCRIPT_URL=https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3
- curl -sSL "$HELM_SCRIPT_URL" | bash -s -- --version "v$HELM_VERSION"
# authenticate gcloud
- echo "$SERVICE_ACCOUNT_KEY" > key.json
- gcloud auth activate-service-account --key-file=key.json
script:
# download existing charts
- mkdir build
- gsutil cp -r gs://charts.sulu.cloud/* build/ || true
# package new charts
- helm dependency build elasticsearch && helm package --destination build elasticsearch
- helm dependency build jackrabbit && helm package --destination build jackrabbit
- helm dependency build mediaproxy && helm package --destination build mediaproxy
- helm dependency build sulu && helm package --destination build sulu
- helm dependency build varnish && helm package --destination build varnish
# index charts directory
- helm repo index build
# upload updated charts and index
- gsutil -h "Cache-Control:no-cache,max-age=0" cp build/* gs://charts.sulu.cloud/
only:
- master
stages:
- lint
- build