Build queue question

75 views
Skip to first unread message

Michael Rose

unread,
Apr 28, 2017, 2:51:07 PM4/28/17
to Jenkins Users
I'm somewhat new to using Jenkins, but my understanding is that the build queue is supposed to be limited to one queued build per job. I'm seeing a build queue with multiple builds for the same job:



Our jobs are triggered via a mercurial post-commit hook.  When there is a high commit rate, we'll get multiple builds for the same job queued up. As the jobs execute, they update the repository to the latest changeset (rather than the changeset that triggered the build). When the commit rate goes down and the queue starts to catch up there will be a series of builds that execute on the same changeset because no new changes are coming in.

So, three questions:
1) Is this behavior (multiple queued builds from the same job) the expected behavior?
2) If not the expected behavior, how do I fix it?
3) If it can't be fixed, is there a way to make it so that as jobs execute, they update the mercurial repository to the changeset that triggered that specific build so that I don't end up with a pile of builds at the end all from the same changeset?

Here are some more details about my Jenkins setup:
Jenkins 2.46.2
Mercurial plugin 1.60
Pipeline: SCM step 2.4
SCM API plugin 2.1.1
Linux Master, Linux slaves

Mark Waite

unread,
Apr 29, 2017, 8:07:28 AM4/29/17
to Jenkins Users
Multiple concurrent builds is the expected (and desired) behavior for multi-branch pipeline jobs.

When my multi-branch pipeline builds run, each build runs with the specific commit that launched that build.  Are you sure that your builds are using the same hash for multiple builds?

Mark Waite

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/fbc646b6-c5fc-4f8f-842d-cba566df3a0b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Michael Rose

unread,
May 1, 2017, 8:53:23 AM5/1/17
to Jenkins Users
This isn't a multi-branch pipeline job, just a normal pipeline job. The builds are definitely running with the same hash.  Here is the code for my SCM step:

stage('SCM: Update rt') { 
      checkout([$class: 'MercurialSCM', 
                credentialsId: 'NightlybuildSSHKey', 
                source: 'ssh://hg//hg/rt', 
                subdir: 'rt', 
                browser: [$class: 'HgWeb', url: 'https://hg/rt'], ])
   }

Is there an argument I'm missing in order to get the SCM step to use the hash of the changeset that triggered the build?

You received this message because you are subscribed to a topic in the Google Groups "Jenkins Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/jenkinsci-users/wQykJvxQkVg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CAO49JtF%3DkbU4EmsO01-L2KZFgbNnc%3DGtky2G-_cPq7p2spg7NQ%40mail.gmail.com.

Mark Waite

unread,
May 1, 2017, 11:14:30 PM5/1/17
to Jenkins Users
I would be surprised if there were such an argument.  I'm not familiar with the mercurial plugin, but I suspect it intends to choose the same hash.

Mark Waite

Reply all
Reply to author
Forward
0 new messages