Skip to content

Commit

Permalink
refactor(cli): add helmpath option in scaffold command (#2204)
Browse files Browse the repository at this point in the history
add helmpath option in scaffold command

GH-2199

Co-authored-by: yeshamavani <[email protected]>
  • Loading branch information
Surbhi-sharma1 and yeshamavani authored Nov 20, 2024
1 parent 4ee8419 commit 78a0875
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 18 deletions.
7 changes: 0 additions & 7 deletions packages/cli/src/__tests__/suite/scaffold.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ export const scaffoldSuite = [
type: 'input',
name: 'helmPath',
message: 'Enter the path for Helm chart:',
default: '',
},
output: 'helm test path',
},
Expand Down Expand Up @@ -136,7 +135,6 @@ export const scaffoldSuite = [
type: 'input',
name: 'helmPath',
message: 'Enter the path for Helm chart:',
default: '',
},
output: 'helm test path',
},
Expand Down Expand Up @@ -204,7 +202,6 @@ export const scaffoldSuite = [
type: 'input',
name: 'helmPath',
message: 'Enter the path for Helm chart:',
default: '',
},
output: 'helm test path',
},
Expand Down Expand Up @@ -263,7 +260,6 @@ export const scaffoldSuite = [
type: 'input',
name: 'helmPath',
message: 'Enter the path for Helm chart:',
default: '',
},
output: 'helm test path',
},
Expand Down Expand Up @@ -323,7 +319,6 @@ export const scaffoldSuite = [
type: 'input',
name: 'helmPath',
message: 'Enter the path for Helm chart:',
default: '',
},
output: 'helm test path',
},
Expand Down Expand Up @@ -390,7 +385,6 @@ export const scaffoldSuite = [
type: 'input',
name: 'helmPath',
message: 'Enter the path for Helm chart:',
default: '',
},
output: 'helm test path',
},
Expand Down Expand Up @@ -424,7 +418,6 @@ export const scaffoldSuite = [
type: 'input',
name: 'helmPath',
message: 'Enter the path for Helm chart:',
default: '',
},
output: 'helm test path',
},
Expand Down
11 changes: 0 additions & 11 deletions packages/cli/src/command-base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,17 +92,6 @@ export default abstract class CommandBase<T extends object> extends Command {
}
}
}
if (options['jenkinsfile']) {

const helmPathPrompt: Question = {
type: 'input',
name: 'helmPath',
message: 'Enter the path for Helm chart:',
default: '',
};
const helmPathAnswer = await this.prompt([helmPathPrompt]);
options['helmPath'] = helmPathAnswer['helmPath'];
}
}

private createPromptObject<S>(flag: IFlag<S>) {
Expand Down
5 changes: 5 additions & 0 deletions packages/cli/src/commands/scaffold.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,11 @@ export class Scaffold extends Base<ScaffoldOptions> {
'Do you want to create a Jenkinsfile for Helm-based deployment on Kubernetes?',
required: false,
}),
helmPath: flags.string({
name: 'helmPath',
description: 'Enter the path for Helm chart:',
dependsOn: ['jenkinsfile'],
}),
};
static readonly args = [
{name: 'name', description: 'name of the project', required: false},
Expand Down

0 comments on commit 78a0875

Please sign in to comment.