@@ -53,12 +53,16 @@ function printInstallationOptionsSummary({
53
53
kubeNamespace,
54
54
shouldMakeDefaultRe,
55
55
shouldExecutePipeline,
56
+ httpProxy,
57
+ httpsProxy,
56
58
} ) {
57
59
console . log ( `\n${ colors . green ( 'Installation options summary:' ) }
58
60
1. Kubernetes Context: ${ colors . cyan ( kubeContextName ) }
59
61
2. Kubernetes Namespace: ${ colors . cyan ( kubeNamespace ) }
60
62
3. Set this as default account runtime-environment: ${ colors . cyan ( ! ! shouldMakeDefaultRe ) }
61
63
4. Execute demo pipeline after install: ${ colors . cyan ( ! ! shouldExecutePipeline ) }
64
+ 5. HTTP proxy: ${ httpProxy ? colors . cyan ( httpProxy ) : 'none' }
65
+ 6. HTTPS proxy: ${ httpsProxy ? colors . cyan ( httpsProxy ) : 'none' }
62
66
` ) ;
63
67
}
64
68
@@ -145,6 +149,9 @@ const initCmd = new Command({
145
149
. option ( 'https-proxy' , {
146
150
describe : 'https proxy to be used in the runner' ,
147
151
} )
152
+ . option ( 'non-interactive' , {
153
+ describe : 'setting this flag will make the installation non interactive' ,
154
+ } )
148
155
. option ( 'verbose' , {
149
156
describe : 'Print logs' ,
150
157
} )
@@ -216,10 +223,10 @@ const initCmd = new Command({
216
223
httpsProxy = httpsProxy || detectedProxyVars . httpsProxy ;
217
224
if ( noQuestions ) {
218
225
// use defaults
219
- kubeContextName = getKubeContext ( kubeConfigPath ) ;
220
- kubeNamespace = await getRecommendedKubeNamespace ( kubeConfigPath , kubeContextName ) ;
221
- shouldMakeDefaultRe = INSTALLATION_DEFAULTS . MAKE_DEFAULT_RE ;
222
- shouldExecutePipeline = INSTALLATION_DEFAULTS . RUN_DEMO_PIPELINE ;
226
+ kubeContextName = kubeContextName || getKubeContext ( kubeConfigPath ) ;
227
+ kubeNamespace = kubeNamespace || await getRecommendedKubeNamespace ( kubeConfigPath , kubeContextName ) ;
228
+ shouldMakeDefaultRe = _ . isUndefined ( shouldMakeDefaultRe ) ? INSTALLATION_DEFAULTS . MAKE_DEFAULT_RE : shouldMakeDefaultRe ;
229
+ shouldExecutePipeline = _ . isUndefined ( shouldExecutePipeline ) ? INSTALLATION_DEFAULTS . RUN_DEMO_PIPELINE : shouldExecutePipeline ;
223
230
} else if ( ! resumedInstallation ) {
224
231
console . log ( colors . green ( 'This installer will guide you through the Codefresh Runner installation process' ) ) ;
225
232
if ( ! kubeContextName ) {
@@ -306,6 +313,8 @@ const initCmd = new Command({
306
313
kubeNamespace,
307
314
shouldMakeDefaultRe,
308
315
shouldExecutePipeline,
316
+ httpProxy,
317
+ httpsProxy,
309
318
} ) ;
310
319
311
320
if ( token ) {
0 commit comments