Le 7 déc. 2015 1:05 PM, "Sverre Moe" <[email protected]> a écrit : > > I have several projects of type Multi-Configuration. When a project starts a build I have a need to trigger builds of other projects (under certain conditions) before any of the configurations are started. However I cannot see how it would be possible. > > I have a rather complex workflow: > 1) A new change in ProjectA. After success and all of its configurations are finished, it triggers a build of all its downstream dependencies. If any of them fails then the upstream project should also fail. > > 2) A new change in one of ProjectA downstream projects, lets call it ProjectB. Now, before ProjectB can start building each of its configurations I need to trigger build of ProjectA, otherwise ProjectB would be built with the previous version of ProjectA. When ProjectA has built it will again trigger all of its downstream dependencies, except for ProjectB which is already running (waiting for ProjectA to finish with SUCCESS). > > I have implemented a Groovy script to perform step 1, but I have problems with finding a solution how to implement a solution for step 2. > I could execute a system groovy script in the build step, but that will trigger a build of ProjectA for each configurations. Would be able to solve this if I could run that groovy script in a pre-build-step, but none exist for Multi-configuration project. > > I do not want to abandon Multi-Configuration project type, but perhaps I would need to use a different project type that will allow me more control of the workflow.
IMO you nailed it. What you have really seems like a (complex) workflow, hence I think you should try the workflow plugin. You even say above you wrote some groovy for all that, you might be able to reuse party of it or at least use it as a basis. (Workflow is using a /special/ groovy) > Perhaps a Workflow project type. It would be last resort because I have put a lot of work in the setup I have now. I understand, but IMO this can only get worse in terms of efforts to adding things. Might be a signal to make a checkpoint to consider changing the whole thing into a hopefully more readable and manageable thing. The alternative might be you see how to contribute/add a pre-scm step to matrix. My 2 cents Cheers -- 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CANWgJS7FATv8aiFJ2Do%3Dr7VC3ZJOGc783YbiJG68w0Zx%2B3Lj0w%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
