diff --git a/config/job.js b/config/job.js index 18f5414d..bf2d3284 100644 --- a/config/job.js +++ b/config/job.js @@ -107,7 +107,11 @@ const SCHEMA_STEP_OBJECT = Joi.object() const SCHEMA_DESCRIPTION = Joi.string().max(100).optional(); const SCHEMA_IMAGE = Joi.string().regex(Regex.IMAGE_NAME); -const SCHEMA_SETTINGS = Joi.object().optional(); +const SCHEMA_SETTINGS = Joi.object() + .keys({ + email: Joi.optional(), + slack: Joi.optional() + }); const SCHEMA_STEP = Joi.alternatives().try(SCHEMA_STEP_STRING, SCHEMA_STEP_OBJECT); const SCHEMA_STEPS = Joi.array().items(SCHEMA_STEP).min(1); const SCHEMA_STEPS_NO_DUPS = Joi.array().items(SCHEMA_STEP).min(1).unique((a, b) => { diff --git a/test/data/config.job.settings.yaml b/test/data/config.job.settings.yaml index 20e9ff3f..647c223f 100644 --- a/test/data/config.job.settings.yaml +++ b/test/data/config.job.settings.yaml @@ -1 +1 @@ -foo: bar +email: foo@bar.com