@@ -53,7 +53,16 @@ while read -r config; do
5353 fi
5454
5555 FULL_COMMAND=" node scripts/functional_tests --bail --config $config $EXTRA_ARGS "
56- echo " --- $ $FULL_COMMAND "
56+
57+ CONFIG_EXECUTION_KEY=" ${config} _executed"
58+ IS_CONFIG_EXECUTION=$( buildkite-agent meta-data get " $CONFIG_EXECUTION_KEY " --default " false" --log-level error)
59+
60+ if [[ " ${IS_CONFIG_EXECUTION} " == " true" ]]; then
61+ echo " --- [ already-tested ] $FULL_COMMAND "
62+ continue
63+ else
64+ echo " --- $ $FULL_COMMAND "
65+ fi
5766
5867 start=$( date +%s)
5968
@@ -80,6 +89,17 @@ while read -r config; do
8089 lastCode=$?
8190 set -e;
8291
92+ # Scout reporter
93+ if [[ " ${SCOUT_REPORTER_ENABLED:- } " =~ ^(1| true)$ ]]; then
94+ # Upload events after running each config
95+ echo " Upload Scout reporter events to AppEx QA's team cluster for config $config "
96+ node scripts/scout upload-events --dontFailOnError
97+ echo " Upload successful, removing local events at .scout/reports"
98+ rm -rf .scout/reports
99+ else
100+ echo " SCOUT_REPORTER_ENABLED=$SCOUT_REPORTER_ENABLED , skipping event upload."
101+ fi
102+
83103 timeSec=$(( $(date +% s)- start))
84104 if [[ $timeSec -gt 60 ]]; then
85105 min=$(( timeSec/ 60 ))
@@ -93,7 +113,10 @@ while read -r config; do
93113 duration: ${duration}
94114 result: ${lastCode} " )
95115
96- if [ $lastCode -ne 0 ]; then
116+ if [ $lastCode -eq 0 ]; then
117+ # Test was successful, so mark it as executed
118+ buildkite-agent meta-data set " $CONFIG_EXECUTION_KEY " " true"
119+ else
97120 exitCode=10
98121 echo " FTR exited with code $lastCode "
99122 echo " ^^^ +++"
@@ -114,7 +137,4 @@ echo "--- FTR configs complete"
114137printf " %s\n" " ${results[@]} "
115138echo " "
116139
117- # Scout reporter
118- source .buildkite/scripts/steps/test/scout_upload_report_events.sh
119-
120140exit $exitCode
0 commit comments