summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--etc/evergreen.yml25
1 files changed, 25 insertions, 0 deletions
diff --git a/etc/evergreen.yml b/etc/evergreen.yml
index 28972bc957e..fd27b1c45fe 100644
--- a/etc/evergreen.yml
+++ b/etc/evergreen.yml
@@ -161,6 +161,30 @@ functions:
build_phase='${task_name}_${execution}'
END_OF_CREDS
+ "call BF Suggestion service":
+ command: shell.exec
+ params:
+ working_dir: src
+ silent: true
+ script: |
+ report_file="report.json"
+ # Check if the report file exists and has failures.
+ if [ -f $report_file ] && grep -Eq "\"failures\": [1-9]" $report_file; then
+ # Calling the BF Suggestion server endpoint to start feature extraction.
+ payload="{\"task_id\": \"${task_id}\", \"execution\": ${execution}}"
+ echo "Sending task info to the BF suggestion service"
+ # The --user option is passed through stdin to avoid showing in process list.
+ user_option="--user ${bfsuggestion_user}:${bfsuggestion_password}"
+ curl --header "Content-Type: application/json" \
+ --data "$payload" \
+ --max-time 10 \
+ --silent \
+ --show-error \
+ --config - \
+ https://bfsuggestion.corp.mongodb.com/tasks <<< $user_option
+ echo "Request to BF Suggestion service status: $?"
+ fi
+
"upload debugsymbols" :
command: s3.put
params:
@@ -486,6 +510,7 @@ post:
- command: attach.results
params:
file_location: src/report.json
+ - func: "call BF Suggestion service"
- command: shell.exec
params:
silent: true