Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Post the CiBoT and ToBiC results in dedicated custom fields in the Tracker (part 2) #313

Merged
merged 5 commits into from
Oct 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,8 @@ ${basereq} --action removeLabels \
--issue ${issue} \
--labels "cime"

# Add the comment with results.
# (Eloy 20131223 - restricted to Integrators)
comment=$(cat "${resultfile}.${issue}.txt")
${basereq} --action addComment \
# Update the pre-check field with the results.
${basereq} --action setFieldValue \
--issue ${issue} \
--comment "${comment}"
--field "Pre-check results" \
--file "${resultfile}.${issue}.txt"
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ ${basereq} --action removeLabels \
--issue ${issue} \
--labels "cime"

# Add the comment with results
comment=$(cat "${resultfile}.${issue}.txt")
${basereq} --action addComment \
# Update the pre-check field with the results.
${basereq} --action setFieldValue \
--issue ${issue} \
--comment "${comment}"
--field "Pre-check results" \
--file "${resultfile}.${issue}.txt"
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ ${basereq} --action removeLabels \
--issue ${issue} \
--labels "cime CIME Cime CiMe" # the uppercase to fix MDLSITE-4716 and cases like MDL-64431

# Add the comment with results
comment=$(cat "${resultfile}.${issue}.txt")
${basereq} --action addComment \
# Update the pre-check field with the results.
${basereq} --action setFieldValue \
--issue ${issue} \
--comment "${comment}"
--field "Pre-check results" \
--file "${resultfile}.${issue}.txt"
11 changes: 2 additions & 9 deletions tracker_automations/bulk_prelaunch_jobs/bulk_prelaunch_jobs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
#schedulemins: Frecuency (in minutes) of the schedule (cron) of this job. IMPORTANT to ensure that they match or there will be issues processed more than once or skipped.
#jobtype: defaulting to "all", allows to just pick one of the available jobs: phpunit, behat-(firefox|chrome|nonjs|all).
#quiet: with any value different from "false", don't perform any action in the Tracker.
#restrictedto: name of the project (MDL) role we want to restrict the comment to. Blank means no restriction.


# Let's go strict (exit on error)
set -e
Expand Down Expand Up @@ -133,7 +131,7 @@ while read issue; do
echo " - Build: ${build}"
echo " - URL: ${joburl}"
echo " - Result: ${type}: ${joburl}"
echo " - ${type}: ${joburl}" >> "${resultfile}.${issue}.txt"
echo " - ${joburl} ${type}" >> "${resultfile}.${issue}.txt"
fi
done < "${resultfile}.jenkinscli"
echo "" >> "${resultfile}.${issue}.txt"
Expand All @@ -150,12 +148,7 @@ while read issue; do

# Execute the criteria postissue. It will perform the needed changes in the tracker for the current issue
if [[ ${quiet} == "false" ]]; then
# Let's see if there is any restriction to the comment in the Tracker
restrictiontype=
if [[ -n "${restrictedto}" ]]; then
restrictiontype=--role
fi
echo " - Sending results to the Tracker (${restrictiontype} ${restrictedto})"
echo " - Sending results to the Tracker"
. "${mydir}/criteria/${criteria}/postissue.sh"
fi
done < "${resultfile}"
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
# Add the comment with results.
if [[ -n "${restrictedto}" ]]; then
${basereq} --action addComment \
--issue ${issue} \
--file "${resultfile}.${issue}.txt" ${restrictiontype} "${restrictedto}"
else
${basereq} --action addComment \
--issue ${issue} \
--file "${resultfile}.${issue}.txt"
fi
# Update the automated testing field with the results.
${basereq} --action setFieldValue \
--issue ${issue} \
--field "Automated test results" \
--file "${resultfile}.${issue}.txt"
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ ${basereq} --action getIssueList \
--jql "project = 'Moodle' \
AND status = 'Waiting for component lead review' \
AND status WAS NOT 'Waiting for component lead review' ON '-${schedulemins}' \
AND issue NOT IN commentedByUser('tobic') \
AND level IS EMPTY \
ORDER BY priority DESC, votes DESC, 'Last comment date' ASC" \
--outputFormat 101 \
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
# Add the comment with results.
if [[ -n "${restrictedto}" ]]; then
${basereq} --action addComment \
--issue ${issue} \
--file "${resultfile}.${issue}.txt" ${restrictiontype} "${restrictedto}"
else
${basereq} --action addComment \
--issue ${issue} \
--file "${resultfile}.${issue}.txt"
fi
# Update the automated testing field with the results.
${basereq} --action setFieldValue \
--issue ${issue} \
--field "Automated test results" \
--file "${resultfile}.${issue}.txt"
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ ${basereq} --action getIssueList \
--jql "project = 'Moodle' \
AND status = 'Waiting for integration review' \
AND status WAS NOT 'Waiting for integration review' ON '-${schedulemins}' \
AND issue NOT IN commentedByUser('tobic') \
AND level IS EMPTY \
ORDER BY priority DESC, votes DESC, 'Last comment date' ASC" \
--outputFormat 101 \
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
# Add the comment with results.
if [[ -n "${restrictedto}" ]]; then
${basereq} --action addComment \
--issue ${issue} \
--file "${resultfile}.${issue}.txt" ${restrictiontype} "${restrictedto}"
else
${basereq} --action addComment \
--issue ${issue} \
--file "${resultfile}.${issue}.txt"
fi
# Update the automated testing field with the results.
${basereq} --action setFieldValue \
--issue ${issue} \
--field "Automated test results" \
--file "${resultfile}.${issue}.txt"
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
# Add the comment with results.
if [[ -n "${restrictedto}" ]]; then
${basereq} --action addComment \
--issue ${issue} \
--file "${resultfile}.${issue}.txt" ${restrictiontype} "${restrictedto}"
else
${basereq} --action addComment \
--issue ${issue} \
--file "${resultfile}.${issue}.txt"
fi
# Update the automated testing field with the results.
${basereq} --action setFieldValue \
--issue ${issue} \
--field "Automated test results" \
--file "${resultfile}.${issue}.txt"