I want to clone repo using inline groovy script in jenkins. How can I execute git clone and build the app using groovy.
If you're using Jenkins pipelines, see examples from the official documentation, e.g.:
node {
stage('Clone sources') {
git url: 'https://github.com/jfrogdev/project-examples.git'
}
}
For simple Groovy script you can try something like:
["git", "clone", "https://github.com/jfrogdev/project-examples.git"].execute()