I have a very simple task, a Groovy script, which takes a variable, and splits it into a list, then prints the list. It does exactly this, then fails the task. I don't understand why, because it literally runs through the script and then should exit successfully as far as I'm aware. If I try to manually complete the task in the script, it hangs.
Here's the script:
def jira_tickets = releaseVariables['jira_Ticket_list'].split(',')
releaseVariables['jira_tickets'] = jira_tickets
println("Tickets: ${jira_tickets}")
I've tried it with this line added:
taskApi.transitionTask(task.id, 'Complete')
Which is what causes it to hang. I've also tried to use error handling, and it doesn't have an error, the output is merely exactly what I want it to do. Why is this failing the task at the end?
I still don't know the reason it was failing, but I switched to Python and it worked, so that is the solution.