/.github/{scripts,workflows}: complete workflow on successful job creation

This commit is contained in:
Dustin Brown
2021-02-17 12:24:46 -08:00
parent 798ba606d8
commit 3eda0223cd
2 changed files with 24 additions and 34 deletions

View File

@@ -54,14 +54,4 @@ source "$TEMPLATE_SCRIPT" "$jobname" "$FROM_VERSION" "$TO_VERSION" "$timeprefix"
KUBECONFIG="$KUBECONFIG" kubectl apply -f job.json
out=$(KUBECONFIG="$KUBECONFIG" kubectl wait job/"$jobname" --for=condition=complete -n sql-correctness --timeout=7200s || true)
if [ "$out" != "job.batch/$jobname condition met" ]; then
echo "output of kubectl wait: $out"
KUBECONFIG="$KUBECONFIG" kubectl logs job/"$jobname" -n sql-correctness
else
echo "::set-output name=object-key::$timeprefix/$actorprefix/correctness-results.log"
KUBECONFIG="$KUBECONFIG" kubectl delete job/"$jobname" -n sql-correctness
fi
exit 0