@@ -28,8 +28,8 @@ checkDockerRunning() {
28
28
fi
29
29
}
30
30
31
- # # Check the version of the installed CC helm chart
32
- # $1 CC version
31
+ # # Check the appVersion of the CC helm chart in docker.io
32
+ # $1 CC tag in docker.io
33
33
checkCurrentVersion () {
34
34
[ -z " $1 " -o " $1 " = current ] || ARG=" --version $1 "
35
35
V=` helm show all oci://docker.io/vaadin/control-center $ARG 2>&1 | grep " ^appVersion" | cut -d " " -f2`
@@ -38,6 +38,8 @@ checkCurrentVersion() {
38
38
echo $V
39
39
}
40
40
41
+
42
+
41
43
# # Given a platform version check what is the corresponding CC version
42
44
# $1 platform version
43
45
computeCCVersion () {
@@ -51,6 +53,11 @@ computeCCVersion() {
51
53
mvn help:evaluate -Dexpression=project.version -q -DforceStdout
52
54
}
53
55
56
+ # # Check whether the control-center chart is installed and display info
57
+ isCCInstalled () {
58
+ helm list -n control-center | grep -v " ^NAME" | awk ' {print " · "$9" · "$10" · "$4}'
59
+ }
60
+
54
61
# # If the process fails, download the logs of the apps running for inclussion in the CI artifact
55
62
downloadLogs () {
56
63
# this is run after a failure, thus always fail
@@ -157,7 +164,7 @@ hasCCNs() {
157
164
uninstallCC () {
158
165
hasCCNs || return 0
159
166
[ -n " $VERBOSE " ] && HD=--debug && KD=--v=10
160
- runCmd -q " Uninstalling Control-Center " helm uninstall control-center --wait -n $CC_NS $HD
167
+ H= ` isCCInstalled ` && runCmd -q " Uninstalling $H " helm uninstall control-center --wait -n $CC_NS $HD
161
168
runCmd -q " Removing namespace $CC_NS " kubectl delete ns $CC_NS $KD $1
162
169
}
163
170
@@ -292,10 +299,7 @@ runControlCenter() {
292
299
# # Install Control Center
293
300
installCC $1 || return 1
294
301
295
- if [ -z " $TEST " ]; then
296
- H=` helm list -n control-center` || return 1
297
- log " Installed Control-Center is:\n$H "
298
- fi
302
+ [ -z " $TEST " ] && H=` isCCInstalled` && log " Installed Control-Center is: $H "
299
303
300
304
# # Control center takes a long time to start
301
305
waitForCC 900 || return 1
0 commit comments