Skip to content
Open
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
8 changes: 8 additions & 0 deletions .whitesource
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"checkRunSettings": {
"vulnerableCheckRunConclusionLevel": "failure"
},
"issueSettings": {
"minSeverityLevel": "LOW"
}
}
15 changes: 14 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,20 @@ module.exports = function dockerEvents(opts) {
}
});

events.pipe(through.obj(function(chunk, enc, cb) {
var splitEvents = events.pipe(through.obj(function (chunk, enc, cb) {
var _this = this;
// the initial set of events arrives as one chunk
var events = chunk.toString().split('\n');
for (var i in events) {
var event = events[i];
if (event) {
_this.push(event);
}
}
cb()
}));

splitEvents.pipe(through.obj(function(chunk, enc, cb) {
var _this = this;
var data = JSON.parse(chunk);
var container = docker.getContainer(data.id);
Expand Down