forked from cetic/helm-nifi
-
Notifications
You must be signed in to change notification settings - Fork 2
116 lines (113 loc) · 4.88 KB
/
test-oidc.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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
name: OIDC Logins
on:
push:
pull_request:
jobs:
oidc-insecure:
name: OIDC (Insecure)
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Minikube
uses: manusa/[email protected]
with:
minikube version: 'v1.28.0'
kubernetes version: 'v1.25.4'
github token: ${{ secrets.GITHUB_TOKEN }}
- name: Checkout code
uses: actions/checkout@v3
- name: Install dependencies
run: |
curl -sL https://deb.nodesource.com/setup_16.x -o nodesource_setup.sh
sudo bash nodesource_setup.sh
sudo apt-get install -y jq yarn
yarn add puppeteer-core --cwd $HOME
yarn add chai --cwd $HOME
yarn add mocha --cwd $HOME
helm repo add bitnami https://charts.bitnami.com/bitnami
helm repo add dysnix https://dysnix.github.io/charts/
helm repo update
helm dep up
- name: Install test framework components
run: |
kubectl apply -f tests/04-oidc-test-framework
kubectl create configmap 04-oidc-login-test --from-file=tests/04-oidc-login-test.js
kubectl rollout status --watch statefulset/browserless --timeout=5m
kubectl rollout status --watch statefulset/keycloak --timeout=5m
kubectl rollout status --watch statefulset/socks5 --timeout=5m
tests/04-oidc-keycloak-setup.bash
- name: Install Nifi
run: helm install nifi . -f tests/04-oidc-values.yaml
- name: Check deployment status
run: |
kubectl rollout status --watch statefulset/nifi --timeout=20m
- name: Check that OIDC login works
run: |
export K8SNODEIP=$(kubectl get node -o json | jq -r '.items[0].status.addresses[0].address')
export K8SPORT=$(kubectl get svc browserless -o json | jq -r '.spec.ports[0].nodePort')
export NIFIURL='https://nifi.default.svc.cluster.local:8443/nifi/'
cd $HOME
mkdir -p $HOME/screenshots
node_modules/mocha/bin/_mocha $GITHUB_WORKSPACE/tests/04-oidc-login-test.js --timeout 30000
- name: Archive screenshots
if: ${{ success() || failure() || cancelled() }}
uses: actions/upload-artifact@v3
with:
name: screenshots-insecure
path: ~/screenshots/
oidc-cluster-ingress-cert-manager-local-issuer:
name: OIDC (cluster, Ingress, cert-manager local issuer)
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Minikube
uses: manusa/[email protected]
with:
minikube version: 'v1.28.0'
kubernetes version: 'v1.25.4'
github token: ${{ secrets.GITHUB_TOKEN }}
- name: Checkout code
uses: actions/checkout@v3
- name: Install dependencies
run: |
curl -sL https://deb.nodesource.com/setup_16.x -o nodesource_setup.sh
sudo bash nodesource_setup.sh
sudo apt-get install -y jq yarn
yarn add puppeteer-core --cwd $HOME
yarn add chai --cwd $HOME
yarn add mocha --cwd $HOME
helm repo add bitnami https://charts.bitnami.com/bitnami
helm repo add dysnix https://dysnix.github.io/charts/
helm repo update
helm dep up
- name: Install test framework components
run: |
kubectl apply -f tests/04-oidc-test-framework
kubectl create configmap 04-oidc-login-test --from-file=tests/04-oidc-login-test.js
kubectl rollout status --watch statefulset/browserless --timeout=5m
kubectl rollout status --watch statefulset/keycloak --timeout=5m
kubectl rollout status --watch statefulset/socks5 --timeout=5m
tests/04-oidc-keycloak-setup.bash
tests/05-install-cert-manager.bash
minikube addons enable ingress
kubectl apply -f tests/07-increase-webhook-timeout.yaml
- name: Install Nifi and wait for start
run: |
helm install nifi . -f tests/07-oidc-cluster-values.yaml
kubectl rollout status --watch statefulset/nifi --timeout=20m
- name: Check that OIDC login works
run: |
export K8SNODEIP=$(kubectl get node -o json | jq -r '.items[0].status.addresses[0].address')
export K8SPORT=$(kubectl get svc browserless -o json | jq -r '.spec.ports[0].nodePort')
export NIFIURL='https://ingress-nginx-controller.ingress-nginx.svc.cluster.local/nifi/'
cd $HOME
mkdir -p $HOME/screenshots
node_modules/mocha/bin/_mocha $GITHUB_WORKSPACE/tests/07-oidc-cluster-login-test.js --timeout 30000
- name: Archive screenshots
if: ${{ success() || failure() || cancelled () }}
uses: actions/upload-artifact@v3
with:
name: screenshots-certMgr-localIssuer
path: ~/screenshots/