I need to get the array that I have in my groovy Script and pass it shell Script for further Calculation in the Shell Script
I have tried multiple was but I am not getting the array passed to Shell Script.
templates = ["Temp1","Temp2","Temp3"]
templateCount = templates.size()
sh """
count = ${templateCount}
temp = ${templates}
for (( i=0; i < count; i++ ))
do
echo "Template Name = " ${temp[i]}
done
"""