mirror of
https://github.com/SAP/jenkins-library.git
synced 2025-01-16 05:16:08 +02:00
Improving buildDescriptorExcludeList for npm (#4976)
Signed-off-by: Vijayan T <vijayanjay@gmail.com>
This commit is contained in:
parent
c3eeb3398e
commit
06df2d4463
@ -266,6 +266,19 @@ func (c *ConfigOptions) addBuildToolDefaults(config *ScanOptions, utils Utils) e
|
||||
}
|
||||
|
||||
}
|
||||
if config.BuildTool == "npm" {
|
||||
if len(config.BuildDescriptorExcludeList) > 0 {
|
||||
var excludePaths []string
|
||||
for _, buildDescriptor := range config.BuildDescriptorExcludeList {
|
||||
if strings.HasSuffix(buildDescriptor, "pom.xml") {
|
||||
continue
|
||||
}
|
||||
modulePath, _ := filepath.Split(buildDescriptor)
|
||||
excludePaths = append(excludePaths, modulePath)
|
||||
}
|
||||
*c = append(*c, ConfigOption{Name: "npm.ignoreDirectoryPatterns", Value: strings.Join(excludePaths, ",")})
|
||||
}
|
||||
}
|
||||
|
||||
if config.BuildTool == "docker" {
|
||||
// for now only support default name of Dockerfile
|
||||
|
Loading…
Reference in New Issue
Block a user