/.github/{scripts, workflows}: performance benchmark async reports

This commit is contained in:
Dustin Brown
2021-08-17 15:13:13 -07:00
parent 81895f1c9e
commit cdbad5a4c8
5 changed files with 96 additions and 56 deletions
@@ -52,6 +52,10 @@ echo '
{
"name": "GOMAXPROCS",
"value": "7"
},
{
"name": "ACTOR_EMAIL",
"value": "'$ACTOR_EMAIL'"
}
],
"args": [
@@ -49,16 +49,14 @@ fi
source "$TEMPLATE_SCRIPT" "$jobname" "$FROM_SERVER" "$FROM_VERSION" "$TO_SERVER" "$TO_VERSION" "$timeprefix" "$actorprefix" "$format" > job.json
KUBECONFIG="$KUBECONFIG" kubectl apply -f job.json
out=$(KUBECONFIG="$KUBECONFIG" kubectl apply -f job.json || true)
out=$(KUBECONFIG="$KUBECONFIG" kubectl wait job/"$jobname" --for=condition=complete -n performance-benchmarking --timeout=7200s || true)
if [ "$out" != "job.batch/$jobname condition met" ]; then
echo "output of kubectl wait: $out"
KUBECONFIG="$KUBECONFIG" kubectl logs job/"$jobname" -n performance-benchmarking
if [ "$out" != "job.batch/$jobname created" ]; then
echo "something went wrong creating job... this job likely already exists in the cluster"
echo "$out"
exit 1
else
echo "::set-output name=object-key::$timeprefix/$actorprefix/comparison-results.log"
KUBECONFIG="$KUBECONFIG" kubectl delete job/"$jobname" -n performance-benchmarking
echo "$out"
fi
exit 0