Skip to content

Commit 7435919

Browse files
rename provider (#603)
* rename provider * validate argument
1 parent 6e97b80 commit 7435919

File tree

2 files changed

+13
-8
lines changed

2 files changed

+13
-8
lines changed

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

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ const installArgoCmd = new Command({
1111
root: false,
1212
parent: installRoot,
1313
command: 'gitops <provider>',
14-
description: 'Install gitops agent',
14+
description: 'Install gitops',
1515
webDocs: {
1616
category: 'Gitops',
1717
title: 'Install',
@@ -21,14 +21,14 @@ const installArgoCmd = new Command({
2121
.env('CF_ARG_')
2222
.positional('provider', {
2323
describe: 'Gitops provider',
24-
choices: ['argocd', 'argocd-agent'],
24+
choices: ['codefresh', 'argocd-agent'],
2525
required: true,
2626
})
2727
.option('git-integration', {
2828
describe: 'Name of git integration in Codefresh',
2929
})
3030
.option('codefresh-integration', {
31-
describe: 'Name of argocd integration in Codefresh',
31+
describe: 'Name of gitops integration in Codefresh',
3232
})
3333
.option('argo-host', {
3434
describe: 'Host of argocd installation',
@@ -44,7 +44,7 @@ const installArgoCmd = new Command({
4444
describe: 'Password of existing argocd installation. Should be used with argo-username',
4545
})
4646
.option('update', {
47-
describe: 'Update argocd integration if exists',
47+
describe: 'Update gitops integration if exists',
4848
})
4949
.option('kube-config-path', {
5050
describe: 'Path to kubeconfig file (default is $HOME/.kube/config)',
@@ -75,11 +75,11 @@ const installArgoCmd = new Command({
7575
})
7676
// argocd options
7777
.option('install-manifest', {
78-
describe: 'url of argocd install manifest',
78+
describe: 'Url of argocd install manifest',
7979
default: 'https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml',
8080
})
8181
.option('set-argo-password', {
82-
describe: 'set password for admin user of new argocd installation',
82+
describe: 'Set password for admin user of new argocd installation',
8383
}),
8484
handler: async (argv) => {
8585
let {
@@ -97,12 +97,17 @@ const installArgoCmd = new Command({
9797
'set-argo-password': setArgoPassword,
9898
} = argv;
9999

100-
if (provider === 'argocd') {
100+
if (provider === 'codefresh') {
101101
if (!setArgoPassword) {
102102
console.error('\nMissing required argument: set-argo-password');
103103
process.exit(1);
104104
}
105105

106+
if (!kubeNamespace) {
107+
console.error('\nMissing required argument: kube-namespace');
108+
process.exit(1);
109+
}
110+
106111
const result = await installArgocd({
107112
installManifest,
108113
kubeNamespace,

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "codefresh",
3-
"version": "0.73.26",
3+
"version": "0.73.27",
44
"description": "Codefresh command line utility",
55
"main": "index.js",
66
"preferGlobal": true,

0 commit comments

Comments
 (0)