Skip to content

Commit 1b70ea0

Browse files
committed
[FlINK-36332] Split out a smoke test job
1 parent dd332cb commit 1b70ea0

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
@@ -67,6 +67,69 @@ jobs:
6767
cd flink-autoscaler-plugin-jdbc
6868
mvn -B verify -Dit.skip=false
6969
cd ..
70+
e2e_smoketest:
71+
name: HTTP Client smoke test
72+
runs-on: ubuntu-latest
73+
strategy:
74+
matrix:
75+
http-client: [ "okhttp", "jdk", "jetty", "vertx" ]
76+
version: ["v1_20"]
77+
mode: ["native"]
78+
namespace: ["default"]
79+
java-version: ["21"]
80+
test:
81+
- test_application_operations.sh
82+
steps:
83+
- uses: actions/checkout@v4
84+
- name: Set up JDK ${{ matrix.java-version }}
85+
uses: actions/setup-java@v4
86+
with:
87+
java-version: ${{ matrix.java-version }}
88+
distribution: 'temurin'
89+
cache: 'maven'
90+
- name: Start minikube
91+
run: |
92+
source e2e-tests/utils.sh
93+
start_minikube
94+
- name: Install cert-manager
95+
run: |
96+
kubectl get pods -A
97+
kubectl apply -f https://github.com/jetstack/cert-manager/releases/download/v1.8.2/cert-manager.yaml
98+
kubectl -n cert-manager wait --all=true --for=condition=Available --timeout=300s deploy
99+
- name: Build image
100+
run: |
101+
export SHELL=/bin/bash
102+
export DOCKER_BUILDKIT=1
103+
eval $(minikube -p minikube docker-env)
104+
HTTP_CLIENT=${{ matrix.http-client }}
105+
docker build --progress=plain --no-cache -f ./Dockerfile -t flink-kubernetes-operator:ci-latest --progress plain --build-arg HTTP_CLIENT="${HTTP_CLIENT:-okhttp}" .
106+
docker images
107+
- name: Start the operator
108+
run: |
109+
if [[ "${{ matrix.test }}" == "test_flink_operator_ha.sh" ]]; then
110+
sed -i "s/# kubernetes.operator.leader-election.enabled: false/kubernetes.operator.leader-election.enabled: true/" helm/flink-kubernetes-operator/conf/flink-conf.yaml
111+
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
112+
sed -i "s/replicas: 1/replicas: 2/" helm/flink-kubernetes-operator/values.yaml
113+
fi
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 ${{ matrix.extraArgs }}
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
70133
e2e_ci:
71134
runs-on: ubuntu-latest
72135
strategy:
@@ -75,7 +138,6 @@ jobs:
75138
namespace: ["default","flink"]
76139
mode: ["native", "standalone"]
77140
java-version: [ 11, 17, 21 ]
78-
http-client: [ "okhttp", "vertx", "jetty", "jdk" ]
79141
test:
80142
- test_application_kubernetes_ha.sh
81143
- test_application_operations.sh
@@ -99,34 +161,6 @@ jobs:
99161
image: flink:1.17
100162
- version: v1_16
101163
image: flink:1.16
102-
- version: v1_20
103-
# Version isn't critical but should ideally be latest.
104-
mode: "native"
105-
namespace: "default"
106-
test: test_application_operations.sh
107-
http-client: "okhttp"
108-
java-version: 21
109-
- version: v1_20
110-
# Version isn't critical but should ideally be latest.
111-
mode: "native"
112-
namespace: "default"
113-
test: test_application_operations.sh
114-
http-client: "vertx"
115-
java-version: 21
116-
- version: v1_20
117-
# Version isn't critical but should ideally be latest.
118-
mode: "native"
119-
namespace: "default"
120-
test: test_application_operations.sh
121-
http-client: "jetty"
122-
java-version: 21
123-
- version: v1_20
124-
# Version isn't critical but should ideally be latest.
125-
mode: "native"
126-
namespace: "default"
127-
test: test_application_operations.sh
128-
http-client: "jdk"
129-
java-version: 21
130164
exclude:
131165
- namespace: default
132166
test: test_multi_sessionjob.sh
@@ -196,8 +230,7 @@ jobs:
196230
export DOCKER_BUILDKIT=1
197231
eval $(minikube -p minikube docker-env)
198232
export JAVA_VERSION=${{ matrix.java-version }}
199-
export HTTP_CLIENT=${{ matrix.http-client }}
200-
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}" .
233+
docker build --progress=plain --no-cache -f ./Dockerfile -t flink-kubernetes-operator:ci-latest --progress plain --build-arg JAVA_VERSION="${JAVA_VERSION:-11}" .
201234
docker images
202235
- name: Start the operator
203236
run: |
@@ -206,7 +239,7 @@ jobs:
206239
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
207240
sed -i "s/replicas: 1/replicas: 2/" helm/flink-kubernetes-operator/values.yaml
208241
fi
209-
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 }}
242+
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 }}
210243
kubectl wait --for=condition=Available --timeout=120s -n ${{ matrix.namespace }} deploy/flink-kubernetes-operator
211244
kubectl get pods -n ${{ matrix.namespace }}
212245
- name: Run Flink e2e tests

0 commit comments

Comments
 (0)