-
Notifications
You must be signed in to change notification settings - Fork 73
153 lines (148 loc) · 6.62 KB
/
provision-minikube.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
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
name: minikube CI
on:
schedule:
# run weekly to ensure to catch build being broken against upstream
- cron: "0 7 * * 1"
push:
# dependabot will create both branches and pull request
# only run on pull requests to avoid running twice and creating a release draft
branches-ignore:
- 'dependabot/**'
paths:
- 'provision/minikube/**'
- '.github/workflows/provision-minikube.yml'
pull_request:
paths:
- 'provision/minikube/**'
- '.github/workflows/provision-minikube.yml'
concurrency:
# Only run once for latest commit per ref and cancel other (previous) runs.
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install Task
uses: arduino/setup-task@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Set up JDK
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '17'
cache: 'maven'
- uses: azure/[email protected]
with:
version: 'v3.8.2'
- uses: azure/[email protected]
with:
version: 'v1.23.3'
- name: Add yq
run: |
mkdir -p $GITHUB_WORKSPACE/bin
wget https://github.com/mikefarah/yq/releases/download/v4.25.3/yq_linux_amd64 -O $GITHUB_WORKSPACE/bin/yq
chmod +x $GITHUB_WORKSPACE/bin/yq
- name: Setup minikube-Kubernetes
uses: manusa/[email protected]
with:
minikube version: 'v1.28.0'
# the version of Kubernetes needs to be in-sync with `rebuild.sh`
kubernetes version: 'v1.25.3'
github token: ${{ secrets.GITHUB_TOKEN }}
driver: docker
start args: --memory 4096
- name: Provision Legacy store on PostgreSQL DB
working-directory: provision/minikube
run: |
PATH=$PATH:$GITHUB_WORKSPACE/bin
./rebuild.sh
task KC_DATABASE=postgres KC_STORAGE=
kubectl get pods -A
kubectl get events -A
- name: Create Dataset on Postgres Legacy Store
working-directory: provision/minikube
run: |
task KC_DATABASE=postgres KC_STORAGE= dataset-import -- -a clear-status-completed
task KC_DATABASE=postgres KC_STORAGE= dataset-import -- -a create-realms -r 1 -c 5 -u 5 -i 1000
task KC_DATABASE=postgres KC_STORAGE= dataset-import -- -a status-completed
- name: Provision JPA Map store on PostgreSQL DB
working-directory: provision/minikube
run: |
PATH=$PATH:$GITHUB_WORKSPACE/bin
task KC_DATABASE=postgres KC_STORAGE=jpa
- name: Create Dataset on Postgres JPA Map Store
working-directory: provision/minikube
run: |
task KC_DATABASE=postgres KC_STORAGE=jpa KC_OTEL=true dataset-import -- -a clear-status-completed
task KC_DATABASE=postgres KC_STORAGE=jpa KC_OTEL=true dataset-import -- -a create-realms -r 1 -c 5 -u 5 -i 1000
task KC_DATABASE=postgres KC_STORAGE=jpa KC_OTEL=true dataset-import -- -a status-completed
- name: Provision JPA Map store on Cockroach DB Single Node
working-directory: provision/minikube
run: |
PATH=$PATH:$GITHUB_WORKSPACE/bin
task KC_DATABASE=cockroach-single KC_STORAGE=jpa
kubectl get pods -A
kubectl get events -A
- name: Create Dataset on Cockroach JPA Map Store
working-directory: provision/minikube
run: |
task KC_DATABASE=cockroach-single KC_STORAGE=jpa dataset-import -- -a clear-status-completed
task KC_DATABASE=cockroach-single KC_STORAGE=jpa dataset-import -- -a create-realms -r 1 -c 5 -u 5 -i 1000
task KC_DATABASE=cockroach-single KC_STORAGE=jpa dataset-import -- -a status-completed
- name: Provision Hot Rod Map store on Infinispan (In-Memory store)
working-directory: provision/minikube
run: |
PATH=$PATH:$GITHUB_WORKSPACE/bin
task KC_DATABASE=infinispan KC_STORAGE=hotrod
kubectl get pods -A
kubectl get events -A
- name: Create Dataset on Infinispan Hot Rod Store
working-directory: provision/minikube
run: |
task KC_DATABASE=infinispan KC_STORAGE=hotrod dataset-import -- -a clear-status-completed
task KC_DATABASE=infinispan KC_STORAGE=hotrod dataset-import -- -a create-realms -r 1 -c 5 -u 5 -i 1000
task KC_DATABASE=infinispan KC_STORAGE=hotrod dataset-import -- -a status-completed
- name: Provision JPA and Hot Rod store on PostgreSQL and Infinispan (In-Memory store)
working-directory: provision/minikube
run: |
PATH=$PATH:$GITHUB_WORKSPACE/bin
task KC_DATABASE=postgres+infinispan KC_STORAGE=jpa+hotrod
kubectl get pods -A
kubectl get events -A
- name: Create Dataset on Infinispan Hot Rod and PostgreSQL JPA Store
working-directory: provision/minikube
run: |
task KC_DATABASE=postgres+infinispan KC_STORAGE=jpa+hotrod dataset-import -- -a clear-status-completed
task KC_DATABASE=postgres+infinispan KC_STORAGE=jpa+hotrod dataset-import -- -a create-realms -r 1 -c 5 -u 5 -i 1000
task KC_DATABASE=postgres+infinispan KC_STORAGE=jpa+hotrod dataset-import -- -a status-completed
- name: Provision JPA Map store on CHM (File store)
working-directory: provision/minikube
run: |
PATH=$PATH:$GITHUB_WORKSPACE/bin
task KC_DATABASE=none KC_STORAGE=chm
kubectl get pods -A
kubectl get events -A
- name: Create Dataset on CHM Store
working-directory: provision/minikube
run: |
task KC_DATABASE=none KC_STORAGE=chm dataset-import -- -a clear-status-completed
task KC_DATABASE=none KC_STORAGE=chm dataset-import -- -a create-realms -r 1 -c 5 -u 5 -i 1000
task KC_DATABASE=none KC_STORAGE=chm dataset-import -- -a status-completed
- name: Provision Cockroach Operator minimally
working-directory: provision/minikube
run: |
# minimal testing for storage cockroach-operator, as GitHub actions doesn't have enough resources for this
helm template --debug keycloak --set hostname=minikube.nip.io --set storage=cockroach-operator
kubectl get pods -A
kubectl get events -A
- name: Show logs on failure
if: ${{ failure() }}
working-directory: provision/minikube
run: |
kubectl get pods -A
kubectl get pods -A -o yaml
kubectl get events -A
kubectl logs -n keycloak keycloak-0