diff --git a/lib/interface/cli/commands/argocd/install.cmd.js b/lib/interface/cli/commands/argocd/install.cmd.js index 797dd9fcf..3e0aef148 100644 --- a/lib/interface/cli/commands/argocd/install.cmd.js +++ b/lib/interface/cli/commands/argocd/install.cmd.js @@ -15,38 +15,8 @@ const installArgoCmd = new Command({ weight: 100, }, builder: yargs => yargs - .env('CF_ARG_') // this means that every process.env.CF_ARG_* will be passed to argv - .option('token', { - describe: 'Codefresh user token', - }) - .option('kube-context-name', { - describe: 'Name of the kubernetes context on which argocd-agent should be installed [$CF_ARG_KUBE_CONTEXT_NAME]', - }) - .option('url', { - describe: 'Codefresh url, by default https://g.codefresh.io', - }) - .option('kube-namespace', { - describe: 'Name of the namespace on which argocd-agent should be installed [$CF_ARG_KUBE_NAMESPACE]', - }) - .option('argo-host', { - describe: 'Argocd host, exaple is https://argohost.com', - }) - .option('argo-username', { - describe: 'Argocd admin username', - }) - .option('argo-password', { - describe: 'Argocd admin password', - }), - handler: async (argv) => { - const { - url, - token, - 'kube-context-name': kubeContextName, - 'kube-namespace': kubeNamespace, - 'argo-host': argoHost, - 'argo-password': argoPassword, - 'argo-username': argoUsername, - } = argv; + .env('CF_ARG_'), + handler: async () => { const binLocation = await downloadArgo(); const componentRunner = new Runner(binLocation); @@ -54,42 +24,6 @@ const installArgoCmd = new Command({ 'install', ]; - if (token) { - commands.push('--codefresh-token'); - commands.push(token); - } - - if (kubeContextName) { - commands.push('--kube-context-name'); - commands.push(kubeContextName); - } - - if (kubeNamespace) { - commands.push('--kube-namespace'); - commands.push(kubeNamespace); - } - - if (url) { - commands.push('--codefresh-host'); - commands.push(url); - } - - if (argoHost) { - commands.push('--argo-host'); - commands.push(argoHost); - } - - if (argoPassword) { - commands.push('--argo-password'); - commands.push(argoPassword); - } - - if (argoUsername) { - commands.push('--argo-username'); - commands.push(argoUsername); - } - - await componentRunner.run(components.argo, commands); }, }); diff --git a/lib/interface/cli/commands/argocd/uninstall.cmd.js b/lib/interface/cli/commands/argocd/uninstall.cmd.js index 0fc901783..2c1d2e382 100644 --- a/lib/interface/cli/commands/argocd/uninstall.cmd.js +++ b/lib/interface/cli/commands/argocd/uninstall.cmd.js @@ -16,36 +16,13 @@ const unInstallAgentCmd = new Command({ weight: 100, }, builder: yargs => yargs - .env('CF_ARG_') // this means that every process.env.CF_ARG_* will be passed to argv - .option('kube-context-name', { - describe: 'Name of the kubernetes context on which argocd-agent should be uninstalled [$CF_ARG_KUBE_CONTEXT_NAME]', - }) - .option('kube-namespace', { - describe: 'Name of the namespace on which argocd-agent should be uninstalled [$CF_ARG_KUBE_NAMESPACE]', - }), - handler: async (argv) => { - const { - 'kube-namespace': kubeNamespace, - 'kube-context-name': kubeContextName, - } = argv; - + .env('CF_ARG_'), + handler: async () => { const binLocation = await downloadArgo(); const componentRunner = new Runner(binLocation); - const commands = [ 'uninstall', ]; - - if (kubeContextName) { - commands.push('--kube-context-name'); - commands.push(kubeContextName); - } - - if (kubeNamespace) { - commands.push('--kube-namespace'); - commands.push(kubeNamespace); - } - await componentRunner.run(components.argo, commands); }, }); diff --git a/package.json b/package.json index 3446e1492..da1e37d69 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "codefresh", - "version": "0.72.5", + "version": "0.72.6", "description": "Codefresh command line utility", "main": "index.js", "preferGlobal": true,