Skip to content

Commit bbae7f9

Browse files
committed
refactor(ci): simplify
Signed-off-by: Chris Laprun <[email protected]>
1 parent d235d84 commit bbae7f9

File tree

2 files changed

+4
-17
lines changed

2 files changed

+4
-17
lines changed

.github/scripts/testJokeSample.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ NAMESPACE="${1}"
33

44
# Ensure the CRD is installed
55
if ! .github/scripts/waitFor.sh crd $NAMESPACE jokerequests.samples.javaoperatorsdk.io; then
6+
echo "CRD not installed: cannot run the Joke operator"
67
exit 1;
78
fi
89

@@ -11,6 +12,7 @@ kubectl apply -f samples/joke/src/main/k8s/jokerequest.yml
1112

1213
# And wait for the operator to create another Joke resource
1314
if ! .github/scripts/waitFor.sh joke $NAMESPACE NAME; then
15+
echo "Joke was not properly created in response to request"
1416
exit 1;
1517
fi
1618

.github/workflows/build-for-quarkus-version.yml

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -209,16 +209,9 @@ jobs:
209209
PID=$(echo $!)
210210
cd $CURRENT_PWD
211211
212-
ERROR=0
213-
# Wait until the app installed the jokerequest custom resource definition
214-
if ! $SCRIPTS/waitFor.sh crd $K8S_NAMESPACE jokerequests.samples.javaoperatorsdk.io; then
215-
echo "CRD not installed"
216-
ERROR=1
217-
fi
218-
219212
# test joke sample
213+
ERROR=0
220214
if ! $SCRIPTS/testJokeSample.sh $K8S_NAMESPACE; then
221-
echo "Failed to interact with operator"
222215
ERROR=1
223216
fi
224217
@@ -261,15 +254,7 @@ jobs:
261254
cd $CURRENT_PWD
262255
263256
ERROR=0
264-
# Wait until the app installed the jokerequest custom resource definition
265-
if ! $SCRIPTS/waitFor.sh crd $K8S_NAMESPACE jokerequests.samples.javaoperatorsdk.io; then
266-
echo "CRD not installed"
267-
ERROR=1
268-
fi
269-
270-
# test joke sample
271-
if [ ERROR = 0 ] && ! $SCRIPTS/testJokeSample.sh $K8S_NAMESPACE; then
272-
echo "Failed to interact with operator"
257+
if ! $SCRIPTS/testJokeSample.sh $K8S_NAMESPACE; then
273258
ERROR=1
274259
fi
275260

0 commit comments

Comments
 (0)