[workflow-plugin] Setting poll to false doesn't alter the polling behavior

301 views
Skip to first unread message

Kyle Allan

unread,
Apr 18, 2016, 3:54:34 PM4/18/16
to Jenkins Users
Hello,

I can't seem to understand my problem - setting poll: false in my Pipeline DSL doesn't alter the behavior of the Git Poll Log like I expect. I've ran the job multiple times, and I still see 2 polls within the logs when I expect there to only be one.

Workflow Job with an scm-polling trigger
Pipeline from SCM configured to do a sparse checkout and ignore commits from an automated user
Pipeline DSL operates within a docker container, with changelog and poll both set to false.

Using strategy: Default
[poll] Last Built Revision: Revision 57399c846b68250e81dff6f34feeb292664bdba5 (origin/master)
 > git rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repositories
 > git config remote.origin.url g...@github.com/kallan357/thing.git # timeout=10
Fetching upstream changes from g...@github.com/kallan357/thing.git
 > git --version # timeout=10
using GIT_SSH to set credentials kallan357
 > git fetch --tags --progress g...@github.com/kallan357/thing.git +refs/heads/*:refs/remotes/origin/*
Polling for changes in > git rev-parse origin/master^{commit} # timeout=10 > git log --full-history --no-abbrev --format=raw -M -m --raw 57399c846b68250e81dff6f34feeb292664bdba5..31621a03c0eb1d58be8e8b0d0eebed6bae6ccb23 # timeout=10 Ignored commit 31621a03c0eb1d58be8e8b0d0eebed6bae6ccb23: Found excluded author: jenkins-guy Using strategy: Default [poll] Last Built Revision: Revision 57399c846b68250e81dff6f34feeb292664bdba5 (origin/master) using GIT_SSH to set credentials kallan357 > git --version # timeout=10 > git ls-remote -h g...@github.com/kallan357/thing.git # timeout=10
Found 45 remote heads on g...@github.com/kallan357/thing.git [poll] Latest remote head revision on refs/heads/master is: 31621a03c0eb1d58be8e8b0d0eebed6bae6ccb23 Done. Took 0.43 sec Changes found

Here is my DSL that lives inside SCM alongside my project:

node('java-docker-node') {
timeout(15) {
withEnv(envArray) {
stage 'Checkout'
git branch: 'master', credentialsId: 'abc123', changelog: false, poll: false, url: '
g...@github.com/kallan357/thing.git'

stage 'Build'
sh '''
mvn clean install
'''

            stage 'Bump versions'
            sh '''./bump_version.sh'''
        }
    }
}

My bump_version script will bump my pom and commit a new version to SCM. Because of the double sets of polling my job gets stuck in an infinite loop. 

Am I missing something? I've executed my build, which I suspect should modify the Jenkins polling behavior to only have a single attempt.

Thanks,
Kyle Allan

Pavel Georgiev

unread,
Feb 14, 2017, 5:37:58 AM2/14/17
to Jenkins Users
Hi,

Did you get any response? I see the same behavior - probably a bug? Did you log one?

ND D

unread,
Mar 31, 2019, 2:57:58 AM3/31/19
to Jenkins Users
Hello Kyle,

Do you get the solution/workaround some how ? thanks

ND
Reply all
Reply to author
Forward
0 new messages