File tree Expand file tree Collapse file tree 3 files changed +19
-10
lines changed
lib/interface/cli/commands/runtimeEnvironments Expand file tree Collapse file tree 3 files changed +19
-10
lines changed Original file line number Diff line number Diff line change 11const Command = require ( '../../Command' ) ;
22const createRoot = require ( '../root/create.cmd' ) ;
33
4- const DEPRECATION_MESSAGE = 'Create runtime-environment command has been deprecated. Please use Venona to create a runtime-environment' ;
5- const VENONA_REPO_URL = 'https://github.com/codefresh-io/venona' ;
4+ const DEPRECATION_MESSAGE = 'Create runtime-environment command has been deprecated.\nUse codefresh install runtime command instead' ;
65
76const command = new Command ( {
87 command : 'runtime-environments [cluster]' ,
@@ -15,7 +14,7 @@ const command = new Command({
1514 weight : 100 ,
1615 } ,
1716 handler : async ( ) => {
18- console . log ( `${ DEPRECATION_MESSAGE } ${ VENONA_REPO_URL } ` ) ;
17+ console . log ( `${ DEPRECATION_MESSAGE } ` ) ;
1918 process . exit ( 1 ) ;
2019 } ,
2120} ) ;
Original file line number Diff line number Diff line change 1+ const debug = require ( 'debug' ) ( 'codefresh:cli:create:pipelines2' ) ;
12const Command = require ( '../../Command' ) ;
3+ const { sdk } = require ( '../../../../logic' ) ;
24const deleteRoot = require ( '../root/delete.cmd' ) ;
35
4- const DEPRECATION_MESSAGE = 'Create runtime-environment is been deprecated. Please use Venona to delete a runtime-environment' ;
5- const VENONA_REPO_URL = 'https://github.com/codefresh-io/venona' ;
6-
76
87const command = new Command ( {
98 command : 'runtime-environments name' ,
@@ -14,9 +13,20 @@ const command = new Command({
1413 category : 'Runtime-Environments' ,
1514 title : 'Delete Runtime-Environments' ,
1615 } ,
17- handler : async ( ) => {
18- console . log ( `${ DEPRECATION_MESSAGE } ${ VENONA_REPO_URL } ` ) ;
19- process . exit ( 1 ) ;
16+ builder : ( yargs ) => {
17+ return yargs
18+ . positional ( 'name' , {
19+ describe : 'Runtime environment name' ,
20+ } )
21+ . option ( 'force' , {
22+ describe : 'Delete runtime environment in force mode' ,
23+ type : 'boolean' ,
24+ } ) ;
25+ } ,
26+ handler : async ( argv ) => {
27+ const { name, force } = argv ;
28+ await sdk . runtimeEnvs . delete ( { name, force } ) ;
29+ console . log ( `Runtime-Environment '${ name } ' deleted.` ) ;
2030 } ,
2131} ) ;
2232
Original file line number Diff line number Diff line change 11{
22 "name" : " codefresh" ,
3- "version" : " 0.53 .0" ,
3+ "version" : " 0.54 .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