Commit e3bdb72e authored by Johan Helsing's avatar Johan Helsing

Improve posting to gerrit

parent 6cc82c27
Pipeline #1245 failed with stages
......@@ -171,10 +171,10 @@ function testPatchSet(opts) {
const commit = `${change.number},${patchSet.number}`;
var message = 'Running headless tests for change ' +
`${change.number}, patch set #${patchSet.number} ${failed ? 'failed' : 'passed'}`;
message += "\n\nHow to run the tests locally: https://github.com/johanhelsing/docker-qt-tests";
message += "\n\nHow to run the tests locally: https://git.qt.io/qtwaylandtests/docker-qt-tests";
const codeReview = failed ? '-1' : '0';
if (failed) {
const codeReview = '-1';
const tailLines = 30;
const tailLines = 40;
readLastLines.read(`logs/${containerName}.txt`, tailLines).then(lines => {
const indentedLogTail = lines.replace(/^/mg, ' ');
message = `${message}\n\nLast ${tailLines} lines of log:\n\n${indentedLogTail}`;
......@@ -182,7 +182,7 @@ function testPatchSet(opts) {
postGerritComment(commit, message, codeReview);
}).catch(reason => console.log('Couldn\'t get last lines of log file', reason));
} else {
postGerritComment(commit, message);
postGerritComment(commit, message, codeReview);
}
});
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment