2020-05-27 18:20:10 +02:00
|
|
|
import com.sap.piper.BuildTool
|
2020-03-31 15:16:18 +02:00
|
|
|
import com.sap.piper.DownloadCacheUtils
|
2020-03-20 19:20:52 +02:00
|
|
|
import groovy.transform.Field
|
|
|
|
|
2020-04-04 11:44:02 +02:00
|
|
|
import static com.sap.piper.Prerequisites.checkScript
|
2020-03-31 15:16:18 +02:00
|
|
|
|
2020-03-20 19:20:52 +02:00
|
|
|
@Field String STEP_NAME = getClass().getName()
|
|
|
|
@Field String METADATA_FILE = 'metadata/nexusUpload.yaml'
|
|
|
|
|
|
|
|
//Metadata maintained in file project://resources/metadata/nexusUpload.yaml
|
|
|
|
|
|
|
|
void call(Map parameters = [:]) {
|
2020-04-04 11:44:02 +02:00
|
|
|
final script = checkScript(this, parameters) ?: this
|
2020-05-27 18:20:10 +02:00
|
|
|
parameters = DownloadCacheUtils.injectDownloadCacheInParameters(script, parameters, BuildTool.MAVEN)
|
2020-03-31 15:16:18 +02:00
|
|
|
|
2020-04-28 21:09:19 +02:00
|
|
|
List credentials = [[type: 'usernamePassword', id: 'nexusCredentialsId', env: ['PIPER_user', 'PIPER_password']]]
|
2020-03-20 19:20:52 +02:00
|
|
|
piperExecuteBin(parameters, STEP_NAME, METADATA_FILE, credentials)
|
|
|
|
}
|