1
0
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:
Googlom
2025-07-16 13:34:33 +03:00
parent 7fb9663613
commit 7d6ff3e476

View File

@@ -73,7 +73,8 @@ const (
)
type generalConfig struct {
Verbose bool
Verbose bool
WorkingDirectory string
}
type {{ .StepName }}Options struct {
@@ -141,6 +142,7 @@ func {{.CobraCmdFuncName}}() *cobra.Command {
func defineInputSources(stepCmd *cobra.Command, stepConfig *{{ .StepName }}Options) {
// General configuration
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
{{- range $key, $value := uniqueName .StepParameters }}