Skip to content

Initial CI automation on test for GitOps operator support for xKS #3

Initial CI automation on test for GitOps operator support for xKS

Initial CI automation on test for GitOps operator support for xKS #3

Workflow file for this run

name: Build, Deploy and Test on kind
on:
pull_request:
branches:
- '*'
env:
IMG: gitops-operator:test
jobs:
deploy-test:
name: Build image, deploy to kind cluster and run tests
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
- name: Create kind cluster
uses: helm/kind-action@v1
with:
cluster_name: gitops-test
- name: Build manager image
run: |
docker build -t ${{ env.IMG }} .
- name: Load image into kind
run: |
kind load docker-image ${{ env.IMG }} --name gitops-test
- name: Install CRDs
run: |
make install
- name: Deploy operator
run: |
make deploy IMG=${{ env.IMG }}
- name: Verify Controller Manager deployment is available
run: |
kubectl wait --for=condition=available --timeout=120s \
deployment/openshift-gitops-operator-controller-manager \
-n openshift-gitops-operator
kubectl get pods -n openshift-gitops-operator