Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#!/usr/bin/env bash
debug() {
>&2 echo "DEBUG: $@"
}
error() {
>&2 echo "ERROR: $@"
exit 1
}
set -e
ns=$(./helpers/get_namespace.sh)
cd geosphere-grb/chart
export RELEASE_PREFIX="${CI_JOB_NAME/_/-}-${CI_JOB_ID/_/-}-"
export GRB_RELEASE_NAME="${RELEASE_PREFIX}-cspp-geo-grb"
helm upgrade -v 2 --install --namespace $ns -f ../../ci_tests/values-grb-g16.yaml ${GRB_RELEASE_NAME} cspp-geo-grb/
# give kubernetes a bit to create the pod
sleep 5
GRB_POD_NAME=$(kubectl -n $ns get pods --selector=app.kubernetes.io/instance=${GRB_RELEASE_NAME} -o name)
count=0
while true; do
num_files=$(kubectl exec -n $ns ${GRB_POD_NAME} -- ls -1 /dst/products | wc -l)
let count=count+1
if [[ $num_files -gt 16 ]]; then
debug "Got at least 16 files"
break
fi
if [[ $count -gt 10 ]]; then
error "Took too long for GRB to produce files"
fi
sleep 10
done