Skip to content

Commit 6b80f2d

Browse files
CR-6414 CLI specTemplate: ignore steps. (#717)
1 parent 98c7928 commit 6b80f2d

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

lib/interface/cli/helpers/validation.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ function _getPipelineName(filename) {
2424
}
2525

2626
async function validatePipelineSpec(data) {
27+
const specTemplate = _.get(data, 'spec.specTemplate');
2728
const steps = _.get(data, 'spec.steps');
2829
const stages = _.get(data, 'spec.stages');
2930
const yamlObj = {};
@@ -36,6 +37,9 @@ async function validatePipelineSpec(data) {
3637
if (stages) {
3738
yamlObj.stages = stages;
3839
}
40+
if (specTemplate) { // CR-6414 Using specTemplate - skip check spec/stages - they are not used
41+
return { valid: true, message: 'Using specTemplate' };
42+
}
3943
const validatedYaml = yaml.safeDump(yamlObj);
4044
const result = await sdk.pipelines.validateYaml({ yaml: validatedYaml, outputFormat: 'lint' });
4145
let message;

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.78.1",
3+
"version": "0.78.2",
44
"description": "Codefresh command line utility",
55
"main": "index.js",
66
"preferGlobal": true,

0 commit comments

Comments
 (0)