You're using a relatively special case.  The git plugin does not support it
directly.

You might consider splitting the task into two Jenkins jobs:

   1. Job that takes a SHA-1 as a parameter that should be built, but never
   polls the repository
   2. Job that detects changes on the remote repository and runs a script
   that computes the list of changes since the last run, then launches the job
   defined step 1 with each of the SHA-1 values that have arrived since the
   last run

Mark Waite

On Wed, Aug 28, 2019 at 9:14 AM 'Mark Raynsford' via Jenkins Users <
jenkinsci-users@googlegroups.com> wrote:

> Hello.
>
> I use a pretty simple setup for each job. Each of my jobs is a GitHub
> project, and I use the "poll SCM" feature with a schedule of "H/53 * *
> * *" (in other words, poll randomly roughly hourly). My Jenkins setup
> is not externally accessible in any form, so I can't have an external
> service notifying my server that something has been updated.
>
> This all works fine, except that now I've started wanting to publish
> snapshots and releases automatically from Jenkins builds. This would be
> fine, except that Jenkins tends to only build the latest commit that it
> sees each SCM polling period, rather than building all of the
> individual commits that occurred between this and the last period. This
> means that it's possible for it to "miss" a tagged release commit and
> just build the latest development snapshot instead.
>
> Is there some way to get it to build all of the individual commits? In
> other words, if I've made five commits since the last polling period, I
> should see five new jobs scheduled next time the SCM is polled.
>
> --
> Mark Raynsford | http://www.io7m.com
>
> --
> 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-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jenkinsci-users/20190828141416.572bca32%40almond.int.arc7.info
> .
>


-- 
Thanks!
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-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/CAO49JtEomY%3DGY5xZYzXS6AYPrsyROptBhRPU3bqd%2B_fSSZEG3A%40mail.gmail.com.

Reply via email to