2020-09-30 08:56:16 +02:00
|
|
|
import com.sap.piper.BuildTool
|
|
|
|
|
import com.sap.piper.DownloadCacheUtils
|
2019-02-28 13:01:30 +01:00
|
|
|
import groovy.transform.Field
|
|
|
|
|
|
|
|
|
|
import static com.sap.piper.Prerequisites.checkScript
|
|
|
|
|
|
2019-03-06 13:07:55 +01:00
|
|
|
@Field String STEP_NAME = getClass().getName()
|
2021-11-15 14:20:20 +01:00
|
|
|
@Field String METADATA_FILE = 'metadata/whitesourceExecuteScan.yaml'
|
2019-03-05 13:59:27 +01:00
|
|
|
|
2021-11-15 14:20:20 +01:00
|
|
|
//Metadata maintained in file project://resources/metadata/whitesourceExecuteScan.yaml
|
2019-02-28 13:01:30 +01:00
|
|
|
|
|
|
|
|
void call(Map parameters = [:]) {
|
2021-02-03 14:52:48 +01:00
|
|
|
final script = checkScript(this, parameters) ?: this
|
|
|
|
|
parameters = DownloadCacheUtils.injectDownloadCacheInParameters(script, parameters, BuildTool.MTA)
|
2019-03-04 23:09:40 +01:00
|
|
|
|
2021-02-03 14:52:48 +01:00
|
|
|
List credentials = [
|
|
|
|
|
[type: 'token', id: 'orgAdminUserTokenCredentialsId', env: ['PIPER_orgToken']],
|
|
|
|
|
[type: 'token', id: 'userTokenCredentialsId', env: ['PIPER_userToken']],
|
2022-02-23 09:30:19 +01:00
|
|
|
[type: 'token', id: 'githubTokenCredentialsId', env: ['PIPER_githubToken']],
|
2022-01-11 09:43:12 +01:00
|
|
|
[type: 'file', id: 'dockerConfigJsonCredentialsId', env: ['PIPER_dockerConfigJSON']],
|
2023-10-06 19:22:26 +05:00
|
|
|
[type: 'usernamePassword', id: 'golangPrivateModulesGitTokenCredentialsId', env: ['PIPER_privateModulesGitUsername', 'PIPER_privateModulesGitToken']]
|
2021-02-03 14:52:48 +01:00
|
|
|
]
|
|
|
|
|
piperExecuteBin(parameters, STEP_NAME, METADATA_FILE, credentials)
|
2019-02-28 13:01:30 +01:00
|
|
|
}
|