Skip to content

Commit b74bd82

Browse files
Fix create pipeline (#261)
1 parent 7788c0f commit b74bd82

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

lib/interface/cli/helpers/validation.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,12 @@ function _buildFinalMessage(baseMessage, validationResult) {
1515
}
1616

1717
async function validatePipelineSpec(data) {
18-
const validatedYaml = yaml.safeDump(Object.assign({ version: data.version }, data.spec));
18+
const yamlObj = {
19+
version: data.version,
20+
...data.spec.steps && { steps: data.spec.steps },
21+
...data.spec.stages && { stages: data.spec.stages },
22+
};
23+
const validatedYaml = yaml.safeDump(yamlObj);
1924
const result = await pipeline.validateYaml(validatedYaml);
2025
let message;
2126
if (!result.valid) {

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "codefresh",
3-
"version": "0.9.17",
3+
"version": "0.9.18",
44
"description": "Codefresh command line utility",
55
"main": "index.js",
66
"preferGlobal": true,

0 commit comments

Comments
 (0)