-
Notifications
You must be signed in to change notification settings - Fork 2
64 lines (63 loc) · 2.08 KB
/
ci.yaml
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
name: Package and lint
on:
push:
branches:
- '**'
tags-ignore:
- 'v*'
jobs:
ci:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup helm CLI
uses: azure/setup-helm@v3
with:
# this is needed only temporarily - see https://github.com/helm/helm/issues/12423
version: 3.12.3
token: ${{ secrets.GITHUB_TOKEN }}
- name: Install kubectl
uses: azure/setup-kubectl@v3
- name: Build helm dependencies
run: |
helm dependency build .
- name: Lint helm
run: |
helm lint .
# we package just to validate
- name: Package helm
run: |
helm package .
- uses: actions/setup-python@v3
- uses: gabe565/setup-helm-docs-action@v1
- uses: pre-commit/[email protected]
- name: Create kind cluster
uses: helm/[email protected]
- name: Install chart prerequisites
env:
REGISTRY_PASS: ${{ secrets.REGISTRY_PASS }}
LICENSE_BASE64: ${{ secrets.LICENSE_BASE64 }}
run: |
kubectl create secret docker-registry --dry-run=client sf-gitlab-registry-creds \
--docker-server=registry.gitlab.com \
--docker-username=sf-distribution \
--docker-password=${REGISTRY_PASS} -o yaml > docker-secret.yaml
echo ${LICENSE_BASE64} | base64 -d > iengine.lic
kubectl create secret generic --dry-run=client iface-lic \
--from-file=iengine.lic -o yaml > lic-secret.yaml
kubectl apply -f docker-secret.yaml
kubectl apply -f lic-secret.yaml
- name: Install helm chart
run: |
helm install -f ci-values.yaml smartface .
kubectl rollout status deployment sf-api --timeout=600s || true
kubectl cluster-info dump > cluster-info.txt
- name: Archive cluster-info
uses: actions/upload-artifact@v3
with:
name: cluster-info
path: |
cluster-info.txt
- name: Test helm chart
run: |
helm test smartface