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');
88const cliProgress = require ( 'cli-progress' ) ;
99const colors = require ( 'colors' ) ;
1010const { getNewAgentName } = require ( './helper' ) ;
11+ const { DefaultLogFormatter } = require ( './../hybrid/helper' ) ;
1112
1213const defaultNamespace = 'codefresh' ;
1314
@@ -177,6 +178,7 @@ const installAgentCmd = new Command({
177178 agentId : name ,
178179 terminateProcess,
179180 events,
181+ logFormatting : DefaultLogFormatter ,
180182 } ) ;
181183 if ( agentInstallStatusCode !== 0 ) {
182184 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');
66const { getKubeContext } = require ( '../../helpers/kubernetes' ) ;
77const ProgressEvents = require ( '../../helpers/progressEvents' ) ;
88const cliProgress = require ( 'cli-progress' ) ;
9+ const { DefaultLogFormatter } = require ( './../hybrid/helper' ) ;
910
1011
1112const unInstallAgentCmd = new Command ( {
@@ -76,6 +77,7 @@ const unInstallAgentCmd = new Command({
7677 kubeConfigPath,
7778 terminateProcess : false ,
7879 events,
80+ logFormatting : DefaultLogFormatter ,
7981 } ) ;
8082 if ( exitCode === 0 ) {
8183 console . log ( 'Agent uninsalled successfully' ) ;
Original file line number Diff line number Diff line change @@ -19,6 +19,8 @@ const INSTALLATION_DEFAULTS = {
1919 CF_CONTEXT_NAME : 'cf-runner' ,
2020} ;
2121
22+ const DefaultLogFormatter = 'plain' ;
23+
2224const defaultOpenIssueMessage = 'If you had any issues with this process please report them at: ' +
2325 `${ colors . blue ( 'https://github.com/codefresh-io/cli/issues/new' ) } ` ;
2426const url = _ . get ( sdk , 'config.context.url' , 'https://g.codefresh.io' ) ;
@@ -224,4 +226,5 @@ module.exports = {
224226 createProgressBar,
225227 getTestPipelineLink,
226228 INSTALLATION_DEFAULTS ,
229+ DefaultLogFormatter,
227230} ;
Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ const {
2121 executeTestPipeline,
2222 INSTALLATION_DEFAULTS ,
2323} = require ( './helper' ) ;
24-
24+ const figlet = require ( 'figlet' ) ;
2525
2626const handleError = createErrorHandler ( `\nIf you had any issues with the installation please report them at: ${ colors . blue ( 'https://github.com/codefresh-io/cli/issues/new' ) } ` ) ;
2727
@@ -324,6 +324,15 @@ const initCmd = new Command({
324324 console . log ( colors . green ( `\nDocumenation link: ${ colors . blue ( 'https://codefresh.io/docs/docs/enterprise/codefresh-runner/#codefresh-runner-preview-release' ) } ` ) ) ;
325325 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' ) } ` ) ) ;
326326 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+ } ) ;
327336 process . exit ( ) ; // TODO : This is not needed - needed to be fixed
328337 } ,
329338} ) ;
Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ const installRoot = require('../root/install.cmd');
44const { sdk } = require ( '../../../../logic' ) ;
55const ProgressEvents = require ( '../../helpers/progressEvents' ) ;
66const cliProgress = require ( 'cli-progress' ) ;
7+ const { DefaultLogFormatter } = require ( './../hybrid/helper' ) ;
78
89const installMonitorCmd = new Command ( {
910 root : false ,
@@ -72,6 +73,7 @@ const installMonitorCmd = new Command({
7273 verbose,
7374 events,
7475 codefreshHost : url ,
76+ logFormatting : DefaultLogFormatter ,
7577 } ) ;
7678 if ( monitorInstallStatusCode !== 0 ) {
7779 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');
44const { sdk } = require ( '../../../../logic' ) ;
55const ProgressEvents = require ( '../../helpers/progressEvents' ) ;
66const cliProgress = require ( 'cli-progress' ) ;
7+ const { DefaultLogFormatter } = require ( './../hybrid/helper' ) ;
78
89
910const unInstallAgentCmd = new Command ( {
@@ -60,6 +61,7 @@ const unInstallAgentCmd = new Command({
6061 kubeConfigPath,
6162 terminateProcess : false ,
6263 events,
64+ logFormatting : DefaultLogFormatter ,
6365 } ) ;
6466 if ( exitCode === 0 ) {
6567 console . log ( 'Monitor uninsalled successfully' ) ;
Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ const { sdk } = require('../../../../logic');
55const ProgressEvents = require ( '../../helpers/progressEvents' ) ;
66const cliProgress = require ( 'cli-progress' ) ;
77const { getKubeContext } = require ( '../../helpers/kubernetes' ) ;
8+ const { DefaultLogFormatter } = require ( './../hybrid/helper' ) ;
89
910const attachAgentToRuntime = async ( agent , name ) => {
1011 const rt = await sdk . runtimeEnvs . get ( { name } ) ;
@@ -141,6 +142,7 @@ const attachRuntimeCmd = new Command({
141142 restartAgent,
142143 terminateProcess : false ,
143144 events,
145+ logFormatting : DefaultLogFormatter ,
144146 } ) ;
145147 if ( ! restartAgent ) {
146148 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');
99const createClusterCmd = require ( '../cluster/create.cmd' ) ;
1010const colors = require ( 'colors' ) ;
1111const _ = require ( 'lodash' ) ;
12+ const { DefaultLogFormatter } = require ( './../hybrid/helper' ) ;
1213
1314const defaultNamespace = 'codefresh' ;
1415const maxRuntimeNameLength = 63 ;
@@ -259,6 +260,7 @@ const installRuntimeCmd = new Command({
259260 events : runtimeEvents ,
260261 skipClusterTest,
261262 storageClassName,
263+ logFormatting : DefaultLogFormatter ,
262264 } ) ;
263265 // attach RE to agent in codefresh
264266
Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ const { getKubeContext } = require('../../helpers/kubernetes');
66const _ = require ( 'lodash' ) ;
77const ProgressEvents = require ( '../../helpers/progressEvents' ) ;
88const cliProgress = require ( 'cli-progress' ) ;
9+ const { DefaultLogFormatter } = require ( './../hybrid/helper' ) ;
910
1011
1112const detachRuntimeFromAgent = async ( agent , runtimeName ) => {
@@ -140,6 +141,7 @@ const unInstallRuntimeCmd = new Command({
140141 verbose,
141142 terminateProcess : ( terminateProcess !== false ) ,
142143 events,
144+ logFormatting : DefaultLogFormatter ,
143145 } ) ;
144146 } ,
145147} ) ;
Original file line number Diff line number Diff line change 3737 "cf-errors" : " ^0.1.12" ,
3838 "chalk" : " ^1.1.3" ,
3939 "cli-progress" : " 3.6.0" ,
40- "codefresh-sdk" : " ^1.8.6 " ,
40+ "codefresh-sdk" : " ^1.9.1 " ,
4141 "colors" : " ^1.1.2" ,
4242 "columnify" : " ^1.5.4" ,
4343 "compare-versions" : " ^3.4.0" ,
4848 "diff" : " ^3.5.0" ,
4949 "dockerode" : " ^2.5.7" ,
5050 "draftlog" : " ^1.0.12" ,
51+ "figlet" : " ^1.4.0" ,
5152 "filesize" : " ^3.5.11" ,
5253 "firebase" : " git+https://github.com/codefresh-io/firebase.git#80b2ed883ff281cd67b53bd0f6a0bbd6f330fed5" ,
5354 "flat" : " ^4.1.0" ,
You can’t perform that action at this time.
0 commit comments