File tree Expand file tree Collapse file tree 3 files changed +11
-4
lines changed
interface/cli/commands/root Expand file tree Collapse file tree 3 files changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -18,6 +18,11 @@ const annotate = new Command({
18
18
} ,
19
19
builder : ( yargs ) => {
20
20
crudFilenameOption ( yargs ) ;
21
+ yargs . option ( 'skip-trigger-validation' , {
22
+ describe : 'Set to true to skip validation (for pipeline replace)' ,
23
+ type : 'boolean' ,
24
+ default : false ,
25
+ } ) ;
21
26
return yargs ;
22
27
} ,
23
28
handler : async ( argv ) => {
@@ -44,7 +49,7 @@ const annotate = new Command({
44
49
console . warn ( result . message ) ;
45
50
return ;
46
51
}
47
- await pipeline . replaceByName ( name , data ) ;
52
+ await pipeline . replaceByName ( name , data , argv . skipTriggerValidation ) ;
48
53
console . log ( `Pipeline '${ name } ' updated` ) ;
49
54
break ;
50
55
default :
Original file line number Diff line number Diff line change @@ -75,15 +75,17 @@ const validateYaml = async (yaml) => {
75
75
return sendHttpRequest ( optionsValidate ) ;
76
76
} ;
77
77
78
- const replaceByName = async ( name , data ) => {
78
+ const replaceByName = async ( name , data , skipTriggerValidation = false ) => {
79
79
const body = data ;
80
80
81
81
const options = {
82
82
url : `/api/pipelines/${ encodeURIComponent ( name ) } ` ,
83
83
method : 'PUT' ,
84
84
body,
85
85
} ;
86
-
86
+ if ( skipTriggerValidation ) {
87
+ options . qs = { skipTriggerValidation } ;
88
+ }
87
89
return sendHttpRequest ( options ) ;
88
90
} ;
89
91
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " codefresh" ,
3
- "version" : " 0.11.2 " ,
3
+ "version" : " 0.12.0 " ,
4
4
"description" : " Codefresh command line utility" ,
5
5
"main" : " index.js" ,
6
6
"preferGlobal" : true ,
You can’t perform that action at this time.
0 commit comments