Below you will find pages that utilize the taxonomy term “Process”
Posts
read more
Executing shell commands from groovy
pre { border: 1px solid #EEE; }
Sometimes you want to run a shell command generated from groovy or just want to achieve something that’s faster/simpler in the shell in comparison to doing it with groovy. One such case would be to get the number of git commits of a repo. The command for this is fairly simple:
$ git log --oneline | wc -l
179
Running shell commands from groovy is really easy too. Make a list and call ’execute()’ on it - how awesome is that?