@@ -172,9 +172,6 @@ jobs:
172172 - name : Build with Maven (JVM)
173173 run : mvn -B formatter:validate install -P'${{steps.set-mvn-profiles.outputs.maven_profiles}}' --file pom.xml
174174
175- - name : Build with Maven (Native)
176- run : mvn -B install -Dnative --file pom.xml -P'${{steps.set-mvn-profiles.outputs.maven_profiles}}' -pl '${{inputs.native-modules}}' -amd
177-
178175 - name : Kubernetes KinD Cluster
179176 uses : container-tools/kind-action@v2
180177 with :
@@ -231,6 +228,41 @@ jobs:
231228 name : dev-mode-app.log
232229 path : samples/joke/app.log
233230
231+ - name : Build with Maven (Native)
232+ run : mvn -B install -Dnative --file pom.xml -P'${{steps.set-mvn-profiles.outputs.maven_profiles}}' -pl '${{inputs.native-modules}}' -amd
233+
234+ - name : Run Joke sample in native mode
235+ run : |
236+ SCRIPTS=$(pwd)/.github/scripts
237+ K8S_NAMESPACE=native
238+ CURRENT_PWD=$(pwd)
239+
240+ # Create and set namespace
241+ kubectl create namespace $K8S_NAMESPACE
242+ kubectl config set-context --current --namespace=$K8S_NAMESPACE
243+
244+ # Run operator in native mode
245+ cd samples/joke
246+ nohup find . -type f -name '*-runner' -exec {} \; >native.log 2>&1 &
247+ PID=$(echo $!)
248+ cd $CURRENT_PWD
249+
250+ # Wait until the app installed the jokerequest custom resource definition
251+ if ! $SCRIPTS/waitFor.sh crd $K8S_NAMESPACE jokerequests.samples.javaoperatorsdk.io; then
252+ exit 1;
253+ fi
254+
255+ # test joke sample
256+ if ! $SCRIPTS/testJokeSample.sh $K8S_NAMESPACE; then
257+ exit 1;
258+ fi;
259+
260+ # Kill running process
261+ kill -9 $PID
262+
263+ # Delete namespace
264+ kubectl delete namespace $K8S_NAMESPACE
265+
234266 - name : Run Joke sample into Kubernetes using OLM
235267 run : |
236268 SCRIPTS=$(pwd)/.github/scripts
0 commit comments