|
2 | 2 | const Command = require('../../Command'); |
3 | 3 | const runnerRoot = require('../root/runner.cmd'); |
4 | 4 | const inquirer = require('inquirer'); |
5 | | -const colors = require('colors'); |
6 | | -const figlet = require('figlet'); |
7 | | -const _ = require('lodash'); |
8 | | -const cliProgress = require('cli-progress'); |
9 | 5 | const { getAllKubeContexts, getKubeContext, getAllNamespaces } = require('../../helpers/kubernetes'); |
10 | 6 | const installAgent = require('../agent/install.cmd'); |
11 | 7 | const installMonitoring = require('../monitor/install.cmd'); |
12 | 8 | const createContext = require('../auth/create-context.cmd'); |
13 | 9 | const getAgents = require('../agent/get.cmd'); |
14 | 10 | const { getConfigForSdk } = require('../../commad-line-interface'); |
| 11 | +const colors = require('colors'); |
15 | 12 | const DEFAULTS = require('../../defaults'); |
16 | 13 | const sdk = require('../../../../logic/sdk'); |
| 14 | +const _ = require('lodash'); |
17 | 15 | const installationProgress = require('./installation-process'); |
18 | 16 | const { to } = require('./../../../../logic/cli-config/errors/awaitTo'); |
19 | | -const { createErrorHandler, DefaultLogFormatter } = require('./helper'); |
| 17 | +const { createErrorHandler } = require('./helper'); |
20 | 18 | const { |
21 | 19 | getTestPipeline, |
22 | 20 | createTestPipeline, |
23 | 21 | executeTestPipeline, |
24 | 22 | INSTALLATION_DEFAULTS, |
25 | 23 | } = require('./helper'); |
26 | | -const { |
27 | | - components, Runner, Downloader, CommonProgressFormat, |
28 | | -} = require('./../../../../binary'); |
| 24 | +const figlet = require('figlet'); |
29 | 25 |
|
30 | 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')}`); |
31 | 27 |
|
@@ -117,10 +113,6 @@ const initCmd = new Command({ |
117 | 113 | alias: 'y', |
118 | 114 | type: 'boolean', |
119 | 115 | }) |
120 | | - .option('skip-cluster-test', { |
121 | | - describe: 'Do not test given kubeconfig context to have all the required permission', |
122 | | - type: 'boolean', |
123 | | - }) |
124 | 116 | .option('set-default-runtime', { |
125 | 117 | describe: 'Set this as the default runtime environment for your Codefresh account', |
126 | 118 | type: 'boolean', |
@@ -162,7 +154,6 @@ const initCmd = new Command({ |
162 | 154 | token, |
163 | 155 | 'set-value': setValue, |
164 | 156 | 'set-file': setFile, |
165 | | - 'skip-cluster-test': skipClusterTest, |
166 | 157 | } = argv; |
167 | 158 | let { |
168 | 159 | 'kube-context-name': kubeContextName, |
@@ -271,33 +262,6 @@ const initCmd = new Command({ |
271 | 262 |
|
272 | 263 | const progressReporter = installationProgress.buildReporter(sdk['runner-installation'], progress); |
273 | 264 |
|
274 | | - const downloader = new Downloader({ |
275 | | - progress: new cliProgress.SingleBar( |
276 | | - { |
277 | | - stopOnComplete: true, |
278 | | - format: CommonProgressFormat, |
279 | | - }, |
280 | | - cliProgress.Presets.shades_classic, |
281 | | - ), |
282 | | - }); |
283 | | - await downloader.download(components.venona); |
284 | | - const componentRunner = new Runner(); |
285 | | - |
286 | | - if (skipClusterTest) { |
287 | | - console.log('Skipping cluster requirements tests.'); |
288 | | - } else { |
289 | | - const cmd = ['test', '--log-formtter', DefaultLogFormatter]; |
290 | | - if (kubeNamespace) { |
291 | | - cmd.push('--kube-namespace'); |
292 | | - cmd.push(kubeNamespace); |
293 | | - } |
294 | | - if (kubeConfigPath) { |
295 | | - cmd.push('--kube-config-path'); |
296 | | - cmd.push(kubeConfigPath); |
297 | | - } |
298 | | - const [err] = await to(componentRunner.run(components.venona, cmd)); |
299 | | - await handleError(err, 'Failed to run cluster test'); |
300 | | - } |
301 | 265 |
|
302 | 266 | if (token) { |
303 | 267 | // Create a new context and switch to that context |
|
0 commit comments