Skip to content

Commit

Permalink
Seperating triage output and script logging for cleaner issues
Browse files Browse the repository at this point in the history
Signed-off-by: Adam Farley <[email protected]>
  • Loading branch information
adamfarley committed Nov 28, 2023
1 parent fe2c161 commit f458056
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions tooling/build_autotriage/build_autotriage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,7 @@ identifyFailedBuildsInTimerPipelines() {
# the failure if possible.
buildFailureTriager() {
echo "Attempting to triage a job: ${1}"
echo "Failed job: ${1}" >> build_triage_output.md
# Todo: Iterate over the failures found and triage them against the pending array of regexes.
# For now we'll put them in a tidy md-style file for issue inclusion.

Expand All @@ -224,24 +225,24 @@ argumentParser "$@"
identifyFailedBuildsInTimerPipelines

if [[ ${#arrayOfFailedJobs[@]} -gt 0 ]]; then
echo "############ Failed Builds ############"
echo "############ Failed Builds ############" >> build_triage_output.md
for failedJob in ${arrayOfFailedJobs[@]}
do
buildFailureTriager $failedJob
done
echo "############ End of list ############"
echo "############ End of list ############" >> build_triage_output.md
else
echo "All build jobs passed. Huzzah!"
fi

if [[ ${#buildIssues[@]} -gt 0 ]]; then
echo "############ Script Issues ############"
echo "############ Script Issues ############" >> build_triage_output.md
for issueID in ${!buildIssues[@]}
do
echo "Issue ${issueID}: ${buildIssues[issueID]}\n"
echo "----"
echo "Issue ${issueID}: ${buildIssues[issueID]}\n" >> build_triage_output.md
echo "----" >> build_triage_output.md
done
echo "############ End of Issues ############"
echo "############ End of Issues ############" >> build_triage_output.md
fi

echo "Build AutoTriage is complete."

0 comments on commit f458056

Please sign in to comment.