How to create and loop over an ArrayList of strings in Jenkins Groovy Pipeline
问题 As stated in the title, I'm attempting to loop over an ArrayList of strings in a Jenkins Groovy Pipeline script (using scripted Pipeline syntax). Let me lay out the entire "problem" for you. I start with a string of filesystem locations separated by spaces: "/var/x /var/y /var/z ... " like so. I loop over this string adding each character to a temp string . And then when I reach a space, I add that temp string to the array and restart. Here's some code showing how I do this: def full_string =