Я выполняю команду groovy:
def test = ("git archive --remote git@gitlab.com:git/myproject/system.git HEAD: Script.groovy").execute().text
и выводит текст, например:
some text = false
another text = false
buildMap = [
'system-generic-1':'/var/lib/system-generic-1',
'system-generic-2':'/var/lib/system-generic-2',
'system-generic-3':'/var/lib/system-generic-3',
'system-generic-4':'/var/lib/system-generic-4',
]
propertyList = [
'system.core.version'
]
return this
Как я могу разобрать этот текст в список строк:
system-generic-1
system-generic-2
system-generic-3
system-generic-4
или, возможно, лучше конвертировать текст в класс скрипта, поэтому будет иметь свойство buildMap.