Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save darinpope/7d635124ae918a779c3fd9fbd5092790 to your computer and use it in GitHub Desktop.
Save darinpope/7d635124ae918a779c3fd9fbd5092790 to your computer and use it in GitHub Desktop.

Gist for https://youtu.be/-u3rz1DbpaA

Initial Jenkinsfile

pipeline {
  agent any
  stages {
    stage('Hello') {
      steps {
        checkout([$class: 'GitSCM', branches: [[name: '*/master']], extensions: [], userRemoteConfigs: [[url: 'https://github.com/jenkinsci/git-plugin.git']]])
      }
    }
  }
}

Modified Jenkinsfile

pipeline {
  agent any
  stages {
    stage('Hello') {
      steps {
        checkout([$class: 'GitSCM', branches: [[name: '*/master']], extensions: [[$class: 'CloneOption', noTags: false, reference: '', shallow: false, timeout: 120]], userRemoteConfigs: [[url: 'https://github.com/jenkinsci/git-plugin.git']]])
      }
    }
  }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment