Skip to content

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

Initial CI automation on test for GitOps operator support for xKS

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

Workflow file for this run

name: Build, Push, Deploy and Test on kind
on:
pull_request:
branches:
- '*'
env:
IMG: quay.io/redhat-developer/gitops-operator:pr-${{ github.event.pull_request.number }}-${{ github.run_id }}
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: Log in to Quay.io
uses: docker/login-action@v3
with:
registry: quay.io
username: ${{ secrets.QUAY_USERNAME }}
password: ${{ secrets.QUAY_PASSWORD }}
- name: Build manager image with TTL label
run: |
docker build -t ${{ env.IMG }} --label quay.expires-after=1d .
- name: Push image to Quay.io
run: |
docker push ${{ env.IMG }}
- name: Create kind cluster
uses: helm/kind-action@v1
with:
cluster_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