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({
1818 } ,
1919 builder : ( yargs ) => {
2020 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+ } ) ;
2126 return yargs ;
2227 } ,
2328 handler : async ( argv ) => {
@@ -44,7 +49,7 @@ const annotate = new Command({
4449 console . warn ( result . message ) ;
4550 return ;
4651 }
47- await pipeline . replaceByName ( name , data ) ;
52+ await pipeline . replaceByName ( name , data , argv . skipTriggerValidation ) ;
4853 console . log ( `Pipeline '${ name } ' updated` ) ;
4954 break ;
5055 default :
Original file line number Diff line number Diff line change @@ -75,15 +75,17 @@ const validateYaml = async (yaml) => {
7575 return sendHttpRequest ( optionsValidate ) ;
7676} ;
7777
78- const replaceByName = async ( name , data ) => {
78+ const replaceByName = async ( name , data , skipTriggerValidation = false ) => {
7979 const body = data ;
8080
8181 const options = {
8282 url : `/api/pipelines/${ encodeURIComponent ( name ) } ` ,
8383 method : 'PUT' ,
8484 body,
8585 } ;
86-
86+ if ( skipTriggerValidation ) {
87+ options . qs = { skipTriggerValidation } ;
88+ }
8789 return sendHttpRequest ( options ) ;
8890} ;
8991
Original file line number Diff line number Diff line change 11{
22 "name" : " codefresh" ,
3- "version" : " 0.11.2 " ,
3+ "version" : " 0.12.0 " ,
44 "description" : " Codefresh command line utility" ,
55 "main" : " index.js" ,
66 "preferGlobal" : true ,
You can’t perform that action at this time.
0 commit comments