mirror of
https://github.com/SAP/jenkins-library.git
synced 2024-12-12 10:55:20 +02:00
"ignoreSourceFiles" parameter removed from general section and added … (#2814)
* "ignoreSourceFiles" parameter removed from general section and added to specific build tool section * Update configHelper_test.go Co-authored-by: Oliver Nocon <33484802+OliverNocon@users.noreply.github.com>
This commit is contained in:
parent
cdcce05145
commit
cac7f2e904
@ -134,7 +134,6 @@ func (c *ConfigOptions) addGeneralDefaults(config *ScanOptions, utils Utils, pro
|
||||
{Name: "userKey", Value: config.UserToken, Force: true},
|
||||
{Name: "forceUpdate", Value: true, Force: true},
|
||||
{Name: "offline", Value: false, Force: true},
|
||||
{Name: "ignoreSourceFiles", Value: true, Force: true},
|
||||
{Name: "resolveAllDependencies", Value: false, Force: true},
|
||||
{Name: "failErrorLevel", Value: "ALL", Force: true},
|
||||
{Name: "case.sensitive.glob", Value: false},
|
||||
@ -159,20 +158,24 @@ func (c *ConfigOptions) addBuildToolDefaults(config *ScanOptions, utils Utils) e
|
||||
{Name: "docker.excludeBaseImage", Value: "true", Force: false},
|
||||
},
|
||||
"dub": {
|
||||
{Name: "ignoreSourceFiles", Value: true, Force: true},
|
||||
{Name: "includes", Value: "**/*.d **/*.di"},
|
||||
},
|
||||
//ToDo: rename to go?
|
||||
//ToDo: switch to gomod as dependency manager
|
||||
"golang": {
|
||||
{Name: "ignoreSourceFiles", Value: true, Force: true},
|
||||
{Name: "go.resolveDependencies", Value: true, Force: true},
|
||||
{Name: "go.ignoreSourceFiles", Value: true, Force: true},
|
||||
{Name: "go.collectDependenciesAtRuntime", Value: false},
|
||||
{Name: "go.dependencyManager", Value: "modules"},
|
||||
},
|
||||
"gradle": {
|
||||
{Name: "ignoreSourceFiles", Value: true, Force: true},
|
||||
{Name: "gradle.localRepositoryPath", Value: ".gradle", Force: false},
|
||||
},
|
||||
"maven": {
|
||||
{Name: "ignoreSourceFiles", Value: true, Force: true},
|
||||
{Name: "updateEmptyProject", Value: true, Force: true},
|
||||
{Name: "maven.resolveDependencies", Value: true, Force: true},
|
||||
{Name: "maven.ignoreSourceFiles", Value: true, Force: true},
|
||||
@ -186,6 +189,7 @@ func (c *ConfigOptions) addBuildToolDefaults(config *ScanOptions, utils Utils) e
|
||||
{Name: "excludes", Value: "**/*sources.jar **/*javadoc.jar"},
|
||||
},
|
||||
"npm": {
|
||||
{Name: "ignoreSourceFiles", Value: true, Force: true},
|
||||
{Name: "npm.resolveDependencies", Value: true, Force: true},
|
||||
{Name: "npm.ignoreSourceFiles", Value: true, Force: true},
|
||||
{Name: "npm.ignoreNpmLsErrors", Value: true},
|
||||
@ -195,6 +199,7 @@ func (c *ConfigOptions) addBuildToolDefaults(config *ScanOptions, utils Utils) e
|
||||
{Name: "npm.resolveLockFile", Value: true},
|
||||
},
|
||||
"pip": {
|
||||
{Name: "ignoreSourceFiles", Value: true, Force: true},
|
||||
{Name: "python.resolveDependencies", Value: true, Force: true},
|
||||
{Name: "python.ignoreSourceFiles", Value: true, Force: true},
|
||||
{Name: "python.ignorePipInstallErrors", Value: false},
|
||||
@ -209,6 +214,7 @@ func (c *ConfigOptions) addBuildToolDefaults(config *ScanOptions, utils Utils) e
|
||||
{Name: "excludes", Value: "**/*sources.jar **/*javadoc.jar"},
|
||||
},
|
||||
"sbt": {
|
||||
{Name: "ignoreSourceFiles", Value: true, Force: true},
|
||||
{Name: "sbt.resolveDependencies", Value: true, Force: true},
|
||||
{Name: "sbt.ignoreSourceFiles", Value: true, Force: true},
|
||||
{Name: "sbt.aggregateModules", Value: false, Force: true},
|
||||
@ -217,6 +223,7 @@ func (c *ConfigOptions) addBuildToolDefaults(config *ScanOptions, utils Utils) e
|
||||
{Name: "excludes", Value: "**/*sources.jar **/*javadoc.jar"},
|
||||
},
|
||||
"yarn": {
|
||||
{Name: "ignoreSourceFiles", Value: true, Force: true},
|
||||
{Name: "npm.resolveDependencies", Value: true, Force: true},
|
||||
{Name: "npm.ignoreSourceFiles", Value: true, Force: true},
|
||||
{Name: "npm.yarnProject", Value: true, Force: true},
|
||||
|
@ -181,7 +181,7 @@ func TestAddBuildToolDefaults(t *testing.T) {
|
||||
}
|
||||
err := testConfig.addBuildToolDefaults(&whitesourceConfig, utilsMock)
|
||||
assert.NoError(t, err)
|
||||
assert.Equal(t, ConfigOptions{{Name: "includes", Value: "**/*.d **/*.di"}}, testConfig)
|
||||
assert.Equal(t, ConfigOptions{{Name: "ignoreSourceFiles", Value: true, Force: true}, {Name: "includes", Value: "**/*.d **/*.di"}}, testConfig)
|
||||
})
|
||||
|
||||
t.Run("error case", func(t *testing.T) {
|
||||
|
Loading…
Reference in New Issue
Block a user