1
0
mirror of https://github.com/SAP/jenkins-library.git synced 2025-01-18 05:18:24 +02:00

chore(whitesourceExecuteScan): Gradle config changes (#3621)

* chore(whitesourceExecuteScan): Gradle config changes

supersedes #3293
closes #3293

* update config

Co-authored-by: ffeldmann <f.feldmann@sap.com>
This commit is contained in:
Oliver Nocon 2022-03-11 08:18:21 +01:00 committed by GitHub
parent 157f6d4e35
commit 2c837927d4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 18 additions and 1 deletions

View File

@ -939,6 +939,7 @@ func whitesourceExecuteScanMetadata() config.StepData {
{Image: "buildpack-deps:stretch-curl", WorkingDir: "/tmp", Conditions: []config.Condition{{ConditionRef: "strings-equal", Params: []config.Param{{Name: "buildTool", Value: "dub"}, {Name: "buildTool", Value: "docker"}}}}},
{Image: "devxci/mbtci-java11-node14", WorkingDir: "/home/mta", Conditions: []config.Condition{{ConditionRef: "strings-equal", Params: []config.Param{{Name: "buildTool", Value: "mta"}}}}},
{Image: "golang:1", WorkingDir: "/go", Conditions: []config.Condition{{ConditionRef: "strings-equal", Params: []config.Param{{Name: "buildTool", Value: "golang"}}}}},
{Image: "gradle", WorkingDir: "/home/gradle", Conditions: []config.Condition{{ConditionRef: "strings-equal", Params: []config.Param{{Name: "buildTool", Value: "gradle"}}}}},
{Image: "hseeberger/scala-sbt:8u181_2.12.8_1.2.8", WorkingDir: "/tmp", Conditions: []config.Condition{{ConditionRef: "strings-equal", Params: []config.Param{{Name: "buildTool", Value: "sbt"}}}}},
{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"}}}}},

View File

@ -173,7 +173,15 @@ func (c *ConfigOptions) addBuildToolDefaults(config *ScanOptions, utils Utils) e
},
"gradle": {
{Name: "ignoreSourceFiles", Value: true, Force: true},
{Name: "gradle.localRepositoryPath", Value: ".gradle", Force: false},
{Name: "gradle.resolveDependencies", Value: true, Force: true},
{Name: "gradle.ignoreSourceFiles", Value: true, Force: true},
{Name: "gradle.aggregateModules", Value: false, Force: true},
{Name: "gradle.runAssembleCommand", Value: true},
{Name: "gradle.runPreStep", Value: true},
{Name: "gradle.preferredEnvironment", Value: "wrapper"},
{Name: "resolveAllDependencies", Value: false},
{Name: "includes", Value: "**/*.jar"},
{Name: "excludes", Value: "**/*sources.jar **/*javadoc.jar"},
},
"maven": {
{Name: "ignoreSourceFiles", Value: true, Force: true},

View File

@ -647,6 +647,14 @@ spec:
params:
- name: buildTool
value: golang
- image: gradle
workingDir: /home/gradle
env: []
conditions:
- conditionRef: strings-equal
params:
- name: buildTool
value: gradle
- image: hseeberger/scala-sbt:8u181_2.12.8_1.2.8
workingDir: /tmp
env: []