Initial CI automation on test for GitOps operator support for xKS #3
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |