Skip to content

Add Grafana dashboard based on latest metrics docs #801

Add Grafana dashboard based on latest metrics docs

Add Grafana dashboard based on latest metrics docs #801

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@v4
- name: Install Task
uses: arduino/setup-task@b91d5d2c96a56797b48ac1e0e89220bf64044611 # ev2
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Set up JDK
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '21'
cache: 'maven'
- uses: azure/setup-helm@v4
with:
version: 'v3.8.2'
- uses: azure/setup-kubectl@v4
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/actions-setup-minikube@v2.13.0
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 on PostgreSQL DB
working-directory: provision/minikube
run: |
PATH=$PATH:$GITHUB_WORKSPACE/bin
./rebuild.sh
task KC_DATABASE=postgres
kubectl get pods -A
kubectl get events -A
- name: Create Dataset on Postgres DB
working-directory: provision/minikube
run: |
task KC_DATABASE=postgres dataset-import -- -a clear-status-completed
task KC_DATABASE=postgres dataset-import -- -a create-realms -r 1 -c 5 -u 5
task KC_DATABASE=postgres dataset-import -- -a status-completed
- 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