Skip to content

Commit

Permalink
Merge pull request #151 from screwdriver-cd/description-in-validator
Browse files Browse the repository at this point in the history
fix(423): Add job descriptions to validator
  • Loading branch information
d2lam authored Jun 27, 2017
2 parents a861c2c + f14fcae commit caf07d0
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 0 deletions.
1 change: 1 addition & 0 deletions api/validator.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ const SCHEMA_JOB_PERMUTATION = Joi.object()
.keys({
annotations: Annotations.annotations,
commands: SCHEMA_JOB_COMMANDS,
description: Job.description,
environment: Job.environment,
image: Job.image,
secrets: Job.secrets,
Expand Down
1 change: 1 addition & 0 deletions config/job.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ const SCHEMA_JOB = Joi.object()
*/
module.exports = {
annotations: Annotations.annotations,
description: SCHEMA_DESCRIPTION,
environment: SCHEMA_ENVIRONMENT,
image: SCHEMA_IMAGE,
job: SCHEMA_JOB,
Expand Down
3 changes: 3 additions & 0 deletions test/data/validator.input.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
yaml: |
jobs:
main:
annotations:
beta.screwdriver.cd/auto_pr_builds: fork-only
description: "This is a description"
image: node:{{NODE_VERSION}}
matrix:
NODE_VERSION: [4,5,6]
Expand Down
9 changes: 9 additions & 0 deletions test/data/validator.output.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ jobs:
command: npm test
- name: build
command: npm run build
annotations:
beta.screwdriver.cd/auto_pr_builds: fork-only
description: "This is a description"
environment:
NODE_VERSION: 4
settings:
Expand All @@ -20,6 +23,9 @@ jobs:
command: npm test
- name: build
command: npm run build
annotations:
beta.screwdriver.cd/auto_pr_builds: fork-only
description: "This is a description"
environment:
NODE_VERSION: 5
settings:
Expand All @@ -32,6 +38,9 @@ jobs:
command: npm test
- name: build
command: npm run build
annotations:
beta.screwdriver.cd/auto_pr_builds: fork-only
description: "This is a description"
environment:
NODE_VERSION: 6
settings:
Expand Down

0 comments on commit caf07d0

Please sign in to comment.