Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
geosphere-deploy
Manage
Activity
Members
Plan
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container Registry
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
cspp_geo
geosphere
geosphere-deploy
Commits
64096380
Verified
Commit
64096380
authored
4 years ago
by
David Hoese
Browse files
Options
Downloads
Patches
Plain Diff
Refactor run_basic_grb_test.sh to be more easily maintained
parent
5e52db65
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
ci_tests/run_basic_grb_test.sh
+31
-19
31 additions, 19 deletions
ci_tests/run_basic_grb_test.sh
with
31 additions
and
19 deletions
ci_tests/run_basic_grb_test.sh
+
31
−
19
View file @
64096380
...
...
@@ -9,32 +9,44 @@ error() {
exit
1
}
install_charts
()
{
pushd
geosphere-grb/chart
helm upgrade
-v
2
--install
--namespace
$ns
-f
../../ci_tests/values-grb-g16.yaml
${
GRB_RELEASE_NAME
}
cspp-geo-grb/
popd
}
get_pod_name
()
{
release_name
=
"
$1
"
kubectl
-n
$ns
get pods
--selector
=
app.kubernetes.io/instance
=
${
release_name
}
-o
name
}
run_grb_checks
()
{
count
=
0
while
true
;
do
num_files
=
$(
kubectl
exec
-n
$ns
${
GRB_POD_NAME
}
-c
cspp-geo-grb-notifier
--
ls
-1
/dst |
wc
-l
||
echo
0
)
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
}
set
-e
ns
=
$(
./helpers/get_namespace.sh
)
source
ci_tests/get_release_names.sh
pushd
geosphere-grb/chart
helm upgrade
-v
2
--install
--namespace
$ns
-f
../../ci_tests/values-grb-g16.yaml
${
GRB_RELEASE_NAME
}
cspp-geo-grb/
popd
install_charts
# give kubernetes a bit to create the pod
sleep
30
debug
"Getting pod name"
GRB_POD_NAME
=
$(
kubectl
-n
$ns
get
pod
s
--selector
=
app.kubernetes.io/instance
=
${
GRB_RELEASE_NAME
}
-o
name
)
debug
"Getting
GRB
pod name"
GRB_POD_NAME
=
$(
get
_
pod
_name
"
${
GRB_RELEASE_NAME
}
"
)
debug
"GRB pod name:
${
GRB_POD_NAME
}
"
count
=
0
while
true
;
do
num_files
=
$(
kubectl
exec
-n
$ns
${
GRB_POD_NAME
}
-c
cspp-geo-grb-notifier
--
ls
-1
/dst |
wc
-l
||
echo
0
)
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
run_grb_checks
||
error
"GRB checks failed"
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment