mirror of
https://github.com/SAP/jenkins-library.git
synced 2025-01-18 05:18:24 +02:00
Add capability for yarn scanning (#2716)
* Add capability for yarn scanning * Update whitesource.yaml * Update configHelper.go * Add newly generated impl
This commit is contained in:
parent
c038a3b08a
commit
dfe9cb6149
@ -623,6 +623,7 @@ func whitesourceExecuteScanMetadata() config.StepData {
|
||||
{Image: "maven:3.5-jdk-8", WorkingDir: "/tmp", Conditions: []config.Condition{{ConditionRef: "strings-equal", Params: []config.Param{{Name: "buildTool", Value: "maven"}}}}},
|
||||
{Image: "node:lts-stretch", WorkingDir: "/home/node", Conditions: []config.Condition{{ConditionRef: "strings-equal", Params: []config.Param{{Name: "buildTool", Value: "npm"}}}}},
|
||||
{Image: "python:3.6-stretch", WorkingDir: "/tmp", Conditions: []config.Condition{{ConditionRef: "strings-equal", Params: []config.Param{{Name: "buildTool", Value: "pip"}}}}},
|
||||
{Image: "node:lts-stretch", WorkingDir: "/home/node", Conditions: []config.Condition{{ConditionRef: "strings-equal", Params: []config.Param{{Name: "buildTool", Value: "yarn"}}}}},
|
||||
},
|
||||
Outputs: config.StepOutputs{
|
||||
Resources: []config.StepResources{
|
||||
|
@ -206,6 +206,11 @@ func (c *ConfigOptions) addBuildToolDefaults(config *ScanOptions, utils Utils) e
|
||||
{Name: "includes", Value: "**/*.jar"},
|
||||
{Name: "excludes", Value: "**/*sources.jar **/*javadoc.jar"},
|
||||
},
|
||||
"yarn": {
|
||||
{Name: "npm.resolveDependencies", Value: true, Force: true},
|
||||
{Name: "npm.ignoreSourceFiles", Value: true, Force: true},
|
||||
{Name: "npm.yarnProject", Value: true, Force: true},
|
||||
},
|
||||
}
|
||||
|
||||
if config.BuildTool == "maven" {
|
||||
|
@ -523,3 +523,11 @@ spec:
|
||||
params:
|
||||
- name: buildTool
|
||||
value: pip
|
||||
- image: node:lts-stretch
|
||||
workingDir: /home/node
|
||||
env: []
|
||||
conditions:
|
||||
- conditionRef: strings-equal
|
||||
params:
|
||||
- name: buildTool
|
||||
value: yarn
|
||||
|
Loading…
x
Reference in New Issue
Block a user