Skip to content

Commit 231d5d1

Browse files
committed
[FlINK-36392] Split out a smoke test job
1 parent cac5a1c commit 231d5d1

File tree

1 file changed

+65
-32
lines changed

1 file changed

+65
-32
lines changed

.github/workflows/ci.yml

Lines changed: 65 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,69 @@ jobs:
6464
cd flink-autoscaler-plugin-jdbc
6565
mvn -B verify -Dit.skip=false
6666
cd ..
67+
e2e_smoketest:
68+
name: HTTP Client smoke test
69+
runs-on: ubuntu-latest
70+
strategy:
71+
matrix:
72+
http-client: [ "okhttp", "jdk", "jetty", "vertx" ]
73+
version: ["v1_20"]
74+
mode: ["native"]
75+
namespace: ["default"]
76+
java-version: ["21"]
77+
test:
78+
- test_application_operations.sh
79+
steps:
80+
- uses: actions/checkout@v4
81+
- name: Set up JDK ${{ matrix.java-version }}
82+
uses: actions/setup-java@v4
83+
with:
84+
java-version: ${{ matrix.java-version }}
85+
distribution: 'temurin'
86+
cache: 'maven'
87+
- name: Start minikube
88+
run: |
89+
source e2e-tests/utils.sh
90+
start_minikube
91+
- name: Install cert-manager
92+
run: |
93+
kubectl get pods -A
94+
kubectl apply -f https://github.com/jetstack/cert-manager/releases/download/v1.8.2/cert-manager.yaml
95+
kubectl -n cert-manager wait --all=true --for=condition=Available --timeout=300s deploy
96+
- name: Build image
97+
run: |
98+
export SHELL=/bin/bash
99+
export DOCKER_BUILDKIT=1
100+
eval $(minikube -p minikube docker-env)
101+
HTTP_CLIENT=${{ matrix.http-client }}
102+
docker build --progress=plain --no-cache -f ./Dockerfile -t flink-kubernetes-operator:ci-latest --progress plain --build-arg HTTP_CLIENT="${HTTP_CLIENT:-okhttp}" .
103+
docker images
104+
- name: Start the operator
105+
run: |
106+
if [[ "${{ matrix.test }}" == "test_flink_operator_ha.sh" ]]; then
107+
sed -i "s/# kubernetes.operator.leader-election.enabled: false/kubernetes.operator.leader-election.enabled: true/" helm/flink-kubernetes-operator/conf/flink-conf.yaml
108+
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
109+
sed -i "s/replicas: 1/replicas: 2/" helm/flink-kubernetes-operator/values.yaml
110+
fi
111+
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 }}
112+
kubectl wait --for=condition=Available --timeout=120s -n ${{ matrix.namespace }} deploy/flink-kubernetes-operator
113+
kubectl get pods -n ${{ matrix.namespace }}
114+
- name: Run Flink e2e tests
115+
run: |
116+
sed -i "s/image: flink:.*/image: ${{ matrix.image }}/" e2e-tests/data/*.yaml
117+
sed -i "s/flinkVersion: .*/flinkVersion: ${{ matrix.version }}/" e2e-tests/data/*.yaml
118+
sed -i "s/mode: .*/mode: ${{ matrix.mode }}/" e2e-tests/data/*.yaml
119+
git diff HEAD
120+
echo "Running e2e-tests/$test"
121+
bash e2e-tests/${{ matrix.test }} || exit 1
122+
git reset --hard
123+
- name: Stop the operator
124+
run: |
125+
helm uninstall -n ${{ matrix.namespace }} flink-kubernetes-operator
126+
- name: Stop minikube
127+
run: |
128+
source e2e-tests/utils.sh
129+
stop_minikube
67130
e2e_ci:
68131
runs-on: ubuntu-latest
69132
strategy:
@@ -72,7 +135,6 @@ jobs:
72135
namespace: ["default","flink"]
73136
mode: ["native", "standalone"]
74137
java-version: [ 11, 17, 21 ]
75-
http-client: [ "okhttp" ]
76138
test:
77139
- test_application_kubernetes_ha.sh
78140
- test_application_operations.sh
@@ -96,34 +158,6 @@ jobs:
96158
image: flink:1.17
97159
- version: v1_16
98160
image: flink:1.16
99-
- version: v1_20
100-
# Version isn't critical but should ideally be latest.
101-
mode: "native"
102-
namespace: "default"
103-
test: test_application_operations.sh
104-
http-client: "okhttp"
105-
java-version: 21
106-
- version: v1_20
107-
# Version isn't critical but should ideally be latest.
108-
mode: "native"
109-
namespace: "default"
110-
test: test_application_operations.sh
111-
http-client: "vertx"
112-
java-version: 21
113-
- version: v1_20
114-
# Version isn't critical but should ideally be latest.
115-
mode: "native"
116-
namespace: "default"
117-
test: test_application_operations.sh
118-
http-client: "jetty"
119-
java-version: 21
120-
- version: v1_20
121-
# Version isn't critical but should ideally be latest.
122-
mode: "native"
123-
namespace: "default"
124-
test: test_application_operations.sh
125-
http-client: "jdk"
126-
java-version: 21
127161
exclude:
128162
- namespace: default
129163
test: test_multi_sessionjob.sh
@@ -192,8 +226,7 @@ jobs:
192226
export SHELL=/bin/bash
193227
export DOCKER_BUILDKIT=1
194228
eval $(minikube -p minikube docker-env)
195-
HTTP_CLIENT=${{ matrix.http-client }}
196-
docker build --progress=plain --no-cache -f ./Dockerfile -t flink-kubernetes-operator:ci-${{ matrix.http-client }}-latest --progress plain --build-arg HTTP_CLIENT="${HTTP_CLIENT:-okhttp}" .
229+
docker build --progress=plain --no-cache -f ./Dockerfile -t flink-kubernetes-operator:ci-latest --progress plain .
197230
docker images
198231
- name: Start the operator
199232
run: |
@@ -202,7 +235,7 @@ jobs:
202235
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
203236
sed -i "s/replicas: 1/replicas: 2/" helm/flink-kubernetes-operator/values.yaml
204237
fi
205-
helm --debug install flink-kubernetes-operator -n ${{ matrix.namespace }} helm/flink-kubernetes-operator --set image.repository=flink-kubernetes-operator --set image.tag=ci-${{ matrix.http-client }}-latest ${{ matrix.extraArgs }}
238+
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 }}
206239
kubectl wait --for=condition=Available --timeout=120s -n ${{ matrix.namespace }} deploy/flink-kubernetes-operator
207240
kubectl get pods -n ${{ matrix.namespace }}
208241
- name: Run Flink e2e tests

0 commit comments

Comments
 (0)