~/snippets/jenkins-setting-a-timeout
Published on

Setting a timeout in Jenkins

100 words1 min read

In the pipeline step, choose Pipeline script and use the following to set a timeout:

#!/usr/bin/env groovy

stage ("Fake timeout") {
  echo 'Waiting 10 minutes for deployment to complete'
  sleep 60 * 10 // seconds
}