Skip to content

chore: improved validate ci #11

chore: improved validate ci

chore: improved validate ci #11

Workflow file for this run

name: Validate controller
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
run-controller:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Create k8s Kind Cluster
uses: helm/[email protected]
with:
cluster_name: "k8scluster"
- name: Generate CRD
run: cargo run --bin=crdgen >> crd.yaml
- name: Apply CRD
run: kubectl apply -f crd.yaml
- name: Build Controller
run: docker build -t ext-cardano-dbsync:1.0 .
- name: Load Image into Kind
run: kind load docker-image ext-cardano-dbsync:1.0 --name k8scluster
- name: Apply manifests
run: |
kubectl apply -f test/manifest.yaml
kubectl apply -f test/dbsyncport.yaml
- name: Validate if CRD is working
run: |
counter=0; while ((counter++ < 6)); do kubectl describe dbsyncports.demeter.run --namespace project useraccess; sleep 2; done;
- name: Collect controller status
run: |
kubectl describe dbsyncports.demeter.run --namespace project useraccess | grep -oP 'Password: \K\S+'
kubectl describe dbsyncports.demeter.run --namespace project useraccess | grep -oP 'Username: \K\S+'