Skip to content

Commit 15209be

Browse files
authoredMay 2, 2024··
feat(3068): pull latest config-parser and validator (#3100)
1 parent accb33d commit 15209be

6 files changed

+28
-10
lines changed
 

‎package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@
102102
"screwdriver-build-bookend": "^4.0.0",
103103
"screwdriver-cache-bookend": "^3.0.0",
104104
"screwdriver-command-validator": "^3.0.0",
105-
"screwdriver-config-parser": "^9.0.0",
105+
"screwdriver-config-parser": "^10.0.0",
106106
"screwdriver-coverage-bookend": "^2.0.0",
107107
"screwdriver-coverage-sonar": "^4.1.1",
108108
"screwdriver-data-schema": "^23.2.0",
@@ -123,7 +123,7 @@
123123
"screwdriver-scm-github": "^12.6.0",
124124
"screwdriver-scm-gitlab": "^3.1.0",
125125
"screwdriver-scm-router": "^7.1.0",
126-
"screwdriver-template-validator": "^7.0.0",
126+
"screwdriver-template-validator": "^8.0.0",
127127
"screwdriver-workflow-parser": "^4.1.1",
128128
"sqlite3": "^5.1.4",
129129
"stream": "0.0.2",

‎plugins/validator.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
'use strict';
22

3-
const parser = require('screwdriver-config-parser');
3+
const parser = require('screwdriver-config-parser').parsePipelineYaml;
44
const schema = require('screwdriver-data-schema');
55
const validatorSchema = schema.api.validator;
66

Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
"yaml": "{ \"namespace\": \"template_namespace\", \"name\": \"template_name\", \"version\": \"1.2\", \"description\": \"template description\", \"maintainer\": \"name@domain.org\", \"config\": { \"jobs\": { \"main\": { \"steps\": [ { \"init\": \"npm install\" }, { \"test\": \"npm test\" } ] } } } }"
2+
"yaml": "{ \"namespace\": \"template_namespace\", \"name\": \"template_name\", \"version\": \"1.2\", \"description\": \"template description\", \"maintainer\": \"name@domain.org\", \"config\": { \"jobs\": { \"main\": { \"image\": \"node:20\", \"steps\": [ { \"init\": \"npm install\" }, { \"test\": \"npm test\" } ] } } } }"
33
}
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
"yaml": "{ \"namespace\": \"template_namespace\", \"name\": \"template_name\", \"version\": \"1.2.3\", \"description\": \"template description\", \"maintainer\": \"name@domain.org\", \"config\": { \"jobs\": { \"main\": { \"steps\": [ { \"init\": \"npm install\" }, { \"test\": \"npm test\" } ] } } } }"
2+
"yaml": "{ \"namespace\": \"template_namespace\", \"name\": \"template_name\", \"version\": \"1.2.3\", \"description\": \"template description\", \"maintainer\": \"name@domain.org\", \"config\": { \"jobs\": { \"main\": { \"image\": \"node:20\", \"steps\": [ { \"init\": \"npm install\" }, { \"test\": \"npm test\" } ] } } } }"
33
}

‎test/plugins/pipelines.templates.test.js

+22-4
Original file line numberDiff line numberDiff line change
@@ -265,8 +265,17 @@ describe('pipeline plugin test', () => {
265265
description: 'template description',
266266
maintainer: 'name@domain.org',
267267
config: {
268-
jobs: { main: { steps: [{ init: 'npm install' }, { test: 'npm test' }] } },
269-
shared: {},
268+
jobs: {
269+
main: {
270+
steps: [{ init: 'npm install' }, { test: 'npm test' }],
271+
annotations: {},
272+
environment: {},
273+
settings: {},
274+
image: 'node:20',
275+
secrets: [],
276+
sourcePaths: []
277+
}
278+
},
270279
parameters: {}
271280
},
272281
pipelineId: 123
@@ -389,8 +398,17 @@ describe('pipeline plugin test', () => {
389398
description: 'template description',
390399
maintainer: 'name@domain.org',
391400
config: {
392-
jobs: { main: { steps: [{ init: 'npm install' }, { test: 'npm test' }] } },
393-
shared: {},
401+
jobs: {
402+
main: {
403+
steps: [{ init: 'npm install' }, { test: 'npm test' }],
404+
annotations: {},
405+
environment: {},
406+
settings: {},
407+
image: 'node:20',
408+
secrets: [],
409+
sourcePaths: []
410+
}
411+
},
394412
parameters: {}
395413
}
396414
}

‎test/plugins/trigger.test.helper.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
/* eslint max-classes-per-file: off */
44

5-
const configParser = require('screwdriver-config-parser');
5+
const configParser = require('screwdriver-config-parser').parsePipelineYaml;
66
const fs = require('fs');
77
const { Server } = require('@hapi/hapi');
88
const sinon = require('sinon');

0 commit comments

Comments
 (0)
Please sign in to comment.