Created
August 6, 2019 06:00
-
-
Save tacahiroy/cb93df93dd3ac14cb8a9fe495ddeb866 to your computer and use it in GitHub Desktop.
Setup Git polling with Jenkins declarative pipeline
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pipeline { | |
agent { | |
node { | |
label any | |
} | |
} | |
triggers { | |
pollSCM 'H 20 * * 1-5' | |
} | |
stages { | |
stage('checkout') { | |
steps { | |
checkout scm: [$class: 'GitSCM', | |
userRemoteConfigs: [[url: 'git@git.local:xxx/foo.git', | |
credentialsId: 'myCredId']], | |
branches: [[name: 'refs/heads/master']] | |
], poll: true | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment