Skip to content

Commit 78a0875

Browse files
refactor(cli): add helmpath option in scaffold command (#2204)
add helmpath option in scaffold command GH-2199 Co-authored-by: yeshamavani <[email protected]>
1 parent 4ee8419 commit 78a0875

File tree

3 files changed

+5
-18
lines changed

3 files changed

+5
-18
lines changed

packages/cli/src/__tests__/suite/scaffold.ts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,6 @@ export const scaffoldSuite = [
6868
type: 'input',
6969
name: 'helmPath',
7070
message: 'Enter the path for Helm chart:',
71-
default: '',
7271
},
7372
output: 'helm test path',
7473
},
@@ -136,7 +135,6 @@ export const scaffoldSuite = [
136135
type: 'input',
137136
name: 'helmPath',
138137
message: 'Enter the path for Helm chart:',
139-
default: '',
140138
},
141139
output: 'helm test path',
142140
},
@@ -204,7 +202,6 @@ export const scaffoldSuite = [
204202
type: 'input',
205203
name: 'helmPath',
206204
message: 'Enter the path for Helm chart:',
207-
default: '',
208205
},
209206
output: 'helm test path',
210207
},
@@ -263,7 +260,6 @@ export const scaffoldSuite = [
263260
type: 'input',
264261
name: 'helmPath',
265262
message: 'Enter the path for Helm chart:',
266-
default: '',
267263
},
268264
output: 'helm test path',
269265
},
@@ -323,7 +319,6 @@ export const scaffoldSuite = [
323319
type: 'input',
324320
name: 'helmPath',
325321
message: 'Enter the path for Helm chart:',
326-
default: '',
327322
},
328323
output: 'helm test path',
329324
},
@@ -390,7 +385,6 @@ export const scaffoldSuite = [
390385
type: 'input',
391386
name: 'helmPath',
392387
message: 'Enter the path for Helm chart:',
393-
default: '',
394388
},
395389
output: 'helm test path',
396390
},
@@ -424,7 +418,6 @@ export const scaffoldSuite = [
424418
type: 'input',
425419
name: 'helmPath',
426420
message: 'Enter the path for Helm chart:',
427-
default: '',
428421
},
429422
output: 'helm test path',
430423
},

packages/cli/src/command-base.ts

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -92,17 +92,6 @@ export default abstract class CommandBase<T extends object> extends Command {
9292
}
9393
}
9494
}
95-
if (options['jenkinsfile']) {
96-
97-
const helmPathPrompt: Question = {
98-
type: 'input',
99-
name: 'helmPath',
100-
message: 'Enter the path for Helm chart:',
101-
default: '',
102-
};
103-
const helmPathAnswer = await this.prompt([helmPathPrompt]);
104-
options['helmPath'] = helmPathAnswer['helmPath'];
105-
}
10695
}
10796

10897
private createPromptObject<S>(flag: IFlag<S>) {

packages/cli/src/commands/scaffold.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,11 @@ export class Scaffold extends Base<ScaffoldOptions> {
4343
'Do you want to create a Jenkinsfile for Helm-based deployment on Kubernetes?',
4444
required: false,
4545
}),
46+
helmPath: flags.string({
47+
name: 'helmPath',
48+
description: 'Enter the path for Helm chart:',
49+
dependsOn: ['jenkinsfile'],
50+
}),
4651
};
4752
static readonly args = [
4853
{name: 'name', description: 'name of the project', required: false},

0 commit comments

Comments
 (0)