chore(automate): Change automated shell scripts to Groovy scripting