Reputation: 2682
I want to perform git checkout operation using Groovy in Jenkins. How to achieve that?
Note: The Jenkins job in which I am trying to perform the checkout operation is not a pipeline job, it is a freestyle job and we are executing it under system groovy script.
Upvotes: 2
Views: 10120
Reputation: 10395
You can just invoke git through groovy
["git", "checkout", "master"].execute()
Upvotes: 2