You've already forked sap-jenkins-library
mirror of
https://github.com/SAP/jenkins-library.git
synced 2025-09-16 09:26:22 +02:00
add workDir generalConfig
This commit is contained in:
@@ -74,6 +74,7 @@ const (
|
|||||||
|
|
||||||
type generalConfig struct {
|
type generalConfig struct {
|
||||||
Verbose bool
|
Verbose bool
|
||||||
|
WorkingDirectory string
|
||||||
}
|
}
|
||||||
|
|
||||||
type {{ .StepName }}Options struct {
|
type {{ .StepName }}Options struct {
|
||||||
@@ -141,6 +142,7 @@ func {{.CobraCmdFuncName}}() *cobra.Command {
|
|||||||
func defineInputSources(stepCmd *cobra.Command, stepConfig *{{ .StepName }}Options) {
|
func defineInputSources(stepCmd *cobra.Command, stepConfig *{{ .StepName }}Options) {
|
||||||
// General configuration
|
// General configuration
|
||||||
stepCmd.Flags().BoolVarP(&stepConfig.Verbose, "verbose", "v", false, "Enables verbose output for the step.")
|
stepCmd.Flags().BoolVarP(&stepConfig.Verbose, "verbose", "v", false, "Enables verbose output for the step.")
|
||||||
|
stepCmd.Flags().StringVar(&stepConfig.WorkingDirectory, "workingDirectory", "", "The working directory where the step will be executed. If not set, the current working directory will be used.")
|
||||||
|
|
||||||
// Define flags
|
// Define flags
|
||||||
{{- range $key, $value := uniqueName .StepParameters }}
|
{{- range $key, $value := uniqueName .StepParameters }}
|
||||||
|
Reference in New Issue
Block a user