A new --ignore-paths flag is added to following commands:
flux create source git --ignore-paths ...
flux create source bucket --ignore-paths ...
A StringSliceVar is used which supports specifying the flag multiple
times to populate a list or either a comma seperated string value
A unit test with a golden file is added to validate the flag
Signed-off-by: Tarun Gupta Akirala <takirala@users.noreply.github.com>
createSourceBucketCmd.Flags().BoolVar(&sourceBucketArgs.insecure,"insecure",false,"for when connecting to a non-TLS S3 HTTP endpoint")
createSourceBucketCmd.Flags().BoolVar(&sourceBucketArgs.insecure,"insecure",false,"for when connecting to a non-TLS S3 HTTP endpoint")
createSourceBucketCmd.Flags().StringVar(&sourceBucketArgs.secretRef,"secret-ref","","the name of an existing secret containing credentials")
createSourceBucketCmd.Flags().StringVar(&sourceBucketArgs.secretRef,"secret-ref","","the name of an existing secret containing credentials")
createSourceBucketCmd.Flags().StringSliceVar(&sourceBucketArgs.ignorePaths,"ignore-paths",nil,"set paths to ignore in bucket resource (can specify multiple paths with commas: path1,path2)")
"when enabled, configures the GitRepository source to initialize and include Git submodules in the artifact it produces")
"when enabled, configures the GitRepository source to initialize and include Git submodules in the artifact it produces")
createSourceGitCmd.Flags().BoolVarP(&sourceGitArgs.silent,"silent","s",false,"assumes the deploy key is already setup, skips confirmation")
createSourceGitCmd.Flags().BoolVarP(&sourceGitArgs.silent,"silent","s",false,"assumes the deploy key is already setup, skips confirmation")
createSourceGitCmd.Flags().StringSliceVar(&sourceGitArgs.ignorePaths,"ignore-paths",nil,"set paths to ignore in git resource (can specify multiple paths with commas: path1,path2)")