mirror of
https://github.com/SAP/jenkins-library.git
synced 2024-12-12 10:55:20 +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'
|
||||
for(String collection : collectionList){
|
||||
def collectionDisplayName = collection.toString().replace(File.separatorChar,(char)'_').tokenize('.').first()
|
||||
// resolve templates
|
||||
def command = SimpleTemplateEngine.newInstance()
|
||||
.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'
|
||||
sh "newman ${command}"
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user