screwdriver-api 7.0.195 → 7.0.196
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/plugins/builds/update.js +2 -1
package/package.json
CHANGED
package/plugins/builds/update.js
CHANGED
|
@@ -5,6 +5,7 @@ const hoek = require('@hapi/hoek');
|
|
|
5
5
|
const schema = require('screwdriver-data-schema');
|
|
6
6
|
const joi = require('joi');
|
|
7
7
|
const idSchema = schema.models.build.base.extract('id');
|
|
8
|
+
const merge = require('lodash.mergewith');
|
|
8
9
|
const { getScmUri, getUserPermissions, getFullStageJobName } = require('../helper');
|
|
9
10
|
const STAGE_TEARDOWN_PATTERN = /^stage@([\w-]+)(?::teardown)$/;
|
|
10
11
|
const TERMINAL_STATUSES = ['FAILURE', 'ABORTED', 'UNSTABLE', 'COLLAPSED'];
|
|
@@ -247,7 +248,7 @@ module.exports = () => ({
|
|
|
247
248
|
build.statusMessage = statusMessage || build.statusMessage;
|
|
248
249
|
} else if (['SUCCESS', 'FAILURE', 'ABORTED'].includes(desiredStatus)) {
|
|
249
250
|
build.meta = request.payload.meta || {};
|
|
250
|
-
event.meta
|
|
251
|
+
merge(event.meta, build.meta);
|
|
251
252
|
build.endTime = new Date().toISOString();
|
|
252
253
|
} else if (desiredStatus === 'RUNNING') {
|
|
253
254
|
build.startTime = new Date().toISOString();
|