Skip to content

Commit 63e0e73

Browse files
committed
[FLINK-36460] Split out a job for tests outside the default namespace
1 parent 7ffae7c commit 63e0e73

File tree

1 file changed

+63
-14
lines changed

1 file changed

+63
-14
lines changed

.github/workflows/ci.yml

Lines changed: 63 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,66 @@ jobs:
109109
HTTP_CLIENT=${{ matrix.http-client }}
110110
docker build --progress=plain --no-cache -f ./Dockerfile -t flink-kubernetes-operator:ci-latest --progress plain --build-arg JAVA_VERSION="${JAVA_VERSION:-11}" --build-arg HTTP_CLIENT="${HTTP_CLIENT:-okhttp}" .
111111
docker images
112+
- name: Start the operator
113+
run: |
114+
helm --debug install flink-kubernetes-operator -n ${{ matrix.namespace }} helm/flink-kubernetes-operator --set image.repository=flink-kubernetes-operator --set image.tag=ci-latest --create-namespace --set "watchNamespaces={default,flink}"
115+
kubectl wait --for=condition=Available --timeout=120s -n ${{ matrix.namespace }} deploy/flink-kubernetes-operator
116+
kubectl get pods -n ${{ matrix.namespace }}
117+
- name: Run Flink e2e tests
118+
run: |
119+
sed -i "s/image: flink:.*/image: ${{ matrix.image }}/" e2e-tests/data/*.yaml
120+
sed -i "s/flinkVersion: .*/flinkVersion: ${{ matrix.version }}/" e2e-tests/data/*.yaml
121+
sed -i "s/mode: .*/mode: ${{ matrix.mode }}/" e2e-tests/data/*.yaml
122+
git diff HEAD
123+
echo "Running e2e-tests/$test"
124+
bash e2e-tests/${{ matrix.test }} || exit 1
125+
git reset --hard
126+
- name: Stop the operator
127+
run: |
128+
helm uninstall -n ${{ matrix.namespace }} flink-kubernetes-operator
129+
- name: Stop minikube
130+
run: |
131+
source e2e-tests/utils.sh
132+
stop_minikube
133+
e2e_namespace_tests:
134+
name: Test outside the default namespaces
135+
runs-on: ubuntu-latest
136+
needs: e2e_smoke_test
137+
strategy:
138+
matrix:
139+
version: ["v1_20"]
140+
mode: ["native", "standalone"]
141+
namespace: ["flink"]
142+
java-version: ["11"]
143+
test:
144+
- test_application_operations.sh
145+
- test_multi_sessionjob.sh
146+
- test_autoscaler.sh
147+
- test_dynamic_config.sh
148+
steps:
149+
- uses: actions/checkout@v4
150+
- name: Set up JDK ${{ matrix.java-version }}
151+
uses: actions/setup-java@v4
152+
with:
153+
java-version: ${{ matrix.java-version }}
154+
distribution: 'temurin'
155+
cache: 'maven'
156+
- name: Start minikube
157+
run: |
158+
source e2e-tests/utils.sh
159+
start_minikube
160+
- name: Install cert-manager
161+
run: |
162+
kubectl get pods -A
163+
kubectl apply -f https://github.com/jetstack/cert-manager/releases/download/v1.8.2/cert-manager.yaml
164+
kubectl -n cert-manager wait --all=true --for=condition=Available --timeout=300s deploy
165+
- name: Build image
166+
run: |
167+
export SHELL=/bin/bash
168+
export DOCKER_BUILDKIT=1
169+
eval $(minikube -p minikube docker-env)
170+
docker build --progress=plain --no-cache -f ./Dockerfile -t flink-kubernetes-operator:ci-latest --progress plain .
171+
docker images
112172
- name: Start the operator
113173
run: |
114174
source e2e-tests/utils.sh
@@ -133,26 +193,22 @@ jobs:
133193
source e2e-tests/utils.sh
134194
stop_minikube
135195
e2e_ci:
196+
name: e2e_ci
136197
needs: e2e_smoke_test
137198
runs-on: ubuntu-latest
138199
strategy:
139200
matrix:
140201
version: ["v1_20","v1_19","v1_18","v1_17","v1_16"]
141-
namespace: ["default","flink"]
202+
namespace: ["default"]
142203
mode: ["native", "standalone"]
143204
java-version: [ 11 ]
144205
test:
145206
- test_application_kubernetes_ha.sh
146-
- test_dynamic_config.sh
147207
- test_sessionjob_kubernetes_ha.sh
148208
- test_sessionjob_operations.sh
149-
- test_multi_sessionjob.sh
150-
- test_autoscaler.sh
151209
- test_flink_operator_ha.sh
152210
- test_snapshot.sh
153211
include:
154-
- namespace: flink
155-
extraArgs: '--create-namespace --set "watchNamespaces={default,flink}"'
156212
- version: v1_20
157213
image: flink:1.20
158214
- version: v1_19
@@ -164,12 +220,6 @@ jobs:
164220
- version: v1_16
165221
image: flink:1.16
166222
exclude:
167-
- namespace: default
168-
test: test_multi_sessionjob.sh
169-
- namespace: default
170-
test: test_autoscaler.sh
171-
- namespace: default
172-
test: test_dynamic_config.sh
173223
- mode: standalone
174224
test: test_autoscaler.sh
175225
- mode: standalone
@@ -208,7 +258,6 @@ jobs:
208258
java-version: 21
209259
- version: v1_18
210260
java-version: 21
211-
name: e2e_ci
212261
steps:
213262
- uses: actions/checkout@v4
214263
- name: Set up JDK ${{ matrix.java-version }}
@@ -241,7 +290,7 @@ jobs:
241290
sed -i "s/# kubernetes.operator.leader-election.lease-name: flink-operator-lease/kubernetes.operator.leader-election.lease-name: flink-operator-lease/" helm/flink-kubernetes-operator/conf/flink-conf.yaml
242291
sed -i "s/replicas: 1/replicas: 2/" helm/flink-kubernetes-operator/values.yaml
243292
fi
244-
helm --debug install flink-kubernetes-operator -n ${{ matrix.namespace }} helm/flink-kubernetes-operator --set image.repository=flink-kubernetes-operator --set image.tag=ci-latest ${{ matrix.extraArgs }}
293+
helm --debug install flink-kubernetes-operator -n ${{ matrix.namespace }} helm/flink-kubernetes-operator --set image.repository=flink-kubernetes-operator --set image.tag=ci-latest
245294
kubectl wait --for=condition=Available --timeout=120s -n ${{ matrix.namespace }} deploy/flink-kubernetes-operator
246295
kubectl get pods -n ${{ matrix.namespace }}
247296
- name: Run Flink e2e tests

0 commit comments

Comments
 (0)