0
votes

Jenkins poll-scm has an option to "Ignore post-commit hooks". How to code that behavior into scripted pipeline script?

Documentation is pretty mute about that option: https://jenkins.io/doc/book/pipeline/syntax/#triggers

Basic pollscm declaration:

properties([
    pipelineTriggers(pollSCM('H */4 * * 1-5')]),
])  
1

1 Answers

1
votes

Oh, silly goose you, proper syntax looks like this:

SCMTrigger(scmpoll_spec: String, ignorePostCommitHooks?: boolean)

Therefore proper usage is this:

properties([
    pipelineTriggers(pollSCM(scmpoll_spec: 'H */4 * * 1-5', ignorePostCommitHooks: true)]),
])