File tree Expand file tree Collapse file tree 11 files changed +38
-6
lines changed
lib/interface/cli/commands Expand file tree Collapse file tree 11 files changed +38
-6
lines changed Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ const ProgressEvents = require('../../helpers/progressEvents');
8
8
const cliProgress = require ( 'cli-progress' ) ;
9
9
const colors = require ( 'colors' ) ;
10
10
const { getNewAgentName } = require ( './helper' ) ;
11
+ const { DefaultLogFormatter } = require ( './../hybrid/helper' ) ;
11
12
12
13
const defaultNamespace = 'codefresh' ;
13
14
@@ -177,6 +178,7 @@ const installAgentCmd = new Command({
177
178
agentId : name ,
178
179
terminateProcess,
179
180
events,
181
+ logFormatting : DefaultLogFormatter ,
180
182
} ) ;
181
183
if ( agentInstallStatusCode !== 0 ) {
182
184
throw new Error ( `\nRunner installation failed with code ${ agentInstallStatusCode } ` ) ;
Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ const { sdk } = require('../../../../logic');
6
6
const { getKubeContext } = require ( '../../helpers/kubernetes' ) ;
7
7
const ProgressEvents = require ( '../../helpers/progressEvents' ) ;
8
8
const cliProgress = require ( 'cli-progress' ) ;
9
+ const { DefaultLogFormatter } = require ( './../hybrid/helper' ) ;
9
10
10
11
11
12
const unInstallAgentCmd = new Command ( {
@@ -76,6 +77,7 @@ const unInstallAgentCmd = new Command({
76
77
kubeConfigPath,
77
78
terminateProcess : false ,
78
79
events,
80
+ logFormatting : DefaultLogFormatter ,
79
81
} ) ;
80
82
if ( exitCode === 0 ) {
81
83
console . log ( 'Agent uninsalled successfully' ) ;
Original file line number Diff line number Diff line change @@ -19,6 +19,8 @@ const INSTALLATION_DEFAULTS = {
19
19
CF_CONTEXT_NAME : 'cf-runner' ,
20
20
} ;
21
21
22
+ const DefaultLogFormatter = 'plain' ;
23
+
22
24
const defaultOpenIssueMessage = 'If you had any issues with this process please report them at: ' +
23
25
`${ colors . blue ( 'https://github.com/codefresh-io/cli/issues/new' ) } ` ;
24
26
const url = _ . get ( sdk , 'config.context.url' , 'https://g.codefresh.io' ) ;
@@ -224,4 +226,5 @@ module.exports = {
224
226
createProgressBar,
225
227
getTestPipelineLink,
226
228
INSTALLATION_DEFAULTS ,
229
+ DefaultLogFormatter,
227
230
} ;
Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ const {
21
21
executeTestPipeline,
22
22
INSTALLATION_DEFAULTS ,
23
23
} = require ( './helper' ) ;
24
-
24
+ const figlet = require ( 'figlet' ) ;
25
25
26
26
const handleError = createErrorHandler ( `\nIf you had any issues with the installation please report them at: ${ colors . blue ( 'https://github.com/codefresh-io/cli/issues/new' ) } ` ) ;
27
27
@@ -324,6 +324,15 @@ const initCmd = new Command({
324
324
console . log ( colors . green ( `\nDocumenation link: ${ colors . blue ( 'https://codefresh.io/docs/docs/enterprise/codefresh-runner/#codefresh-runner-preview-release' ) } ` ) ) ;
325
325
console . log ( colors . green ( `If you had any issues with the installation please report them at: ${ colors . blue ( 'https://github.com/codefresh-io/cli/issues/new' ) } ` ) ) ;
326
326
await to ( progressReporter . report ( installationProgress . events . FINISHED , installationProgress . status . SUCCESS ) ) ;
327
+ await new Promise ( ( resolve ) => {
328
+ figlet ( 'CODEFRESH' , ( err , data ) => {
329
+ if ( err ) {
330
+ return ;
331
+ }
332
+ console . log ( data ) ;
333
+ resolve ( ) ;
334
+ } ) ;
335
+ } ) ;
327
336
process . exit ( ) ; // TODO : This is not needed - needed to be fixed
328
337
} ,
329
338
} ) ;
Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ const installRoot = require('../root/install.cmd');
4
4
const { sdk } = require ( '../../../../logic' ) ;
5
5
const ProgressEvents = require ( '../../helpers/progressEvents' ) ;
6
6
const cliProgress = require ( 'cli-progress' ) ;
7
+ const { DefaultLogFormatter } = require ( './../hybrid/helper' ) ;
7
8
8
9
const installMonitorCmd = new Command ( {
9
10
root : false ,
@@ -72,6 +73,7 @@ const installMonitorCmd = new Command({
72
73
verbose,
73
74
events,
74
75
codefreshHost : url ,
76
+ logFormatting : DefaultLogFormatter ,
75
77
} ) ;
76
78
if ( monitorInstallStatusCode !== 0 ) {
77
79
throw new Error ( `\nCodefresh Monitoring installation failed with code ${ monitorInstallStatusCode } ` ) ;
Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ const unInstallRoot = require('../root/uninstall.cmd');
4
4
const { sdk } = require ( '../../../../logic' ) ;
5
5
const ProgressEvents = require ( '../../helpers/progressEvents' ) ;
6
6
const cliProgress = require ( 'cli-progress' ) ;
7
+ const { DefaultLogFormatter } = require ( './../hybrid/helper' ) ;
7
8
8
9
9
10
const unInstallAgentCmd = new Command ( {
@@ -60,6 +61,7 @@ const unInstallAgentCmd = new Command({
60
61
kubeConfigPath,
61
62
terminateProcess : false ,
62
63
events,
64
+ logFormatting : DefaultLogFormatter ,
63
65
} ) ;
64
66
if ( exitCode === 0 ) {
65
67
console . log ( 'Monitor uninsalled successfully' ) ;
Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ const { sdk } = require('../../../../logic');
5
5
const ProgressEvents = require ( '../../helpers/progressEvents' ) ;
6
6
const cliProgress = require ( 'cli-progress' ) ;
7
7
const { getKubeContext } = require ( '../../helpers/kubernetes' ) ;
8
+ const { DefaultLogFormatter } = require ( './../hybrid/helper' ) ;
8
9
9
10
const attachAgentToRuntime = async ( agent , name ) => {
10
11
const rt = await sdk . runtimeEnvs . get ( { name } ) ;
@@ -141,6 +142,7 @@ const attachRuntimeCmd = new Command({
141
142
restartAgent,
142
143
terminateProcess : false ,
143
144
events,
145
+ logFormatting : DefaultLogFormatter ,
144
146
} ) ;
145
147
if ( ! restartAgent ) {
146
148
console . log ( 'Please restart agent\'s pod in order that changes will take effect' ) ;
Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ const cliProgress = require('cli-progress');
9
9
const createClusterCmd = require ( '../cluster/create.cmd' ) ;
10
10
const colors = require ( 'colors' ) ;
11
11
const _ = require ( 'lodash' ) ;
12
+ const { DefaultLogFormatter } = require ( './../hybrid/helper' ) ;
12
13
13
14
const defaultNamespace = 'codefresh' ;
14
15
const maxRuntimeNameLength = 63 ;
@@ -259,6 +260,7 @@ const installRuntimeCmd = new Command({
259
260
events : runtimeEvents ,
260
261
skipClusterTest,
261
262
storageClassName,
263
+ logFormatting : DefaultLogFormatter ,
262
264
} ) ;
263
265
// attach RE to agent in codefresh
264
266
Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ const { getKubeContext } = require('../../helpers/kubernetes');
6
6
const _ = require ( 'lodash' ) ;
7
7
const ProgressEvents = require ( '../../helpers/progressEvents' ) ;
8
8
const cliProgress = require ( 'cli-progress' ) ;
9
+ const { DefaultLogFormatter } = require ( './../hybrid/helper' ) ;
9
10
10
11
11
12
const detachRuntimeFromAgent = async ( agent , runtimeName ) => {
@@ -140,6 +141,7 @@ const unInstallRuntimeCmd = new Command({
140
141
verbose,
141
142
terminateProcess : ( terminateProcess !== false ) ,
142
143
events,
144
+ logFormatting : DefaultLogFormatter ,
143
145
} ) ;
144
146
} ,
145
147
} ) ;
Original file line number Diff line number Diff line change 37
37
"cf-errors" : " ^0.1.12" ,
38
38
"chalk" : " ^1.1.3" ,
39
39
"cli-progress" : " 3.6.0" ,
40
- "codefresh-sdk" : " ^1.8.6 " ,
40
+ "codefresh-sdk" : " ^1.9.1 " ,
41
41
"colors" : " ^1.1.2" ,
42
42
"columnify" : " ^1.5.4" ,
43
43
"compare-versions" : " ^3.4.0" ,
48
48
"diff" : " ^3.5.0" ,
49
49
"dockerode" : " ^2.5.7" ,
50
50
"draftlog" : " ^1.0.12" ,
51
+ "figlet" : " ^1.4.0" ,
51
52
"filesize" : " ^3.5.11" ,
52
53
"firebase" : " git+https://github.com/codefresh-io/firebase.git#80b2ed883ff281cd67b53bd0f6a0bbd6f330fed5" ,
53
54
"flat" : " ^4.1.0" ,
You can’t perform that action at this time.
0 commit comments