Skip to content

Commit

Permalink
pipline scripts: remove superfluous error report
Browse files Browse the repository at this point in the history
.. now done in top level script

Change-Id: Ie5250b9876027b838fe6b6750a3a9188fcd6330c
  • Loading branch information
Frans Fürst committed Nov 6, 2024
1 parent eeeec87 commit 3923d62
Showing 1 changed file with 6 additions and 15 deletions.
21 changes: 6 additions & 15 deletions buildscripts/scripts/utils/notify.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,14 @@

/// file: notify.groovy

import org.codehaus.groovy.runtime.StackTraceUtils;

def get_author_email() {
// Workaround since CHANGE_AUTHOR_EMAIL is not available
// Bug: https://issues.jenkins-ci.org/browse/JENKINS-39838
return (
onWindows ?
/// windows will replace %ae with ae..
cmd_output('git log -1 --pretty=format:%%ae') :
cmd_output('git log -1 --pretty=format:%ae'));
/// windows will replace %ae with ae..
cmd_output('git log -1 --pretty=format:%%ae') :
cmd_output('git log -1 --pretty=format:%ae'));
}

// Send a build failed massage to jenkins
Expand Down Expand Up @@ -55,7 +53,7 @@ def notify_error(error) {
// ugly workaround, split() only + unique() does not work
notify_emails.addAll(TEAM_CI_MAIL.replaceAll(',', ' ').split(' ').grep());
currentBuild.changeSets.each { changeSet ->
def culprits_emails = changeSet.items.collect {e -> e.authorEmail};
def culprits_emails = changeSet.items.collect { e -> e.authorEmail };
print(
"""
||==========================================================================================
Expand Down Expand Up @@ -123,9 +121,9 @@ def notify_error(error) {
|
|If you feel you got this mail by mistake, please reply and let's fix this together.
|""".stripMargin()),
);
);
}
} catch(Exception exc) { // groovylint-disable CatchException
} catch (Exception exc) { // groovylint-disable CatchException
print("Could not report error by mail - got ${exc}");
}

Expand All @@ -145,13 +143,6 @@ def notify_error(error) {
//slack_build_failed(error)
// after notifying everybody, the error needs to be thrown again
// This ensures that the build status is set correctly

StackTraceUtils.sanitize(error);
print("ERROR: ${error.stackTrace.head()}: ${error}");
currentBuild.description += (
"<br>The build failed due to an exception (at ${error.stackTrace.head()}):" +
"<br><strong style='color:red'>${error}</strong>");
throw error;
}

return this;

0 comments on commit 3923d62

Please sign in to comment.