2020-05-27 18:20:10 +02:00
|
|
|
import com.sap.piper.BuildTool
|
2020-04-27 09:56:58 +02:00
|
|
|
import com.sap.piper.DownloadCacheUtils
|
2020-04-03 16:34:40 +02:00
|
|
|
import groovy.transform.Field
|
|
|
|
|
|
|
|
import static com.sap.piper.Prerequisites.checkScript
|
|
|
|
|
|
|
|
@Field String STEP_NAME = getClass().getName()
|
|
|
|
@Field String METADATA_FILE = 'metadata/versioning.yaml'
|
|
|
|
|
|
|
|
void call(Map parameters = [:]) {
|
2020-04-27 09:56:58 +02:00
|
|
|
final script = checkScript(this, parameters) ?: this
|
|
|
|
|
2020-04-03 16:34:40 +02:00
|
|
|
List credentials = [
|
|
|
|
[type: 'ssh', id: 'gitSshKeyCredentialsId'],
|
|
|
|
[type: 'usernamePassword', id: 'gitHttpsCredentialsId', env: ['PIPER_username', 'PIPER_password']],
|
|
|
|
]
|
2020-06-08 17:08:05 +02:00
|
|
|
|
|
|
|
// Tell dockerExecuteOnKubernetes (if used) to stash also .-folders
|
|
|
|
// This preserves the '.git' folder into the pod and restores it from the pod with the created tag.
|
|
|
|
parameters['stashNoDefaultExcludes'] = true
|
|
|
|
|
2020-05-27 18:20:10 +02:00
|
|
|
parameters = DownloadCacheUtils.injectDownloadCacheInParameters(script, parameters, BuildTool.MAVEN)
|
2020-04-30 10:39:27 +02:00
|
|
|
piperExecuteBin(parameters, STEP_NAME, METADATA_FILE, credentials, false, false, true)
|
2020-04-03 16:34:40 +02:00
|
|
|
}
|