28
28
29
29
readonly STABLE=${1:- stable}
30
30
readonly PRERELEASE=${2:- $(cat VERSION)-$(git rev-parse HEAD)}
31
- readonly CI_SLEEP=${CI_SLEEP:- 5 }
31
+ readonly CI_SLEEP=${CI_SLEEP:- 1 }
32
32
readonly CI=${CI:- }
33
33
readonly STABLE_TOPIC=${STABLE_TOPIC:- stable}
34
34
readonly PRERELEASE_TOPIC=${PRERELEASE_TOPIC:- prerelease}
@@ -52,7 +52,11 @@ function cleanup() {
52
52
# If we're in CI, we want to slow down execution
53
53
# to give CPU some time to rest, so we don't time out
54
54
function ci_check() {
55
- :
55
+ if [[ " $FLUVIO_MODE " == " local" ]]; then
56
+ sleep $CI_SLEEP
57
+ else
58
+ :
59
+ fi
56
60
}
57
61
58
62
# This function is intended to be run second after the Stable-1 validation
@@ -97,13 +101,15 @@ function validate_cluster_stable() {
97
101
# $STABLE_FLUVIO topic create ${STABLE_TOPIC}-delete
98
102
ci_check;
99
103
100
- echo " Create mirror"
101
- $STABLE_FLUVIO remote register stable-remote
104
+ # echo "Create mirror"
105
+ # $STABLE_FLUVIO remote register stable-remote
106
+ # ci_check;
102
107
103
108
# Validate consume on topic before produce
104
109
# https://github.com/infinyon/fluvio/issues/1819
105
110
echo " Validate consume on \" ${STABLE_TOPIC} \" before producing"
106
111
$STABLE_FLUVIO consume -B -d ${STABLE_TOPIC} 2> /dev/null
112
+ ci_check;
107
113
108
114
echo " Producing test data to ${STABLE_TOPIC} "
109
115
cat data1.txt.tmp | $STABLE_FLUVIO produce ${STABLE_TOPIC}
@@ -128,6 +134,7 @@ function validate_cluster_stable() {
128
134
129
135
130
136
$STABLE_FLUVIO partition list
137
+ ci_check;
131
138
132
139
}
133
140
@@ -151,7 +158,7 @@ function validate_upgrade_cluster_to_prerelease() {
151
158
~ /.fvm/bin/fvm install latest | tee /tmp/installer.output
152
159
# expectd output fvm current => 0.11.0-dev-1+hash (latest)
153
160
DEV_VERSION=$( ~/.fvm/bin/fvm current | awk ' {print $1}' )
154
- TARGET_VERSION=${PRERELEASE : 0: ${# PRERELEASE } -41}
161
+ TARGET_VERSION=${DEV_VERSION : 0: ${# DEV_VERSION } -41}
155
162
156
163
echo " Installed CLI version ${DEV_VERSION} "
157
164
echo " Upgrading cluster to ${DEV_VERSION} "
@@ -172,11 +179,12 @@ function validate_upgrade_cluster_to_prerelease() {
172
179
fi
173
180
if [[ " $FLUVIO_MODE " == " local" ]]; then
174
181
echo " Resuming local cluster"
175
- sleep 5
182
+ ci_check ;
176
183
$FLUVIO_BIN_ABS_PATH cluster resume
177
184
fi
178
185
popd
179
186
187
+ ci_check;
180
188
181
189
# Validate that the development version output matches the expected version from installer output
182
190
$FLUVIO_BIN_ABS_PATH version
@@ -324,6 +332,8 @@ function main() {
324
332
echo " Update cluster to stable v${STABLE} . Create and validate data."
325
333
validate_cluster_stable;
326
334
335
+ ci_check;
336
+
327
337
echo " Update cluster to prerelease v${PRERELEASE} "
328
338
validate_upgrade_cluster_to_prerelease;
329
339
0 commit comments