Skip to content

Commit

Permalink
CR-6414 CLI specTemplate: ignore steps. (#717)
Browse files Browse the repository at this point in the history
  • Loading branch information
saffi-codefresh authored Oct 6, 2021
1 parent 98c7928 commit 6b80f2d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions lib/interface/cli/helpers/validation.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ function _getPipelineName(filename) {
}

async function validatePipelineSpec(data) {
const specTemplate = _.get(data, 'spec.specTemplate');
const steps = _.get(data, 'spec.steps');
const stages = _.get(data, 'spec.stages');
const yamlObj = {};
Expand All @@ -36,6 +37,9 @@ async function validatePipelineSpec(data) {
if (stages) {
yamlObj.stages = stages;
}
if (specTemplate) { // CR-6414 Using specTemplate - skip check spec/stages - they are not used
return { valid: true, message: 'Using specTemplate' };
}
const validatedYaml = yaml.safeDump(yamlObj);
const result = await sdk.pipelines.validateYaml({ yaml: validatedYaml, outputFormat: 'lint' });
let message;
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "codefresh",
"version": "0.78.1",
"version": "0.78.2",
"description": "Codefresh command line utility",
"main": "index.js",
"preferGlobal": true,
Expand Down

0 comments on commit 6b80f2d

Please sign in to comment.