You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: lib/interface/cli/commands/agent/install.cmd.js
+4-4Lines changed: 4 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -108,7 +108,7 @@ const installAgentCmd = new Command({
108
108
agent=awaitsdk.agents.create({ name });
109
109
// eslint-disable-next-line prefer-destructuring
110
110
token=agent.token;
111
-
console.log(`An agent with name: ${colors.blue(name)} has been created\nMake sure to copy your access token now. You won’t be able to see it again`);
111
+
console.log(`A Codefresh Runner with name: ${colors.cyan(name)} has been created.\n${colors.yellow('*IMPORTANT*')} Make sure to copy your access token now and store it in a safe location. You won’t be able to see it again.`);
112
112
console.log(token);
113
113
}else{
114
114
// take the agent id from the token
@@ -120,7 +120,7 @@ const installAgentCmd = new Command({
120
120
const{ subject }=agentData;
121
121
122
122
if(subject.type!=='agent'){
123
-
thrownewError('token is not assosicated with agent');
123
+
thrownewError('token is not assosicated with a runner');
124
124
}
125
125
constagentId=agentData.subject.ref;
126
126
constdata=awaitsdk.agents.get({ agentId });
@@ -133,7 +133,7 @@ const installAgentCmd = new Command({
133
133
constprogressBar=newcliProgress.SingleBar({stopOnComplete: true, format },cliProgress.Presets.shades_classic);
description: 'Install codefresh runner solution\'s components on kubernetes cluster',
26
+
description: 'Install Codefresh Runner solution\'s components on kubernetes cluster',
24
27
webDocs: {
25
28
category: 'Runner',
26
29
title: 'Init',
@@ -48,6 +51,19 @@ const initCmd = new Command({
48
51
.option('dry-run',{
49
52
describe: 'Set to true to simulate installation',
50
53
})
54
+
.option('yes',{
55
+
describe: 'Use installation defaults (don\'t ask any questions)',
56
+
alias: 'y',
57
+
type: 'boolean',
58
+
})
59
+
.option('set-default-runtime',{
60
+
describe: 'Set this as the default runtime environment for your Codefresh account',
61
+
type: 'boolean',
62
+
})
63
+
.option('exec-demo-pipeline',{
64
+
describe: 'Run a demo pipeline after the installation completes',
65
+
type: 'boolean',
66
+
})
51
67
.option('in-cluster',{
52
68
describe: 'Set flag if venona is been installed from inside a cluster',
53
69
})
@@ -82,78 +98,100 @@ const initCmd = new Command({
82
98
'venona-version': venonaVersion,
83
99
'kube-config-path': kubeConfigPath,
84
100
'skip-version-check': skipVersionCheck,
101
+
yes: noQuestions,
85
102
verbose,
86
103
name, token, url,
87
104
}=argv;
88
105
let{
89
106
'kube-context-name': kubeContextName,
90
107
'kube-namespace': kubeNamespace,
108
+
'set-default-runtime': shouldMakeDefaultRe,
109
+
'exec-demo-pipeline': shouldExecutePipeline,
91
110
}=argv;
92
111
93
112
if(_.get(sdk,'config.context.isNoAuth')&&!token){
94
113
console.log('Not authenticated as a Codefresh account: ');
95
114
console.log('In order to install a Codefresh Runner you need to provide '+
96
-
`an authentication token which can be generated here: ${colors.blue(`${argv.url}/user/settings`)}.`+
97
-
'\nAfter getting the token you may run this command again with the [--token] option or use the codefresh auth command to create an authenticated context.');
115
+
`an authentication token which can be generated here: ${colors.blue(`${argv.url}/user/settings`)}`+
116
+
'\nAfter getting the token you may run this command again with the [--token] option or use the \'codefresh auth\' command to create an authenticated context.');
console.log(colors.green(`\nIf you had any issues with the installation please report them at: ${colors.blue('https://github.com/codefresh-io/cli/issues/new')}`));
180
218
process.exit();// TODO : This is not needed - needed to be fixed
0 commit comments