-
Notifications
You must be signed in to change notification settings - Fork 28
98 lines (85 loc) · 3.27 KB
/
olm-verify.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
name: Precommit - OLM verify
on:
pull_request:
branches:
- '*'
paths-ignore:
- 'docs/**'
- 'README.md'
- 'CHANGELOG.md'
- 'PROJECT'
- 'LICENSE'
- 'mesh-worker-service/README.md'
- 'tools/README.md'
jobs:
olm-verify:
name: Verify OLM bundle
runs-on: ubuntu-latest
steps:
- name: clean disk
run: |
sudo swapoff -a
sudo rm -rf /swapfile /usr/share/dotnet /usr/local/lib/android /opt/ghc
sudo apt clean
docker rmi $(docker images -q) -f
df -h
- name: checkout
uses: actions/checkout@v2
- name: Set up GO 1.22.3
uses: actions/setup-go@v1
with:
go-version: 1.22.3
id: go
- name: InstallKubebuilder
run: |
curl -L -o kubebuilder "https://github.com/kubernetes-sigs/kubebuilder/releases/download/v3.6.0/kubebuilder_linux_amd64"
chmod +x kubebuilder && mv kubebuilder /usr/local/bin/
- name: Install operator-sdk
run: |
RELEASE_VERSION=v1.14.0
curl -LO "https://github.com/operator-framework/operator-sdk/releases/download/${RELEASE_VERSION}/operator-sdk_linux_amd64"
chmod +x operator-sdk_linux_amd64 && sudo mkdir -p /usr/local/bin/ && sudo mv operator-sdk_linux_amd64 /usr/local/bin/operator-sdk
- name: Set up yq
run: |
sudo wget https://github.com/mikefarah/yq/releases/download/v4.30.4/yq_linux_amd64 -O /usr/bin/yq
sudo chmod +x /usr/bin/yq
yq --help
- name: Kubernetes KinD Cluster
uses: container-tools/kind-action@v1
with:
node_image: kindest/node:v1.23.17
- name: Build RedHat certificated bundle And Publish to Quay
env:
DOCKER_REPO: kind-registry:5000/streamnativeio
IMAGE_TAG_BASE: kind-registry:5000/streamnativeio/function-mesh
CATALOG_BRANCH_TAG: latest
run: |
echo $VERSION
make redhat-certificated-image-build redhat-certificated-image-push redhat-certificated-bundle redhat-certificated-bundle-build redhat-certificated-bundle-push catalog-build catalog-push
- name: Install the Operator Lifecycle Manager
run: |
operator-sdk olm install --version v0.21.2
operator-sdk olm status
kubectl get pods -n olm
- name: Adding the catalog containing function mesh Operator
run: |
kubectl apply -f .ci/olm-tests/catalog.yml
kubectl get catalogsource -n olm
kubectl get catalogsource my-test-catalog -n olm -o yaml
kubectl get pod -n olm
sleep 60
kubectl -n olm wait --for=condition=ready pod -l olm.catalogSource=my-test-catalog --timeout=600s
kubectl get catalogsource my-test-catalog -n olm -o yaml
- name: Create an OperatorGroup
run: |
kubectl apply -f .ci/olm-tests/operatorgroup.yml
- name: Create a Subscription
run: |
kubectl apply -f .ci/olm-tests/subs.yml
sleep 60
- name: Verify Operator health
run: |
kubectl wait deployment/function-mesh-controller-manager --for=condition=Available --timeout=600s
- name: Setup tmate session
uses: mxschmitt/action-tmate@v3
if: failure()