Skip to content

Commit 1afe2cb

Browse files
author
Oleg Sucharevich
authored
Revert "Saas 7290 (#484)" (#488)
This reverts commit 19f0a56.
1 parent 19f0a56 commit 1afe2cb

File tree

9 files changed

+21
-292
lines changed

9 files changed

+21
-292
lines changed

lib/binary/components.js

Lines changed: 0 additions & 38 deletions
This file was deleted.

lib/binary/downloader.js

Lines changed: 0 additions & 166 deletions
This file was deleted.

lib/binary/index.js

Lines changed: 0 additions & 10 deletions
This file was deleted.

lib/binary/runner.js

Lines changed: 0 additions & 30 deletions
This file was deleted.

lib/interface/cli/commands/agent/install.cmd.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,9 @@ const installAgentCmd = new Command({
6969
.option('storage-class-name', {
7070
describe: 'Set a name of your custom storage class, note: this will not install volume provisioning components',
7171
})
72+
.option('skip-cluster-test', {
73+
describe: 'Do not run cluster acceptance test',
74+
})
7275
.option('agent-kube-context-name', {
7376
describe: 'Agent kubernetes context (on attach)',
7477
})
@@ -93,6 +96,7 @@ const installAgentCmd = new Command({
9396
'skip-version-check': skipVersionCheck,
9497
'install-runtime': installRuntime,
9598
'make-default-runtime': shouldMakeDefaultRe,
99+
'skip-cluster-test': skipClusterTest,
96100
'storage-class-name': storageClassName,
97101
verbose,
98102
terminateProcess,
@@ -169,6 +173,7 @@ const installAgentCmd = new Command({
169173
venonaVersion,
170174
kubeConfigPath,
171175
skipVersionCheck,
176+
skipClusterTest,
172177
verbose,
173178
agentId: name,
174179
terminateProcess,
@@ -187,6 +192,7 @@ const installAgentCmd = new Command({
187192
'attach-runtime': true,
188193
'restart-agent': true,
189194
'make-default-runtime': shouldMakeDefaultRe,
195+
'skip-cluster-test': skipClusterTest,
190196
'storage-class-name': storageClassName,
191197
'set-value': setValue,
192198
'set-file': setFile,

lib/interface/cli/commands/hybrid/init.cmd.js

Lines changed: 4 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -2,30 +2,26 @@
22
const Command = require('../../Command');
33
const runnerRoot = require('../root/runner.cmd');
44
const inquirer = require('inquirer');
5-
const colors = require('colors');
6-
const figlet = require('figlet');
7-
const _ = require('lodash');
8-
const cliProgress = require('cli-progress');
95
const { getAllKubeContexts, getKubeContext, getAllNamespaces } = require('../../helpers/kubernetes');
106
const installAgent = require('../agent/install.cmd');
117
const installMonitoring = require('../monitor/install.cmd');
128
const createContext = require('../auth/create-context.cmd');
139
const getAgents = require('../agent/get.cmd');
1410
const { getConfigForSdk } = require('../../commad-line-interface');
11+
const colors = require('colors');
1512
const DEFAULTS = require('../../defaults');
1613
const sdk = require('../../../../logic/sdk');
14+
const _ = require('lodash');
1715
const installationProgress = require('./installation-process');
1816
const { to } = require('./../../../../logic/cli-config/errors/awaitTo');
19-
const { createErrorHandler, DefaultLogFormatter } = require('./helper');
17+
const { createErrorHandler } = require('./helper');
2018
const {
2119
getTestPipeline,
2220
createTestPipeline,
2321
executeTestPipeline,
2422
INSTALLATION_DEFAULTS,
2523
} = require('./helper');
26-
const {
27-
components, Runner, Downloader, CommonProgressFormat,
28-
} = require('./../../../../binary');
24+
const figlet = require('figlet');
2925

3026
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')}`);
3127

@@ -117,10 +113,6 @@ const initCmd = new Command({
117113
alias: 'y',
118114
type: 'boolean',
119115
})
120-
.option('skip-cluster-test', {
121-
describe: 'Do not test given kubeconfig context to have all the required permission',
122-
type: 'boolean',
123-
})
124116
.option('set-default-runtime', {
125117
describe: 'Set this as the default runtime environment for your Codefresh account',
126118
type: 'boolean',
@@ -162,7 +154,6 @@ const initCmd = new Command({
162154
token,
163155
'set-value': setValue,
164156
'set-file': setFile,
165-
'skip-cluster-test': skipClusterTest,
166157
} = argv;
167158
let {
168159
'kube-context-name': kubeContextName,
@@ -271,33 +262,6 @@ const initCmd = new Command({
271262

272263
const progressReporter = installationProgress.buildReporter(sdk['runner-installation'], progress);
273264

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-
}
301265

302266
if (token) {
303267
// Create a new context and switch to that context

lib/interface/cli/commands/runtimeEnvironments/install.cmd.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,9 @@ const installRuntimeCmd = new Command({
110110
.option('make-default-runtime', {
111111
describe: 'should all pipelines run on the this runtime (default is false)',
112112
})
113+
.option('skip-cluster-test', {
114+
describe: 'Do not run cluster acceptance test',
115+
})
113116
.option('verbose', {
114117
describe: 'Print logs',
115118
}),
@@ -130,6 +133,7 @@ const installRuntimeCmd = new Command({
130133
'cluster-service-account': clusterServiceAccount,
131134
'make-default-runtime': shouldMakeDefaultRe,
132135
terminateProcess,
136+
'skip-cluster-test': skipClusterTest,
133137
} = argv;
134138

135139
let {
@@ -254,6 +258,7 @@ const installRuntimeCmd = new Command({
254258
setFile,
255259
terminateProcess: !attachRuntime,
256260
events: runtimeEvents,
261+
skipClusterTest,
257262
storageClassName,
258263
logFormatting: DefaultLogFormatter,
259264
});

0 commit comments

Comments
 (0)