Skip to content

Commit 0c31cc1

Browse files
Cr 1885 revert3 (#604)
* Revert "rename provider (#603)" This reverts commit 7435919 * Revert "- fix spelling mistake (#602)" This reverts commit 6e97b80 * Revert "Cr 1885 inst contr (#598)" This reverts commit f613666 * Revert "Cr 1885 inst contr (#598)" This reverts commit f613666
1 parent 7435919 commit 0c31cc1

File tree

5 files changed

+13
-189
lines changed

5 files changed

+13
-189
lines changed

.eslintrc.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@ module.exports = {
1010
'code': 140,
1111
'ignoreComments': true
1212
}],
13-
'no-console': 0,
14-
'object-curly-newline': 0,
13+
'no-console': 0
1514
},
1615
'env': {
1716
'jest': true,

lib/interface/cli/commands/gitops/install-argocd.js

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

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

Lines changed: 11 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,12 @@ const installRoot = require('../root/install.cmd');
55
const { detectProxy } = require('../../helpers/general');
66
const { downloadProvider } = require('../hybrid/helper');
77
const { Runner, components } = require('../../../../binary');
8-
const { install: installArgocd } = require('./install-argocd');
98

109
const installArgoCmd = new Command({
1110
root: false,
1211
parent: installRoot,
1312
command: 'gitops <provider>',
14-
description: 'Install gitops',
13+
description: 'Install gitops agent',
1514
webDocs: {
1615
category: 'Gitops',
1716
title: 'Install',
@@ -21,14 +20,14 @@ const installArgoCmd = new Command({
2120
.env('CF_ARG_')
2221
.positional('provider', {
2322
describe: 'Gitops provider',
24-
choices: ['codefresh', 'argocd-agent'],
23+
choices: ['argocd-agent'],
2524
required: true,
2625
})
2726
.option('git-integration', {
2827
describe: 'Name of git integration in Codefresh',
2928
})
3029
.option('codefresh-integration', {
31-
describe: 'Name of gitops integration in Codefresh',
30+
describe: 'Name of argocd integration in Codefresh',
3231
})
3332
.option('argo-host', {
3433
describe: 'Host of argocd installation',
@@ -37,14 +36,13 @@ const installArgoCmd = new Command({
3736
describe: 'Token of argocd installation. Preferred auth method',
3837
})
3938
.option('argo-username', {
40-
default: 'admin',
41-
describe: 'Username of existing argocd installation. Should be used with argo-password',
39+
describe: 'Username of argocd installation. Should be used with argo-password',
4240
})
4341
.option('argo-password', {
44-
describe: 'Password of existing argocd installation. Should be used with argo-username',
42+
describe: 'Username of argocd installation. Should be used with argo-username',
4543
})
4644
.option('update', {
47-
describe: 'Update gitops integration if exists',
45+
describe: 'Update argocd integration if exists',
4846
})
4947
.option('kube-config-path', {
5048
describe: 'Path to kubeconfig file (default is $HOME/.kube/config)',
@@ -72,53 +70,16 @@ const installArgoCmd = new Command({
7270
})
7371
.option('https-proxy', {
7472
describe: 'https proxy to be used in the runner',
75-
})
76-
// argocd options
77-
.option('install-manifest', {
78-
describe: 'Url of argocd install manifest',
79-
default: 'https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml',
80-
})
81-
.option('set-argo-password', {
82-
describe: 'Set password for admin user of new argocd installation',
8373
}),
8474
handler: async (argv) => {
8575
let {
76+
// eslint-disable-next-line prefer-const
77+
'kube-config-path': kubeConfigPath,
78+
// eslint-disable-next-line prefer-const
8679
provider,
8780
'http-proxy': httpProxy,
8881
'https-proxy': httpsProxy,
89-
'argo-host': argoHost,
90-
'argo-username': argoUsername,
91-
'argo-password': argoPassword,
9282
} = argv;
93-
const {
94-
'kube-config-path': kubeConfigPath,
95-
'install-manifest': installManifest,
96-
'kube-namespace': kubeNamespace,
97-
'set-argo-password': setArgoPassword,
98-
} = argv;
99-
100-
if (provider === 'codefresh') {
101-
if (!setArgoPassword) {
102-
console.error('\nMissing required argument: set-argo-password');
103-
process.exit(1);
104-
}
105-
106-
if (!kubeNamespace) {
107-
console.error('\nMissing required argument: kube-namespace');
108-
process.exit(1);
109-
}
110-
111-
const result = await installArgocd({
112-
installManifest,
113-
kubeNamespace,
114-
setArgoPassword,
115-
});
116-
117-
provider = 'argocd-agent';
118-
argoHost = result.host;
119-
argoUsername = 'admin';
120-
argoPassword = setArgoPassword;
121-
}
12283

12384
const binLocation = await downloadProvider({ provider });
12485
const componentRunner = new Runner(binLocation);
@@ -132,11 +93,8 @@ const installArgoCmd = new Command({
13293
commands.push(kubeConfigPath);
13394
}
13495

135-
const installOptions = _.pick(argv, ['git-integration', 'codefresh-integration', 'argo-token', 'output',
136-
'update', 'kube-context-name', 'kube-namespace', 'sync-mode', 'sync-apps']);
137-
installOptions['argo-host'] = argoHost;
138-
installOptions['argo-username'] = argoUsername;
139-
installOptions['argo-password'] = argoPassword;
96+
const installOptions = _.pick(argv, ['git-integration', 'codefresh-integration', 'argo-host', 'argo-token', 'output',
97+
'argo-username', 'argo-password', 'update', 'kube-context-name', 'kube-namespace', 'sync-mode', 'sync-apps']);
14098

14199
_.forEach(installOptions, (value, key) => {
142100
if (_.isArray(value)) {

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "codefresh",
3-
"version": "0.73.27",
3+
"version": "0.73.28",
44
"description": "Codefresh command line utility",
55
"main": "index.js",
66
"preferGlobal": true,
@@ -64,7 +64,6 @@
6464
"mongodb": "^3.0.1",
6565
"ora": "^3.0.0",
6666
"prettyjson": "^1.2.1",
67-
"promise-retry": "^2.0.1",
6867
"recursive-readdir": "^2.2.1",
6968
"request": "^2.88.0",
7069
"request-promise": "^4.2.2",

yarn.lock

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1924,11 +1924,6 @@ end-of-stream@^1.0.0, end-of-stream@^1.1.0:
19241924
dependencies:
19251925
once "^1.4.0"
19261926

1927-
err-code@^2.0.2:
1928-
version "2.0.3"
1929-
resolved "https://registry.yarnpkg.com/err-code/-/err-code-2.0.3.tgz#23c2f3b756ffdfc608d30e27c9a941024807e7f9"
1930-
integrity sha512-2bmlRpNKBxT/CRmPOlyISQpNj+qSeYvcym/uT0Jx2bMOlKLtSy1ZmLuVxSEKKyor/N5yhvp/ZiG1oE3DEYMSFA==
1931-
19321927
error-ex@^1.2.0:
19331928
version "1.3.2"
19341929
resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.2.tgz#b4ac40648107fdcdcfae242f428bea8a14d4f1bf"
@@ -5467,14 +5462,6 @@ progress@2.0.3, progress@^2.0.0, progress@~2.0.0:
54675462
resolved "https://registry.yarnpkg.com/progress/-/progress-2.0.3.tgz#7e8cf8d8f5b8f239c1bc68beb4eb78567d572ef8"
54685463
integrity sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==
54695464

5470-
promise-retry@^2.0.1:
5471-
version "2.0.1"
5472-
resolved "https://registry.yarnpkg.com/promise-retry/-/promise-retry-2.0.1.tgz#ff747a13620ab57ba688f5fc67855410c370da22"
5473-
integrity sha512-y+WKFlBR8BGXnsNlIHFGPZmyDf3DFMoLhaflAnyZgV6rG6xu+JwesTo2Q9R6XwYmtmwAFCkAk3e35jEdoeh/3g==
5474-
dependencies:
5475-
err-code "^2.0.2"
5476-
retry "^0.12.0"
5477-
54785465
prompts@^0.1.9:
54795466
version "0.1.14"
54805467
resolved "https://registry.yarnpkg.com/prompts/-/prompts-0.1.14.tgz#a8e15c612c5c9ec8f8111847df3337c9cbd443b2"
@@ -5984,11 +5971,6 @@ retry@^0.10.0:
59845971
resolved "https://registry.yarnpkg.com/retry/-/retry-0.10.1.tgz#e76388d217992c252750241d3d3956fed98d8ff4"
59855972
integrity sha1-52OI0heZLCUnUCQdPTlW/tmNj/Q=
59865973

5987-
retry@^0.12.0:
5988-
version "0.12.0"
5989-
resolved "https://registry.yarnpkg.com/retry/-/retry-0.12.0.tgz#1b42a6266a21f07421d1b0b54b7dc167b01c013b"
5990-
integrity sha1-G0KmJmoh8HQh0bC1S33BZ7AcATs=
5991-
59925974
rimraf@^2.2.8, rimraf@^2.5.4, rimraf@^2.6.1, rimraf@^2.6.2:
59935975
version "2.7.1"
59945976
resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.7.1.tgz#35797f13a7fdadc566142c29d4f07ccad483e3ec"

0 commit comments

Comments
 (0)