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 1
1
const Command = require ( '../../Command' ) ;
2
2
const createRoot = require ( '../root/create.cmd' ) ;
3
3
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' ;
6
5
7
6
const command = new Command ( {
8
7
command : 'runtime-environments [cluster]' ,
@@ -15,7 +14,7 @@ const command = new Command({
15
14
weight : 100 ,
16
15
} ,
17
16
handler : async ( ) => {
18
- console . log ( `${ DEPRECATION_MESSAGE } ${ VENONA_REPO_URL } ` ) ;
17
+ console . log ( `${ DEPRECATION_MESSAGE } ` ) ;
19
18
process . exit ( 1 ) ;
20
19
} ,
21
20
} ) ;
Original file line number Diff line number Diff line change
1
+ const debug = require ( 'debug' ) ( 'codefresh:cli:create:pipelines2' ) ;
1
2
const Command = require ( '../../Command' ) ;
3
+ const { sdk } = require ( '../../../../logic' ) ;
2
4
const deleteRoot = require ( '../root/delete.cmd' ) ;
3
5
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
-
7
6
8
7
const command = new Command ( {
9
8
command : 'runtime-environments name' ,
@@ -14,9 +13,20 @@ const command = new Command({
14
13
category : 'Runtime-Environments' ,
15
14
title : 'Delete Runtime-Environments' ,
16
15
} ,
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.` ) ;
20
30
} ,
21
31
} ) ;
22
32
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " codefresh" ,
3
- "version" : " 0.53 .0" ,
3
+ "version" : " 0.54 .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