Hi,I am trying loop through array values using each and wants to run 2 set ofoperation but when I add the steps throws some closure issue (I m pretty new togroovy, didnot get what it meant by). Here is the sample code which I amtrying. Commented two lines are the one which I want to execute beforecreating pipelineJob. Can anyone help with the syntax? Or anyother methodto loop array values and create pipeline job and other script execution.Please help.def apps =3D [ [project:"myproj",repo:"my-test-repo1"], [project:"testproj",repo:"my-test-repo2"], [project:"myproj",repo:"my-dev-repo"]]apps.each { app -> //mystashurl =3D 'mybaseurl+scm/'+app.project+'/' + app.repo + '.git=' //sh("sed -i.bak -e 's#--GIT_URL--#${mystashurl}#' Jenkinsfile") pipelineJob('LIB.' + app.repo.replaceAll('-','')) { description('Containerized microservice lib config') definition { cps { script(readFileFromWorkspace('Jenkinsfile')) sandbox() } } }}Thanks,Sakthi
-- Sent from: http://groovy.329449.n5.nabble.com/Groovy-Dev-f372993.html