mirror of
https://github.com/SAP/jenkins-library.git
synced 2024-12-14 11:03:09 +02:00
create collectionDisplayName inside of the step
This commit is contained in:
parent
75a9a76205
commit
153536f5d3
@ -37,10 +37,14 @@ def call(Map parameters = [:]) {
|
|||||||
) {
|
) {
|
||||||
sh 'npm install newman --global --quiet'
|
sh 'npm install newman --global --quiet'
|
||||||
for(String collection : collectionList){
|
for(String collection : collectionList){
|
||||||
|
def collectionDisplayName = collection.toString().replace(File.separatorChar,(char)'_').tokenize('.').first()
|
||||||
// resolve templates
|
// resolve templates
|
||||||
def command = SimpleTemplateEngine.newInstance()
|
def command = SimpleTemplateEngine.newInstance()
|
||||||
.createTemplate(config.newmanRunCommand)
|
.createTemplate(config.newmanRunCommand)
|
||||||
.make([config: config.plus([newmanCollection: collection])]).toString()
|
.make([
|
||||||
|
config: config.plus([newmanCollection: collection]),
|
||||||
|
collectionDisplayName: collectionDisplayName
|
||||||
|
]).toString()
|
||||||
if(!config.failOnError) command += ' --suppress-exit-code'
|
if(!config.failOnError) command += ' --suppress-exit-code'
|
||||||
sh "newman ${command}"
|
sh "newman ${command}"
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user