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