Skip to content

Commit

Permalink
Merge pull request #108 from screwdriver-cd/set
Browse files Browse the repository at this point in the history
fix: expose settings in validator
  • Loading branch information
d2lam authored Feb 27, 2017
2 parents abfb345 + b5f6b2b commit f6d3991
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
3 changes: 2 additions & 1 deletion api/validator.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 2 additions & 0 deletions test/data/validator.input.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ yaml: |
install: npm install
test: npm test
build: npm run build
settings:
email: foo@bar.com
publish:
image: node:4
Expand Down
6 changes: 6 additions & 0 deletions test/data/validator.output.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ jobs:
command: npm run build
environment:
NODE_VERSION: 4
settings:
email: foo@bar.com
- image: node:5
commands:
- name: install
Expand All @@ -20,6 +22,8 @@ jobs:
command: npm run build
environment:
NODE_VERSION: 5
settings:
email: foo@bar.com
- image: node:6
commands:
- name: install
Expand All @@ -30,6 +34,8 @@ jobs:
command: npm run build
environment:
NODE_VERSION: 6
settings:
email: foo@bar.com
secrets:
- ANOTHER_SECRET

Expand Down

0 comments on commit f6d3991

Please sign in to comment.