Hi Andy,
On Oct 19, 5:12 am, AndyB <
andy.bi...@gmail.com> wrote:
> Hi,
>
> I'm trying to move some existing projects to be parameterised to allow
> testing of two different source branches, however I seem to have run into a
> problem. I'm able to parameterise the builds fine and have setup two
> upstream jobs to trigger the projects for the different branches (live and
> release). The problem is that don't seem to be able to trigger a downstream
> project with a parameter *only* if it has SCM changes. I've seen two ways to
> trigger the downstream projects:
Beyond SCM polling, my understanding of the literature is that all of
the other SCM options simply return a boolean flag for success or
fail. i.e. if there is a call to the SCM (update or full) then
Jenkins only knows that the SCM job completed and not whether the SCM
did anything.
>
> o Downstream Trigger (extended) - this allows a downstream project to be
> triggered only if it contains an SCM change - but it doesn't allow a
> parameter to be passed to the project
> o Parameterized Trigger - this allows a project to be triggered with a
> parameter - but it will always trigger even when downstream projects have no
> SCM changes
>
> It's important that I don't trigger downstream projects when there are no
> SCM changes and the downstream projects are all carefully setup to view only
> part of the repository they need to (parameterised by branch name). Can
> anyone sanity check the approach I'm trying - or suggest an alternative? I
> could duplicate the downstream projects for each branch, but that sounds
> like a bad idea. So unless I'm missing something it seems like it would be
> a good idea to combine some of the functionality of the two plugins above to
> allow downstream projects to be triggered with a parameter only if SCM
> changes exist. Can anyone comment on the feasibility of that?
>
Can you use SCM polling to check if there were changes? I know this
is timer based, but it has some mechanism to check for changes between
one polling session and the next.
Regards,
Frank