Skip to content

Commit 7dac3c2

Browse files
authored
Send the report emails to extra addresses (#394)
Add the job parameter extraEmails, a space separated list of email addresses. all-reports.py takes it as --extra-emails and adds these addresses to the recipients of every report, next to openmodelicabuilds and the commit authors. Fixes #393. Assisted-by: Claude Opus 5.5
1 parent 7da78b4 commit 7dac3c2

2 files changed

Lines changed: 8 additions & 2 deletions

File tree

‎.CI/Jenkinsfile‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ pipeline {
3333
booleanParam(name: 'heavy_tests', defaultValue: false, description: 'master branch, runs one test at a time. That is, no parallel launching of tests. omc will use multiple threads for each test (-n=1 is not set unlike the other regression tests.), (r7945). This is an experimental job that does not run on a fixed schedule.')
3434
booleanParam(name: 'heavy_tests_wasm', defaultValue: false, description: 'heavy_tests with --simCodeTarget=wasm-jit, filling heavy_tests_wasm (r7945). Its results are in the heavy_tests report. This is an experimental job that does not run on a fixed schedule.')
3535

36+
string(name: 'extraEmails', defaultValue: '', description: 'Space separated email addresses that also get the report emails of this run, besides openmodelicabuilds and the authors of the commits.')
3637
string(name: 'pull_request', defaultValue: '', description: 'Test an OpenModelica pull request rather than a branch: its number, e.g. 16354. omc is built from refs/pull/<N>/merge - the pull request as it would land - the results fill a pr-<N> table, and the report compares them against the newest run of pull_request_baseline. Left empty, nothing of this runs.')
3738
choice(name: 'pull_request_target', choices: ['wasm-jit', 'C'], description: 'The --simCodeTarget a pull request is simulated with. wasm-jit is the cheaper run and is compared against the wasm-jit job; C against master.')
3839
choice(name: 'pull_request_solver', choices: ['default', 'gbode', 'cvode', 'ida'], description: 'The solver a pull request is simulated with: default is the one each model asks for, the others are the configs/solvers.json entries of that name. With the C target, the baseline is then that solver\'s table, which the solvers job fills; nothing fills one for wasm-jit, so set pull_request_baseline yourself or compare against the default solver.')
@@ -536,7 +537,9 @@ pipeline {
536537
'''
537538
sh './clean-empty-omcversion-dates.py'
538539

539-
sh "./all-reports.py --email --omcgitdir=OpenModelica ${env.GITBRANCHES} ${env.GITBRANCHES_FMI} ${env.GITBRANCHES_NEWINST} ${env.GITBRANCHES_DAE} ${env.GITBRANCHES_NEWBACKEND_DAE} ${env.GITBRANCHES_CPP} ${env.GITBRANCHES_WASM_JIT} ${env.GITBRANCHES_C_PLUS_RUST} conversion heavy_tests heavy_tests_wasm generateSymbolicJacobian dataReconciliation gbode cvode ida"
540+
// The shell takes extraEmails from the environment, so its value is never
541+
// part of the command.
542+
sh "./all-reports.py --email --extra-emails=\"\$extraEmails\" --omcgitdir=OpenModelica ${env.GITBRANCHES} ${env.GITBRANCHES_FMI} ${env.GITBRANCHES_NEWINST} ${env.GITBRANCHES_DAE} ${env.GITBRANCHES_NEWBACKEND_DAE} ${env.GITBRANCHES_CPP} ${env.GITBRANCHES_WASM_JIT} ${env.GITBRANCHES_C_PLUS_RUST} conversion heavy_tests heavy_tests_wasm generateSymbolicJacobian dataReconciliation gbode cvode ida"
540543
sh "./all-plots.py ${env.GITBRANCHES} ${env.GITBRANCHES_FMI} ${env.GITBRANCHES_NEWINST} ${env.GITBRANCHES_DAE} ${env.GITBRANCHES_NEWBACKEND_DAE} ${env.GITBRANCHES_CPP} ${env.GITBRANCHES_WASM_JIT} ${env.GITBRANCHES_C_PLUS_RUST} conversion heavy_tests heavy_tests_wasm generateSymbolicJacobian dataReconciliation gbode cvode ida"
541544

542545
// Recorded and announced only once they are up: a report the database

‎all-reports.py‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717
parser.add_argument('--githuburltesting', default="https://github.com/OpenModelica/OpenModelicaLibraryTesting/commit")
1818
parser.add_argument('--omcgitdir', default="../OpenModelica/OpenModelica")
1919
parser.add_argument('--email', default=False, action='store_true')
20+
parser.add_argument('--extra-emails', default="",
21+
help="Space separated addresses that also get the email of every report")
2022
parser.add_argument('--pending', default="pending-reports.json",
2123
help="Where to leave this run's reports for publish-reports.py")
2224
parser.add_argument('--new-branch', default=[], action='append', metavar='BRANCH',
@@ -36,6 +38,7 @@
3638
githuburltesting = args.githuburltesting
3739
omcgitdir = args.omcgitdir
3840
doemail = args.email
41+
extraemails = set(e for e in args.extra_emails.split() if "@" in e)
3942
pendingfile = args.pending
4043
newbranches = set(shared.resultTable(branch) for branch in args.new_branch)
4144

@@ -262,7 +265,7 @@ def historyOf(branch, nruns):
262265
thirdPartyChanged = ""
263266
with open("history.html.tpl") as fin:
264267
tpl = fin.read()
265-
emails_current = set(["openmodelicabuilds@ida.liu.se"])
268+
emails_current = set(["openmodelicabuilds@ida.liu.se"]) | extraemails
266269
if v1 != v2:
267270
try:
268271
gitlog = subprocess.check_output(["git", "log", '--pretty=<tr><td><a href="%s/%%h">%%h</a></td><td>%%ai</td><td>%%an</td><td>%%s</td></tr>' % (githuburl), "%s..%s" % (v1,v2)], cwd=omcgitdir).decode("utf-8")

0 commit comments

Comments
 (0)