workflow-multibranch-plugin: [JENKINS-38688] Multibranch: allow build to be triggered on duplicated branch project

53 views
Skip to first unread message

Nick Stolwijk

unread,
Dec 28, 2016, 6:10:54 AM12/28/16
to jenkins...@googlegroups.com
Hi all,

I'm trying to get my bearing around the pipeline plugin, because I want a series of jobs which listen to multiple repositories.

Now I am encountering the issue as described in JENKINS-38688[1] and this seems a showstopper for my usecase.

Is there anyone with any knowledge about this plugin and/or issue to answer the following questions:

- Is this feature already being under development?
- Is this a wanted feature for this plugin?
- How hard would it be to develop it?
- Where/how do I start developing it?

With regards,

Nick Stolwijk

[1] https://issues.jenkins-ci.org/browse/JENKINS-38688

~~~ Try to leave this world a little better than you found it and, when your turn comes to die, you can die happy in feeling that at any rate you have not wasted your time but have done your best ~~~

Lord Baden-Powell

Stephen Connolly

unread,
Dec 28, 2016, 7:52:53 AM12/28/16
to jenkins...@googlegroups.com
When you have multiple sources, those sources are *an ordered list*

This means that the first source with a branch name owns the name.

As such the described issue is WONTFIX

But I suspect a different issue is what is actually being looked for.

Is the case where you have multiple repositories which are required to build your project or is it multiple repositories that host the same code?

If the first, then your "main" repository is the only source you provide and its Jenkinsfile should handle the checkout of the other sources. Once those other sources are checked out then the events should trigger rebuilds (assuming the scm plugins are working correctly) and all will be right with the world

If the second, then what you have would be something like source 1 is production, source 2 is for staging, source 3 is where developers commit. In other words you are using different *repositories* to track the state of changes. I see the issue here being that if you want to track the state, you really should have three multibranch projects, one for each state and only have one source in each... otherwise you should set the order of sources to reflect your priorities 

I highly recommend that you upgrade to the 2.0.0+ line (currently available from the experimental update centre) as this has a more consistent behaviour resulting from my having cleaned up a lot of the mess from multiple actors not understanding the original design

HTH 
--


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/CAA9S6i6Risw-MTgavoW%3D7a%2BtHUg9AReV9EwQ%3Df4aW1pYxZcLSw%40mail.gmail.com.


For more options, visit https://groups.google.com/d/optout.


--
Sent from my phone

Nick Stolwijk

unread,
Dec 28, 2016, 8:18:56 AM12/28/16
to jenkins...@googlegroups.com
I am using the first case, but it doesn't seem to trigger on the second repository.

Jenkinsfile in both repositories:

node{
    stage('Checkout first project') {

    // Get some code from a GitHub repository
        checkout([$class: 'GitSCM', 
            branches: [[name: '*/develop']], 
            doGenerateSubmoduleConfigurations: false, 
            extensions: [[$class: 'RelativeTargetDirectory', 
                relativeTargetDir: 'simplemaven']], 
            submoduleCfg: [], 
            userRemoteConfigs: [[url: 'file:////caverna/repositories/simplemaven']]])
    }
    stage('Build first project') {
    //build steps
    }

    stage('Checkout second project') {
        checkout([$class: 'GitSCM', 
            branches: [[name: '*/develop']], 
            doGenerateSubmoduleConfigurations: false, 
            extensions: [[$class: 'RelativeTargetDirectory', 
                relativeTargetDir: 'simplemaven2']], 
            submoduleCfg: [], 
            userRemoteConfigs: [[url: 'file:////caverna/repositories/simplemaven2']]])
    }
    stage('Build second project') {
    //build steps
    }
}

The multibranch plugin is configured on the simplemaven repo and when I push to that my pipeline is triggered.

When I push to the simplemaven2 repository the push message says: 

remote: No git jobs using repository: file:////caverna/repositories/simplemaven2 and branches:
remote: No Git consumers using SCM API plugin for: file:////caverna/repositories/simplemaven2

(assuming the scm plugins are working correctly)

Is the checkout step calling the right scm plugins or does anyone see what I'm doing wrong?

With regards,

Nick Stolwijk


~~~ Try to leave this world a little better than you found it and, when your turn comes to die, you can die happy in feeling that at any rate you have not wasted your time but have done your best ~~~

Lord Baden-Powell
HTH 
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-users+unsubscribe@googlegroups.com.
--
Sent from my phone

--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CA%2BnPnMxqe1LRU4Kqup9KqpH98ic0%3DdMWW2iPbVG1ZRfxQzXKTg%40mail.gmail.com.

Stephen Connolly

unread,
Dec 28, 2016, 11:00:14 AM12/28/16
to jenkins...@googlegroups.com
You should use `checkout scm` to check out the repo watched by the multi branch project.

Likely there are bugs in the git plugin's triggering (or in the pipeline's checkout step) that hopefully will be shaken out in the new year once I push the 2.0.0 release lines out of experimental and we start applying the scm api event support more consistently across projects

HTH 
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
--
Sent from my phone








--


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.
--


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/CAA9S6i7NgG0Ek7VB8eskvdKrkkx-BZLans4s4_dwzOcQA%3DP1Yw%40mail.gmail.com.



For more options, visit https://groups.google.com/d/optout.


Nick Stolwijk

unread,
Dec 28, 2016, 12:02:29 PM12/28/16
to jenkins...@googlegroups.com
Ah, I didn't know that support was _that_ experimental. :-) I will be happy to test it out once it is available.

I will continue to build up my pipeline just to make it work without the trigger functionality.

Thanks for the help!

Nick Stolwijk

~~~ Try to leave this world a little better than you found it and, when your turn comes to die, you can die happy in feeling that at any rate you have not wasted your time but have done your best ~~~

Lord Baden-Powell

HTH 
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-users+unsubscribe@googlegroups.com.
--
Sent from my phone








--


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+unsubscribe@googlegroups.com.



For more options, visit https://groups.google.com/d/optout.











--


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+unsubscribe@googlegroups.com.


--
Sent from my phone

--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CA%2BnPnMxcW67e6oDoddxEDiVDR-%3Db6MtXdW5PSYfsmaG_FK0HYQ%40mail.gmail.com.

Stephen Connolly

unread,
Dec 28, 2016, 7:25:21 PM12/28/16
to jenkins...@googlegroups.com
Multibranch was started as an experiment... then it proved successful as a model and was adopted, but as I had never had the time to document the rationale and approach, some mistakes were made in its application to pipeline...

Additionally the initial implementation has MVP event support *because* I just wanted to test the idea... of course MVP even support is kind of useless (who wants to trigger a full rescan when only one branch changed)

So recently I got time to add event support and document... the plan was to release as soon as it was done... but instead that dragged on so that the release day was the Friday afternoon before I started my Christmas vacation, so the compromise was to push the releases into the experimental update center... so that we could lock down all the manual testing I had performed. iMHO the beta release is good to go, but we just wanted to not spoil my vacation... I should be cutting the non bet releases on Tuesday 

HTH 
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
--
Sent from my phone








--


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.



For more options, visit https://groups.google.com/d/optout.











--


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.


--
Sent from my phone








--


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.
--


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/CAA9S6i4oXz1SWr0k9q4T9S%2BZts%3DrO4ddVUeesbP2Z%2BA8yP_Ohg%40mail.gmail.com.



For more options, visit https://groups.google.com/d/optout.


Reply all
Reply to author
Forward
0 new messages