This repository was archived by the owner on Jan 4, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +25
-3
lines changed Expand file tree Collapse file tree 1 file changed +25
-3
lines changed Original file line number Diff line number Diff line change @@ -47,10 +47,10 @@ jobs:
47
47
run : mvn -B test -q --file tomcat/pom.xml
48
48
49
49
- name : Get webapps
50
- if : ${{ failure() }}
50
+ # if: ${{ failure() }}
51
51
run : |
52
52
kubectl get tomcats,webapps -A -o yaml | tee -a debug
53
- kubectl logs
53
+ kubectl -n tomcat-test -c tomcat logs -l app=test-tomcat1 | grep startup
54
54
55
55
tomcat_local_apply_setup_test :
56
56
runs-on : ubuntu-latest
@@ -182,5 +182,27 @@ jobs:
182
182
echo "loop number $LOOP" &&\
183
183
sleep 5; \
184
184
done
185
+ #Waiting 5 seconds for Tomcat to unpack the downloaded war
186
+ sleep 5;
185
187
186
-
188
+ - name : Get webapps
189
+ # if: ${{ failure() }}
190
+ run : |
191
+ kubectl get tomcats,webapps -A -o yaml | tee -a debug
192
+ kubectl -n tomcat-test -c tomcat logs -l app=test-tomcat1 | grep startup
193
+
194
+ - name : check code
195
+ run : |
196
+ kubectl -n tomcatoperator-sample run sample1 --labels=app=curl --image=curlimages/curl:7.78.0 --restart=Never --timeout=30s --command -- curl -s -v http://test-tomcat1/mysample/;
197
+ kubectl -n tomcatoperator-sample run sample2 --labels=app=curl --image=curlimages/curl:7.78.0 --restart=Never --timeout=30s --command -- curl -s -v http://test-tomcat2/othercontext/;
198
+ LOOP=0 &&\
199
+ while [[ $(kubectl get pods -n tomcatoperator-sample -l app=curl -o 'jsonpath={..status.phase}') != "Succeeded Succeeded" ]]; do \
200
+ echo "waiting for pod" &&\
201
+ kubectl logs -n tomcatoperator-sample -l app=curl &&\
202
+ (( LOOP++ )) &&\
203
+ if [[ $LOOP -gt 5 ]]; then exit 1; fi &&\
204
+ echo "loop number $LOOP" &&\
205
+ sleep 5; \
206
+ done
207
+ if [[ $(kubectl logs -n tomcatoperator-sample sample1 --tail=500 | grep tomcat.gif | wc -l) -ne 1 ]]; then exit 1; fi
208
+ if [[ $(kubectl logs -n tomcatoperator-sample sample2 --tail=500 | grep dog.jpeg | wc -l) -ne 1 ]]; then exit 1; fi
You can’t perform that action at this time.
0 commit comments