From b5f6b2b9630eba8e5fdd9389bd62cd103577975c Mon Sep 17 00:00:00 2001 From: Min Zhang Date: Mon, 27 Feb 2017 15:42:57 -0800 Subject: [PATCH] fix: expose settings in validator --- api/validator.js | 3 ++- test/data/validator.input.yaml | 2 ++ test/data/validator.output.yaml | 6 ++++++ 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/api/validator.js b/api/validator.js index d087d2d9..8f09dad2 100644 --- a/api/validator.js +++ b/api/validator.js @@ -23,7 +23,8 @@ const SCHEMA_JOB_PERMUTATION = Joi.object() image: Job.image, commands: SCHEMA_JOB_COMMANDS, environment: Job.environment, - secrets: Job.secrets + secrets: Job.secrets, + settings: Job.settings }).label('Job permutation'); const SCHEMA_JOB_PERMUTATIONS = Joi.array().items(SCHEMA_JOB_PERMUTATION) diff --git a/test/data/validator.input.yaml b/test/data/validator.input.yaml index 655f2137..f497a1b6 100644 --- a/test/data/validator.input.yaml +++ b/test/data/validator.input.yaml @@ -8,6 +8,8 @@ yaml: | install: npm install test: npm test build: npm run build + settings: + email: foo@bar.com publish: image: node:4 diff --git a/test/data/validator.output.yaml b/test/data/validator.output.yaml index c7cf5fa5..b9af0c95 100644 --- a/test/data/validator.output.yaml +++ b/test/data/validator.output.yaml @@ -10,6 +10,8 @@ jobs: command: npm run build environment: NODE_VERSION: 4 + settings: + email: foo@bar.com - image: node:5 commands: - name: install @@ -20,6 +22,8 @@ jobs: command: npm run build environment: NODE_VERSION: 5 + settings: + email: foo@bar.com - image: node:6 commands: - name: install @@ -30,6 +34,8 @@ jobs: command: npm run build environment: NODE_VERSION: 6 + settings: + email: foo@bar.com secrets: - ANOTHER_SECRET