From 6d5f2d66d295cff511e8e6de90ddbf4fa88d607a Mon Sep 17 00:00:00 2001 From: Ben Gotow Date: Thu, 14 May 2015 10:44:09 -0700 Subject: [PATCH] fix(build): Turn test reporting back on now that Jenkins is a LaunchAgent not LaunchDaemon --- build/tasks/spec-task.coffee | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/build/tasks/spec-task.coffee b/build/tasks/spec-task.coffee index 2c3512a19..9d6ae3aa8 100644 --- a/build/tasks/spec-task.coffee +++ b/build/tasks/spec-task.coffee @@ -155,15 +155,15 @@ module.exports = (grunt) -> grunt.log.error("Process error: #{err}") testProc.on 'close', (exitCode, signal) -> - #if testSucceeded - done() - # else - # testOutput = testOutput.replace(/\x1b\[[^m]+m/g, '') - # url = "https://hooks.slack.com/services/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" - # request.post - # url: url - # json: - # username: "Edgehill Builds" - # text: "Aghhh somebody broke the build. ```#{testOutput}```" - # , (err, httpResponse, body) -> - # done(false) + if testSucceeded + done() + else + testOutput = testOutput.replace(/\x1b\[[^m]+m/g, '') + url = "https://hooks.slack.com/services/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" + request.post + url: url + json: + username: "Edgehill Builds" + text: "Aghhh somebody broke the build. ```#{testOutput}```" + , (err, httpResponse, body) -> + done(false)