Skip to content

Commit

Permalink
avoid warning at end of evergreen task
Browse files Browse the repository at this point in the history
Don't try to stop mongo-orchestration and print its log unless task
setup has failed.
  • Loading branch information
ajdavis committed May 15, 2016
1 parent 4b87a90 commit 065081a
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions .mci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -578,14 +578,28 @@ functions:
export ORCHESTRATION_FILE="orchestration_configs/${topology_type}s/${orchestration_file}"
export ORCHESTRATION_URL="http://localhost:8889/v1/${topology_type}s"
export MONGO_ORCHESTRATION_HOME=/tmp/orchestration-home
trap "set +o errexit; mongo-orchestration stop; cat $MONGO_ORCHESTRATION_HOME/server.log" EXIT
# Run this function on exit.
done=false
finish () {
set +o errexit
if [ "$done" = false ]; then
# There was an error.
mongo-orchestration stop
cat $MONGO_ORCHESTRATION_HOME/server.log
fi
}
trap finish EXIT
${set_connection_flags}
${start_mongo_orchestration}
${start_topology}
set +o errexit
${run_integration_tests}
echo "Stopping Mongo Orchestration..."
mongo-orchestration stop
done=true
"report results" :
command: attach.results
Expand Down

0 comments on commit 065081a

Please sign in to comment.