In a company I'm currently working on, most of our Jenkins jobs are scripted and all they do is call an external script in python or bash, that actually does the heavy work. Something like this:

```
timestamps {
  stage('deploy-site') {
    sh('python deploy-script.py')
  }
}

```

I was wondering if this is actually a good practice and if it would be better to code the job steps using Groovy and the Jenkins API.

Any thoughts? What could be the pros and cons of each approach?