File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Build, Push, Deploy and Test on kind
2+
3+ on :
4+ pull_request :
5+ branches :
6+ - ' *'
7+
8+ env :
9+ IMG : quay.io/redhat-developer/gitops-operator:pr-${{ github.event.pull_request.number }}-${{ github.run_id }}
10+
11+ jobs :
12+ deploy-test :
13+ name : Build image, deploy to kind cluster and run tests
14+ runs-on : ubuntu-latest
15+ steps :
16+ - name : Checkout code
17+ uses : actions/checkout@v4
18+
19+ - name : Setup Go
20+ uses : actions/setup-go@v5
21+ with :
22+ go-version-file : ' go.mod'
23+
24+ - name : Log in to Quay.io
25+ uses : docker/login-action@v3
26+ with :
27+ registry : quay.io
28+ username : ${{ secrets.QUAY_USERNAME }}
29+ password : ${{ secrets.QUAY_PASSWORD }}
30+
31+ - name : Build manager image with TTL label
32+ run : |
33+ docker build -t ${{ env.IMG }} --label quay.expires-after=1d .
34+
35+ - name : Push image to Quay.io
36+ run : |
37+ docker push ${{ env.IMG }}
38+
39+ - name : Create kind cluster
40+ uses : helm/kind-action@v1
41+ with :
42+ cluster_name : gitops-test
43+
44+ - name : Install CRDs
45+ run : |
46+ make install
47+
48+ - name : Deploy operator
49+ run : |
50+ make deploy IMG=${{ env.IMG }}
51+
52+ - name : Verify Controller Manager deployment is available
53+ run : |
54+ kubectl wait --for=condition=available --timeout=120s \
55+ deployment/openshift-gitops-operator-controller-manager \
56+ -n openshift-gitops-operator
57+ kubectl get pods -n openshift-gitops-operator
You can’t perform that action at this time.
0 commit comments