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-02-03 15:52:48 +02:00
|
|
|
@Field String METADATA_FILE = 'metadata/whitesource.yaml'
|
2019-03-05 14:59:27 +02:00
|
|
|
|
2021-02-03 15:52:48 +02:00
|
|
|
//Metadata maintained in file project://resources/metadata/whitesource.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']],
|
|
|
|
]
|
|
|
|
piperExecuteBin(parameters, STEP_NAME, METADATA_FILE, credentials)
|
2019-02-28 14:01:30 +02:00
|
|
|
}
|