Skip to end of metadata
Go to start of metadata

Plugin Information

View Multijob on the plugin site for more information.

Older versions of this plugin may not be safe to use. Please review the following warnings before using an older version:

This plugin, created by Tikal ALM team, gives the option to define complex and hierarchical jobs structure in Jenkins.

When to use it

  • If you'd like to stop the mess with downstream / upstream jobs chains definitions
  • When you want to add full hierarchy of Jenkins jobs that will be executed in sequence or in parallel
  • Add context to your buildflow implementing parameter inheritance from the MultiJob to all its Phases and Jobs. Phases are sequential, whilst jobs inside each Phase are parallel

How to use it

After installing this plugin you will be able to do the following:

  •  When creating new Jenkins jobs you will have an option to create MultiJob project.
  •  In the build section, this job can define phases that contain one or more jobs.
  •  All jobs that belong to one phase will be executed in parallel (if there are enough executors on the node)
  •  All jobs in phase 2 will be executed only after the jobs in phase 1 are completed etc.

Phases are used to execute many jobs in parallel, whilst Phases are sequential.

For example you can have a common complement in phase 1, dependent components in phase 2, a deployment in phase 3 and so on and so forth.

Example plugin configuration

For example we create a MultiJob project called jenkins-multijob-inherent that contains 3 multijob phases: 

This job manages the building and deployment of the Tikal multijob plugin at phase 1.

Afterwards it downloads the snapshot version of jenkins and packs it again with Tikal multijob plugin that was created at phase 1.

Finally at phase 3, it deploys the jenkins together with the multijob plugin to a deployment machine and executes selenium tests, to check the product and shutdown jenkins.

MultiJob Phases definition screenshot:

You can also see an hierarchical view of the multijob project:

Since version 1.11:

1. control build success criteria based on job status:

2. Disable a job within a phase - the use case is when you want to exclude a specific job from executing during a specific execution (well, if you wanted to remove completely -> you would just remove it...). 

#UseCases

* Configure multiple SCM's in parent job for multiple change polling - to be continued 

Version History

1.30 (May 1, 2018) 

  • Fixing a bug that was retrying twice the number specified for maxretries field.

1.29 (Mar. 1, 2018) 

  • [JENKINS-49328] Prevent inappropriate serialization of MultiJobBuildSubBuild.build.

1.28 (Sep. 1, 2017) 

  • Revert "[JENKINS-38850] - Add migration logic for actions loaded from the disk"
  • Add MultiJobOverview lastSuccess and lastFailure functionality for same job multiple times in same Multijob

  • Add Alias to Console output of Multijobs; Fix Alias NullPointerException problems

  • Added Alias for Subjobs in MultijobViews (partly)
  • Started Adding MultiJobBuild View Recursive Multijob table
  • Added Alias for Subjobs in MultijobViews (partly)

1.27 (Aug. 4, 2017) 

  • Fix resume job permission issue.

1.26 (Jul. 8, 2017) 

1.25 (June 13, 2017)

1.24 (Mar. 15, 2017) 

  • Introducing Vizsla
  • Fix issue JENKINS-37351
  • Add BuildOn column to MultiJob view
  • Reshape MultiJob specific configuration

1.23 (Oct. 9, 2016) 

  • Rollback eztemplate support sue to No Class found errors - resolved JENKINS-37300

1.22 (Aug. 9, 2016) 

1.18 (Sep. 9, 2015)

  • Fix NPE introduced in 1.17

1.17 (Sep. 7, 2015)

  • TO BE CONTINUED ...
  • Fix the MULTIJOB accumulation logic - thanks to rrialq
  • Re arranging column, in same as viewed with Jenkins - thanks to Arpit Nagar
  • Added phase variables - thanks to rrialq more info here
  • Apply the BuildFilter to the MultiJobBuildSelector - thanks to sschuberth
  • Integration with Copy Artifact Plugin -> the Copy Artifact Plugin look for an artifact from that job's build which was part of the current MultiJobBuild more info here - thanks to rsennewald
  • Avoid checking sub-jobs when sub-job is triggered anyway ... - thanks to rrialq
  • Fix the polling method, making it more Jenkins API - friendly - thanks to rrialq

1.16 (Dec 4, 2014)

  • Add support for relative paths with the Cloudbees Folder plugin - a pull request we had to merge into the new code line many thanks to: imakowski
  • Fix JENKINS-25636 - multijob does not finish if phase contains same job multiple times

1.15 (Nov. 6, 2014)

1.14 (Nov. 3, 2014)

1.13 (Mar. 1, 2014)

  • Fix JENKINS-21649 & JENKINS-21798 - high CPU usage since 1.11 -> special thanks to Nicolas Morey-Chaisemartin
  • Add "Disable Project" button to MultiJob view

1.12 (Feb. 9, 2014)

1.11 (Jan. 26, 2014)

  • Support the ability to determine the Multijob state based on a failure of one of the jobs in that phase (see screenshot above)
  • Fixed JENKINS-21713 - "MultiJob Plugin does continue phase before current phase succeeded"MultiJob Plugin does continue phase before current phase succeeded
  • Support the ability to disable a certain job (useful when you want to disable a certain job just in a specific execution)
  • UI improvements in - fix MultiJob display during execution
  • Some internal / implementation improvementsSupport the ability to determine the Multijob state based on a failure of one of the jobs in that phase (see screenshot above)

1.10 (Oct. 5, 2013)

  • Fixed JENKINS-17576 - Conditional buildstep unable to launch MultiJob :: thanks  imod[Dominik Bartholdi] community contributor
  • Fixed JENKINS-16870 - Jenkins cant display multijob view graphically if the multijob phase is wrapped in a conditional buildstep & again thanks  imod[Dominik Bartholdi] community contributer
  • Fixed JENKINS-19015 - Multijob plugin throws CancellationException
  • Fixed JENKINS-18611 - Sometimes multijob is set as succeeded without running any downstream jobs when running in parallel - added a warning in the log for parallel job execution [ in red ... ]
  • Fixed JENKINS-17810 - Multijob hierarchy is not shown when jobs inside of the phases are "Monitor an external job" - Fixed
  • Fixed JENKINS-18571 - clicking on build now button fires build twice for specific jobs - Fixed
  • Fixed JENKINS-18361 - Provide build report API support- Issue fixed by dkichler [Dave Kichler] community contributor

    We were holding back the 1.10 release for a new feature which although the long wait didn't make it into 1.10 we hope to release multi-scm support in the 1.11 release - sorry for the long delay on this, we learned it is a bigger effort than we anticipated ...

1.9 (Apr. 11, 2013)

  • Fixed JENKINS-15648 - Multi Job plugins stops when sub job fails or aborted also when the "Mark phase as successful" is set as always continue 
  • Fixed JENKINS-17068 - Subprojects aren't stop when stopping multijob project
  • Fixed JENKINS-17070 - Missing times with multiconfiguration projects
  • Fixed JENKINS-17254 - Multijob view last succes / last failure columns shows status instead of #of days/hours since
  • Fixed JENKINS-17284 - Jenkins cant display multijob view graphically if a job in phase not exists 
  • Fixed JENKINS-17153 - Dependency on parameterized-trigger should not be optional?
  • Fixed JENKINS-16048 - MultiJob Detailed Table is missing when non valid MultiJob phase exits
  • Fixed JENKINS-14604 / JENKINS-13078 - Multijob Plugin looses a hierarchical view at the multijob project page when it has upstream project(s)
  • Fixed JENKINS-17535 - Provide env vars detailing triggered builds (thanks Kiall Mac Innes)

1.6 & 1.7 (Nov. 9, 2012)

1.5 (Aug 4, 2012)

1.4

  • Untracked bug fixes
  • Fix for display in console and first fallback for job status [ thanks to: Andreas Kuhtz ]

1.2 & 1.3

  • Fixed location of balls [ thanks to: Andreas Kuhtz ] in MultiJob view
  • Fixed Delete/Rename of subjob

1.1

1.0

  • Initial release

227 Comments

  1. Great !

    Very interesting and awaited concept. Particularly when large organization design complex build and test chain.
    But... and these are probably youthfull defaults, there are some important lacks... or even bug.

    • It cannot take values from a property file and pass them as run parameter to triggered jobs.
    • If a Multi Job is triggered by an upstream freestyle job (for example to pass run parameters taken from a property file), the user friendly hierarchical view is lost. The displays goes back to the standard list of downstream jobs. 

    Nevertheless, it seems to be a rising plugin.

    1. Hi Jean-Luc,

      Thanks for your greetings and comments.

      • It seems the property file parameter to sub jobs is not delivering the file parameter. We opened an action item for us to fix it in the next version.
      • When there will be an option to use inherently in the multijob plugin any parameter type, you can create a single full hierarchy with all the jobs in it (this is our vision). I don't see a use case for creating an upstream freestyle job that has a multijob on its downstream. By using this method you will see the multijob friendly UI with all the hierarchy in it.

      Thanks again.

      1. Unknown User (tford@wms.com)

        I have a use-case for an upstream freestyle job launching a downstream multijob.  We have many, many projects, all of which follow an exact template pipeline.  We are always adding new projects, and removing old ones.  We could create a new MultiJob for each of these projects every time, but that means we can't edit the pipeline once and have it affect all projects.

        We solve the issue by creating a parameterized MultiJob that defines the build pipeline.  Each new project then is simply a freestlye job which calls this parameterized MultiJob, passing it the correct parameter.

        This setup seems to work with MultiJob, but it's a shame to lose the nice hierarchical UI.  

  2. It would be nice to see this plugin integrate with Parameterized Trigger Plugin, so we could use a "Trigger/call builds on other projects" as a build step instead of a single job.

    We need it here because our cross-platform build is organized like this:

    1. the startup job updates the source files from the SCM and performs some quick steps just to be sure there isn't anything terribly broken, it then uses the parameterized trigger twice to start the next steps in parallel.
    2. the first step calls 4 jobs in sequence, those can't be executed in parallel. the second step calls another job that must be run on a particular node. this second step takes roughly the same time to be executed as the first set 
    3. after those two steps are finished, it starts other jobs that performs tests and packages everything.

    I don't see how we can organize it the same way using Multijob without creating a new job to encapsulate all the jobs executed in our first step, which isn't a pretty solution.

    1. I still can find a way to define all your steps and flow from one multi job instance.

      The multi job can be triggered from others jobs using parameterized triggered plugin, so you are also able to integrate other jobs with multi job instances.

      As I said we intend to add more functions of parameters delivery like String parameters from multijob to sub jobs.

  3. Great plugin to create complex job chains that involve parallelism!

    Is there a way to aggregate downstream test results using this plugin?

    In my (test) setup, I have multijob A that executes one sub-job B. Job B records JUnit test results. Both A and B archive and fingerprint the same file "foo". When I look at the overview for job A, the fingerprints for the file foo shows it is used in both A and B builds. However, in the "Project Relationship" view of job A still claims there are no matching fingerprints between A and B. This is also most likely the reason that job A shows empty aggregated downstream test results.

    Is there any way to resolve this and show aggregated test results on the multijob?

  4. Hi,

    this  plugin is really good. I have only two issues:

    1. The Console-Links give an error 404 for me. They all point to http://mybuildserver:8080/console

    2. It would be nice to be able to add some free style jobs to the view.

    But anyway great work.

    Andre

  5. Another issue that I would love to see supported: starting multiple instances of a single job with different job parameters. Currently, only one instance will be started. See https://issues.jenkins-ci.org/browse/JENKINS-8985 for a similar issue/fix for the Parameterized Trigger Plugin.

  6. When I run this project, a collision appears: jobs that should run as a phase are not executed showing message

    (pending - Upstream project UPSTREAM is already building.)

    where UPSTREAM is a name of Multijob project...

    Could it be related to some job settings?
    Because a simple job sequence created to test this kind of job, is executed as expected...

    Could it be caused by the fact that UPSTREAM job has one more upstream dependency?

    Running Jenkins ver. 1.454, Jenkins Multijob plugin 1.0.

  7. When multijob project is linked to another upstream project, it stops showing an hierarchical view of used jobs.
    When link is removed, the hierarchical view of used jobs appears again.

    Note: Plugin component is looks like is missing in Jira...
    I have added and issue https://issues.jenkins-ci.org/browse/JENKINS-13078
    But I have not found related component in Jira and likned it to core component...

  8. Really useful and long awaited plugin!
    It would be nice for core Jenkins to have such features!!!

    One more option would be useful in context of creating a continuous testing:

    add option to 'Mark phase as successful or unstable but not failed' if 'Any of job has status Successful'

    This mean to have an option to consider a phase not failed if at least one job was not failed.

  9. When i add this plugin, the column names like S, W, etc are displayed twice in All (default) view. How can I solve it?

    1. Hi,

      I've commited fix for the problem with the columns and the console link. Someone should merge the pull-request.

      But anyway great work ;-)

      Andi

      1. Thanks, we merged your change to the source.
        It will be an inherent part of the next multijob plugin release soon.
        Thanks for contributing to multijob plugin.

  10. This plugin is very useful for me. This is something I wanted for a very long time. 

    Unfortunately it does not work together with EnvInj plugin. I don't know where it needs to be fixed in Multi-job plugin or EnvInj. I will try to look at the code and file an issue...

    when is the next version coming?

    1. The Environment Injector Plugin was fixed and released last night. With version 1.46 the error has gone.

  11. Hi Roni,

    thanks for the fix with the console.

    I got another issue. I downloaded the sources and tried to fix it myself, but I can't find the problem. :-(

    In my project the subjobs in the multijob-view don't get updated correctly. Really often it shows "N/A" for Last Success and Last Failure even if I build the multijob several times.

    Sometimes it displays a build which is some days old for some jobs. In the past it worked, but I'm not sure at which point of time this problem was introduced.

    Some things I do which could cause problems:

    Formatted buildversion plugin (I use the formatted version as build name)

    Ant-Scripts as part of the multijob. My configuration looks liek this:

    • AntScript
    • AntScript
    • Phase 1
    • Phase X
    • AntScript

    I think somehow the correct "SubBuild" isn't detected, but I have no idea why.

    I hope you can help.

    Regards,

    Andre

    P.S. One thing I found so far

    views\LastFailureColumn\column.jelly declares lfbuild but then uses lsbuild instead.

    P.S.S. Another part of the issue is that all information gets lost after a restart of jenkins

    IMHO it would make sense to add a fallback in case no parentbuilds with subbuilds are available (or store them somehow in a file)

    I added the following code at the end of MultiJobView::createBuildState

            //Fallback for example after a restart.
            if (lastSuccessBuildNumber == 0)
            {
                if (null != project.getLastSuccessfulBuild())
                    lastSuccessBuildNumber = project.getLastSuccessfulBuild().getNumber();
            }
    
            if (lastFailureBuildNumber == 0)
            {
                if (null != project.getLastFailedBuild())
                    lastFailureBuildNumber = project.getLastFailedBuild().getNumber();
            }
    
            if (lastBuildNumber == 0)
            {
        
                if (null != project.getLastBuild())
                    lastBuildNumber = project.getLastBuild().getNumber();
            }
    

    Another thing I changed (because I use a formatted version as build name):

    MultiJobBuilder::perform

     listener.getLogger().println(
                            "Finished Build : "
                                    + HyperlinkNote.encodeTo(
                                            "/" + jobBuild.getUrl() + "/",
                                            String.valueOf(jobBuild.getDisplayName()))
                                    + " of Job : "
                                    + HyperlinkNote.encodeTo('/' + jobBuild
                                            .getProject().getUrl(), jobBuild
                                            .getProject().getFullName())
                                    + " with status :"
                                    + HyperlinkNote.encodeTo(
                                            '/' + jobBuild.getUrl() + "/console/",
    

    Use DisplayName instead of buildnumber. IMHO this is more consistent.

    1. Hi Andre,

      I can see the same problems ... now that I'm aware that they exist ;-) I guess there is some more work to do to fix all these issues. Not sure if the original authors of the plugin were aware of that, but I'll try to provide a patch. Thanks for your investigations.

      Cheers Andi

    2. Hi Andre,

      Have you installed the Environment Injector Plugin (https://wiki.jenkins-ci.org/display/JENKINS/EnvInject+Plugin) ? This breaks the Multijob plugin because it does not know the MultiJobProject class (check the jenkins log ...) and this prevents that the build.xml in the jobs/<project>/builds/<build id>/ is stored where the information of the "Last Success" and "Last Failure" is stored. I had it in my jenkins and after I disabled the envinj plugin the job states are available after restart of jenkins.

      You can see the following text in console output:

      [EnvInject] - [ERROR] - SEVERE ERROR occurs: Job type com.tikal.jenkins.plugins.multijob.MultiJobProject@eebafe[test] is not supported

      Cheers Andi

      1. I have commited a pull request for the problem in Environment Injector Plugin (https://github.com/jenkinsci/envinject-plugin/pull/4).

        1. EnvInject 1.46 should fix this interaction issue with this plugin.

      2. Hi Andi,

        I don't see such an error and I have no idea what this plugin is. :-).

        Here's a list of my plugins directory. Perhaps there's another plugin which causes a problem.

        Andre

         ant
        build-name-setter
        build-timeout
        clearcase
        clearcase-release
        clearcase-ucm-baseline
        clearcase-ucm-plugin
        compact-columns
        console-column-plugin
        copy-to-slave
        cvs
        depgraph-view
        doclinks
        email-ext
        files-found-trigger
        greenballs
        hudsontrayapp
        javadoc
        jenkins-multijob-plugin
        jobConfigHistory
        join
        locks-and-latches
        logaction-plugin
        maven-plugin
        next-executions
        promoted-builds
        publish-over-ftp
        simpleclearcase
        slave-status
        ssh-slaves
        subversion
        text-finder
        timestamper
        token-macro
        translation
        versionnumber
        view-job-filters
        ws-cleanup
        
    3. In my project the subjobs in the multijob-view do not get updated correctly and in time as well.
      Often, subjobs are finished, but this fact even does not appear in the multijob console. As a result, the multijob runs infinitelly...

  12. This Multijob Plugin looks like not registered as Component in JIRA issue tracker:

    • when trying to search or add issues, Jira reports:

    jenkins-multijob-plugin is not a valid component.

    • The above defined Issue Tracking Open Issues (http://issues.jenkins-ci.org/secure/IssueNavigator.jspa?mode=hide&reset=true&jqlQuery=project+%3D+JENKINS+AND+status+in+%28Open%2C+%22In+Progress%22%2C+Reopened%29+AND+component+%3D+'jenkins-multijob-plugin') shows invalid results.

    So, it is impossible to link added issues with this plugin...

    Which JIRA Component/s to use for linking issues with this plugin?

    1. I asked the jenkins-ci group to create a new Jira component for the jenkins-multijob-plugin.

      Meantime you can create issues and associate them with core component.

      Thanks, Roni

  13. I see in the artifacts view that there were two jobs build successfully, however, I don't have any indication of which builds were run in the API. So, http:///Job///  shows the builds that were successfully completed, but the API here http:///Job///api/xml  doesn't show this information.  Is this something that could be added?

    The information is available at the project level (http:///Job//api/xml) , but we really need to know the point in time jobs executed by a specific build number - since the builds and order could change over time.  This is also not available through the json API.

    1. To be more clear:
       -UI Output:
       Started 8 days 6 hr ago
      Took 1 min 31 sec Build #2 (May 29, 2012 11:18:45 AM)
       No changes.
       Started by user MY USER NAME
       
       Step01 BUILD_JOB_NUMBER_1 build #5 ( 1 min 6 sec )
       Step02 BUILD_JOB_NUMBER_2 build #45 ( 10 sec )
       
       
       XML API Output:
       
      <multiJobBuild>- <action>- <cause>
        <shortDescription>Started by user MYUSERNAME</shortDescription>
        <userId>MYUSERNAME</userId>
        <userName>MYUSERNAME</userName>
        </cause>
        </action>- <action>
        <levelValue>0</levelValue>
        </action>
        <building>false</building>
        <duration>91395</duration>
        <estimatedDuration>81168</estimatedDuration>
        <fullDisplayName>MY BUILD NAME #2</fullDisplayName>
        <id>2012-05-29_11-18-45</id>
        <keepLog>false</keepLog>
        <number>2</number>
        <result>SUCCESS</result>
        <timestamp>1338308325000</timestamp>
        <url>MY_URL_TO_MY_SYSTEM_BUILD</url>
        <builtOn />
        <changeSet />
        </multiJobBuild>
       
       
      Would like the following added (or something similar):
       
      <MultiJobSteps>
        <MultiJobStep>
          <MultiStepNum>01</MultiStepNum>
          <MultiJobName>BUILD_JOB_NUMBER_1</MultiJobName>
          <MultiBuildNum>5</MultiBuildNum>
          <MultiBuildSeconds>66<MultiBuildSeconds>
        </MultiJobStep>
        <MultiJobStep>
          <MultiStepNum>02</MultiStepNum>
          <MultiJobName>BUILD_JOB_NUMBER_2</MultiJobName>
          <MultiBuildNum>45</MultiBuildNum>
          <MultiBuildSeconds>10<MultiBuildSeconds>
        </MultiJobStep>
      </MultiJobSteps>
       
       
      Thanks!

  14. Please, always provide a release note for all new releases.
    I have 1.0 and see that 1.4 is out and I need to have a look at github commits to see what changed
    In Jira we created also a dedicated component for this plugin to track related issues

    Cheers

  15. This plugin looks really good. It seems that phases are only executed in sequence and jobs within each in parallel. Can you have deeply nested, complex flows, involving mix of parallelism and sequence of jobs, such as:

    1. Phase1
      • parallel-job1 (phase)
        • parallel-job1a
        • parallel-job1b (phase)
          1. sequence-job1b'
          2. sequence-job1b''
        • parallel-job1c
      • parallel-job2
    2. Phase2
      • parallel-job3
      • ...

    I tried to implement the above structure by creating "parallel-job1" as a separate multi-job project and then calling this job under "phase1". Similarly "parallel-job1b" is a multi-job project with two phases in it (sequence-job1b' and sequence-job1b''). I hope this is the right way to do this. I have noticed few things as listed below (with possible enhancements):

    1. It adds an extra layer of nesting due to phase names, especially when you only want to execute two jobs sequentially.
    2. The toplevel multi-job containing phase1 and phase2 shows the hierarchical view but when I go to the inner level multi-job page such as "parallel-job1b", it no longer shows the hierarchical view.
    3. It would be nice if multi-job configuration page allowed addition of nested "phases" such as by providing "add phase" button next to "add job" button under each phase.
    4. Similarly, the pull down menu for "Add Build Step" could be modified to have two buttons: "Multi-job Phase" and "Multi-job Job", so that we can call sequential jobs within a multi-phase project without having an extra layer of "phase" for each sequential job.
    5. Moreover, for each phase there could be an additional checkbox to indicate whether to execute the child jobs belonging to a phase in parallel or sequence, with default being to run those jobs in parallel.
    6. In the dashboard view, the parallel jobs could be displayed using a bulleted item and sequential job can be listed as numbered item (as shown in example above).
  16. When I abort a multi-job project, it only aborts the current job. It would be great if it also aborted all the child jobs that have been invoked or queued by the multi-phase job. Perhaps this behavior could be controlled via configurable option, a checkbox to indicate whether all child jobs to be aborted or not.

  17. Unknown User (bennyab)

    a great plugin!

    im using it to warp all our automation testing according to the coverage level (sanity,regression..)

    one thing that is missing and it keeps coming up is the option to reflect the downstream job status to the multijob.

    in my case i have several downstream jobs that run junit like test and publish junit XML report so most of the time the downstreams job are yellow ;-)

    the multijob doesnt reflect that as he can have only blue or Red (blue==Glow red == you dead.....)

    to over come it i used groovy post build script plugin and added the following script.

    Groovy Post script
    downstreamBuilds = manager.build.getDownstreamBuilds();
    downstreamJob = downstreamBuilds.keySet().iterator();
    SaveRes=manager.build.result.SUCCESS;
    
        while (downstreamJob.hasNext() ){
    
    lastDownstreamBuild = downstreamJob.next().getLastBuild();
    SaveRes=lastDownstreamBuild.getResult().combine(SaveRes);
    
    
        }
    
    manager.build.setResult(SaveRes);

    the script gets all the downstream builds in the multijob and will compare their results , it will take the worst result from all those job and will assign it eventually to the Multijob status.

    this way the plugin gets yellow status as well.

    the only things that must be set in the downstream builds are the fingerprint recording(for the junit xml results) and you good to go.

    this tweak makes this plugin the ultimate wrapper for testing.

    enjoy.

  18. Unknown User (avir)

    Great plugin.

    I wanted to ask if there's a way to Rebuild a MultiJob from a specific phase?

    For example, lets say we've got few phases that succeeded and one of the last phases (lets say, for example Packaging phase...) failed.

    Now I want to rebuild the MultiJob, but I want it to skip automatically all the phases that succeeded, and that the phase that will actually run will be the one that Failed.

    Is there a way to do that? 

    Thanks!

    1. Hi Avi,

      The motivation behind this is that unlike other "contextual / flow builders" MultiJob is trying to provide a transparent & determanistic flow end to end which will not be the case in your request for you are asking to start a phase with no MultiJob context.

      Nevertheless what we can do which relates to your comment below: "Is there a way to do a "conditional phase"? like there is a "conditional job" => this will align to the transparent flow for we could determine the flow of the Job through the "Build Parameters" which are available after the build has completed.

      One of the most important goal of MultiJob is to be able to know what happened (what version/revision & other parameters), what jobs in which phases & of course when it happened and how long - I would open a Feature Request.

      So the short answer to your question is no, the long answer is yes (wink)

      I took the liberty of creating a Feature Request for it for I think it is quite powerful - feel free to comment if my description dosent seem to fit your intentions: https://github.com/jenkinsci/tikal-multijob-plugin/issues/4 or https://issues.jenkins-ci.org/browse/JENKINS-14600.

      Thanks

      HP

  19. Unknown User (avir)

    Is there a way to do a "conditonal phase"? like there is a "conditional job.

    For example, I would like to add a parameter boolean check-box and let the user choose wether to do the phase or not.

  20. Great plugin, but I miss an option: what about an option to launch the phase only when an environment property has set to some value? Something like conditional-buildstep.

    Why?

    I can get a complex multiproject with the conditional-buildstep, but the dependency graph is not showed, so it is incomplete.

    This plugin manages the dependency graph, so the only thing I miss is the posibility of not to run a phase.

    For example, if I define the multijob as parameterized job, with a boolean property named RUN_PHASE1, and the multijob has the phases PHASE1, PHASE2, PHASE3... and each phase has a conditional run property, we would do it.

    Phase name: PHASE1

    Run when condition: ${ENV, var="RUN_PHASE1"}

    (in conditional-buildstep)

    ...

  21. Hi,

    I have EnvInject plugin loading parameters from file in the main job. Those parameters never make it to the jobs in MultiJob phases, despite "Current job parameters" being checked.

    Is it a bug or am I missing something?

    Thanks.

  22. Sorry, somehow double-posted. Please see my comment above. Tnx.

  23. Can you please explain about Parameter Passing more... for this plugin.

    And how to use Parameter in all Multijobs.

  24. hi,

    very nice plugin it solve lots of complicated job chain problems.

    But I tried to enable option "Execute concurrent builds if necessary" and I get stranges behavior. It looks like it does not well track ended builds.

    Is it a supported feature?

  25. Hi,

    In latest release, the NodeLabel Parameterized plugin is taken into account.

    It would be even better to be able to restrict node/label for each job of a phase.

    This plugin is nearly perfect for me.

    1. Hi,

      I'm not sure I understand. In case you'd like to send different node to different jobs, there shouldn't be any problem to do so.

      I have created a multi job that executes a job that has a node parameter. In the predefined parameters field I have sent this parameter to the downstream job and it worked just fine (e.g. NODE=build01. The downstream job got build01 as the node where the job will be executed).

  26. Is there a way to wait for all jobs to complete, even if one fails?

    Right now it seems if "Job A" and "Job B" run in parallel, if "Job A" fails, than it tells "Job B" to abort. Even if "Job A" fails, I want to know if "Job B" passes or not, before the whole MultiJob is marked as a failed run.

    1. Hi Sean,

      The use case is a bit "against the nature" of the plugin, Phases are atomic which means the entire Phase must succeed (or in the worst case be unstable) before the proceeding phase can execute.

      thus the behavior of the plugin is as such.

      We could consider something like a checkbox saying "ignore other phase build results" (or some other meaningful phrase) - I recommend opening an enhancement request on this one (in Jira of course:)).

      Thanks

      1. I'd also like this feature.

        I ran into an issue with one job corrupting the workspace of another job because of this. 

        Phase 1 has Jobs A,B,C,D, and E that all run in parallel on different platfoms. Job A failed while job B while in the middle of getting the git repo in the workspace ready. The abort caused the git index lock to be left behind (I know that the Git plugin should fail gracefully and I'm following up on that). But I'd like the option of letting all the jobs run to completion to prevent only the first failure from being reported instead of all failures.

  27. The advanced section has an option of "Exposed SCM".  How does it work?

    1. Sorry on the late reply Ming,

      This actually made way and is still in the planning phase, we have had a thought of adding an SCM configuration globally and make it inherited by the excuted jobs, as I said it is still in the definition phase.

      Thanks

      HP

  28. Hi. Been looking for a plugin like this for long, great job :-).

    One nifty feature would be if it would be possible to aggreagate the parameters from the included jobs and present when starting the multijob.

    Example.

    Multijob x - no parameters

    - Job y: Parameter 1: Name a(String), Parameter 2: Name b(List)

            - Job z: Parameter 1: Name b(String), Parameter 2: Name d(List)

    So the parameters would all show up when starting a multijob build.

    1. Thanks Christopher,

      Please file an enhancement request in Jira & we will see if we can add it in :)

      Please note: pull requests are also welcome on github :)

  29. Hi. I've set up a root project that contains several downstream projects (as a "release" project). Now I want to tag the release, but I have to duplicate all the configuration locations in the SCM configuration part (in the multijob project/root/release project).

    Is there a way to reuse the configuration locations from the downstream projects to enable automatic tagging? => I want one place to have the configuration for SCM (Subversion) in the downstream projects.

    1. As of now I do not see a way to do this from within the MultiJob configuration unless we override the "downstream" jobs SCM configuration (which crossed our minds BTW).

      The ugly way of achieving this is using parameters in the job and in multijob which will populate the SCM configuration with your requirements.

      For example: you can have string parameter "SVN_BASE" set to http://mysvnhost/repo/_*  (this could actually be globally set), and then *PROJECT_BASE set to projectname/trunk{_}.

      In all the jobs (including multijob) you will have in the svn url configuration:$(SVN_BASE)/$(PROJECT_BASE) ( please note I used parentheses instead of curly braces because of the editor ...).

      In this use case I would use the properties file parameter and add it globally so you can use it / modify it and apply the change to all your jobs (one great example would be if you change your svn server hostname for some reason - and you want to save the edit of all the jobs and all its parameters),

      Just my thoughts

  30. I have a 10 phase job set up. It dies at phase 5. I fix the problem. Where is the restart button next to phase 5 ?

    Am I missing something ? Seems like the fundamental function of phase restart is missing.

  31. The Multijob is taking up an extra executor while its phases are building. Is there a way to make it 'Flyweight', so the executors are not blocked?

  32. I have a job B which has a Label parameter named "MAIN_RUN_NODE" in parameterized build section (no default value)

    I'm calling B from job A as a Multujob phase, while passing (through Multijob params) MAIN_RUN_NODE=$NODE_NAME (I want B to run on the same node A started on).

    However it seems to completely ignore the parameter when passed in such fashion.

    I also tried in addition setting "Restrict where this project can be run" to $MAIN_RUN_NODE only to have the jobs hang indefinitely waiting for nodes under label "$MAIN_RUN_NODE" to become available - it doesn't expend the variable. I have 1 jenkins master where the latter works, but on all other masters despite all efforts it seems to be unable to resolve the variable properly.

    Any ideas? Looks like a problem somewhere between multijob and NodeLabel plugin?

  33. Ok, I read a lot of talk about combining multi job with parameterized plugin, but still confused.

    I have 

    multi job a

    phase b 

    phase c

    phase d

    How do i pass a build_number from b, and a different build_number from c, both to d?

    1. I struggle with the same problem, is there a way to solve it?

      Edit: Moved question to stackoverflow

  34. Hello

    I am wondering how can i create a "Multijob" view to display only one of my multijob (and its downstream phases) ?

    When i create a new view using "Multijob View", the description stands: "Shows items in a simple list format. You can choose which jobs are to be displayed in which view."

    However, on the next page (view edit), i can only setup a name/description for the view, then activate or not "Filter build queue" and "Filter build executors".

    Nothing related to choosing which job(s) are to be displayed.

    Am I missing something ?

    I am using Jenkins 1.494 and latest multijob release 1.7.

  35. I use this plugin to kick off a battery of downstream tests (just one level).

    The top job is just a wrapper to launch all the tests, and serves as an aggregate (to have simpler pass/fail reports).

    When all the downstream tests have a good return code, the upstream job is clean.  However when one of the downstream test fails, the tests that are already running will abandon and/or tests that haven't started yet (mostly due to unavailability of executor) will be abandoned.  The upstream job will fail, and I only know of the first downstream test that failed.  There is value in knowing the results of ALL the downstream tests, even when some sibling tests fail.  How can this be configured?

    Here is what I get today:

    Starting build job esddrc_testcase06_beta.
    Starting build job esddrc_testcase08_beta.
    Starting build job esddrc_testcase10_beta.
    Starting build job esddrc_testcase05_beta.
    Starting build job esddrc_testcase09_beta.
    Starting build job esddrc_testcase07_beta.
    Starting build job esddrc_testcase02_beta.
    Starting build job esddrc_testcase03_beta.
    Starting build job esddrc_testcase01_beta.
    Starting build job esddrc_testcase04_beta.
    Finished Build : #38 of Job : esddrc_testcase10_beta with status :FAILURE
    Build step 'MultiJob Phase' marked build as failure
    Finished: FAILURE
    
    1. Hello

      you can set "Mark phase as successful when phase jobs' statuses are" to "Complete (always continue).

      It will allow all the jobs running in your multiphase to finish.

      The overall status of the multiphase shall be the worst build result.

  36. Hi,

    I have a (perhaps?) problem with this plugin. I just implemented our complete buildjob to jenkins in the last weeks. We were running nigthly builds successful within trhe last ~10days.. but since yesterday I have a strange behavior:

    The multijob plugin triggers a compile action and it runs fine. The console of the job itself is a multiconfiguration job which builds the software component in 32&64 bit version. The multiconfiguration job finishes with "Finished: UNSTABLE" (unstable is OK, it is marked as unstable because there are compiler warnings, done with the warnings plugin).

    However in the console of the multijob project I see that this step does not "return". It is triggered together with two other compile steps, which are run in parallel. Both of them return correctly, but the third component doesnt. Is this a known problem? Has anybody a suggestion what could be a solution or workaround here? 

  37. Will you add support for Folder plugin from cloudbees? It is very important for US

    1. Sorry for the late reply on this, we are planning to support this - we have a bug open and we are looking into this - please stay tuned for updates

  38. I'm trying to setup a multi-phase build where a clean up phase is always run at the end.

    Since we want to dynamically stand up instances in AWS, to test that we can deploy software to machines with new puppet code, it's important that we can tear them down at the end by default and only leave them running if someone wants to run the job in a debug mode to investigate.

    So far I can only achieve this by adding a post-build action to trigger the cleanup, which works but effectively is executed in a manner that means you can't see that the clean up jobs all ran correctly to shut everything down if the  multijob project failed.

    Trying to use conditional build steps resulted in each of the other phases in between running as each phase was treated as being successful when marked as always complete.

    Is this not supported yet, a bug in the current plugin or am I just not configuring the project correctly?

    1. Hi Darragh,

      Currently there is a bug - fix is pending in this pull request, this fix will enable you to specify if a singular failure should fail the entire multi-job or not.

      We should be releasing this fix in the next week-10 days.

  39. Starting from versions 1.11 and 1.12 have CRITICAL issue.

    In case of using multijobs - java loads CPU for 100%

    The most stable version is 1.09, 1.10 also works but has annoying defect: warning "There are other upstream projects for this job"

    1. Hi Mykola,

      Could you please be more specific: Jenkins version, java version ?

      We are using multi-job quite extensively and didn't encounter issues as you describe, nonetheless we are looking into it.

      Thanks

      HP 

      1. OS: windows server 2003, 32-bit

        Jenksins: 1.532.2 LTS

        Java: latest 7.0.51 (32bit)

        There is also similar (or same) opened issue https://issues.jenkins-ci.org/browse/JENKINS-21649

        Multijob plugin version - 1.12

        p.s.

        I have no such issue with multijob version 1.10. So this is definitely a regression on your side.

        Thanks

        1. with version 1.13 - it is ok! Thanks!

  40. Hello,

    There is an issue when using Multi-configuration project inside MultiJob plugin with build last state.

    Case is like following:

    Multijob1

    + Multi-configuration project1 which has, ex two slaves: slave1 and slave2

    In multijob view last build state of Multi-configuration project1 is shown for

    /job/Multi-configuration-project1/

    but not for

    /job/Multi-configuration-project1/Slave=slave1/

    Are there any plans to implement this?

  41. Hello,

    There is an issue when using Multi-configuration project inside MultiJob plugin with build last state.

    Case is like following:

    Multijob1

    + Multi-configuration project1 which has, ex two slaves: slave1 and slave2

    In multijob view last build state of Multi-configuration project1 is shown for

    /job/Multi-configuration-project1/

    but not for

    /job/Multi-configuration-project1/Slave=slave1/

    Are there any plans to implement this?

    1. I am not sure I understand the use case could you elaborate ? / send a screenshot ?

      HP

    2. Issue#1:
      Here is en example of incorrect multi-configuration job status: 

      I can't understand how it is working, status can be random, failed/success/pending

      Issue#2:
      When particular build is opened from build history it is not possible to open multi-config job, the link is invalid: 

      1. Thanks for the input, we will try to reproduce the issues and update with the results as soon as possible

  42. With this plugin, does it guarantee that the particular revision of the SCM being checked out will be the same across all the jobs?

    i.e. assume simple case of a build chain of A -> B -> C, all using the same upstream git repository. Builds take a while to finish. Active committing taking place.

    I want A, B and C to all use the same specific commit of the repository. I don't want A to get one commit, then B to get "latest at A-finish-time" and C to get "latest at B-finish-time".

    If not, any suggestion on how to implement that?

    1. Hi Nathan,

      This is actually something we are looking at feature wise, a way to "pindown" the revision in the time of execution to all jobs within that instance of the multijob execution.

      The only issue currently is that in builds which are build from multiple SCM's / repositories we will need to specifu more than 1 an pin down their versions - it is definitely something we want to do and we already have some initial work done on it - but it will take some time to integrate into the flow.

      Please stay tuned for future releases. (jsut as a "teaser" we had a pull request done by Lior Boord which started this feature)

      1. Any progress on this one?

        Thanks in advance.

  43.  I think additional condtition needs to be added when phase suppose to fail :

     - When job result status is SUCESS

        Why? For example Im checking app version on remote machine, passing version no as parameter. If the version we want to test is POSITIVE we want to FAIL the phase, where next step is reverting machine on vSphere. 

    1. Jan, Sorry I missed this comment.

      I am not sure I understand the usecase, any action you perform in a job which retunes a value different than 0 is a FAILURE with one exception which is unit tests which will return as UNSTABLE, otherwise its SUCCESS - can't you "live" within these boundaries ? 

  44. I use this plugin since one month, and I see no issues (till now).

    But I miss an option to optimize the builds: trigger build only if downstream job has SCM changes, something like Downstream-Ext plugin.

    Now the plugin allows set the Phase name and the Phase jobs, but this jobs launch ever if no changes were commited since last build, so a checkbox here would be very useful, something like:

    [  ] Trigger build only if downstream job has SCM changes

    Is this posible?

    NOTE:

    After a couple of hours I made it. For anybody interested, see https://issues.jenkins-ci.org/browse/JENKINS-22893.

    1. Hey Ramón,

      Just like I commented on 22893 wouldn't you like to issue a pull request ?

      Thanks

      1. Hi Philip. I issue a pull request yesterday, but it failed. I've just analyzed the log, I've changed some lines of my code and issue a new pull request, but the same error. So I decided reset the code. I deleted the fork, I created it again and rewrite the code. But the result is the same: an error, the same error, so I've just analyze the problem till now. 

        The mvn test shows an error at ConditionalPhaseTest.java.

        First I was thinking it was my fault, something wrong with the pull, but I've just discovered the problem, and not the solution. This is the code to check if the job needs to be build:

        boolean hasChanges = subJob.poll(listener).hasChanges();
        ...
        // The error is here:
        Assert.assertTrue("shell task writes 'dude' to log", multi.getLastBuild().getLog(10).contains("dude"));
        

        But mvn test runs ok if I replace the previous code with:

        boolean hasChanges = false;
        ...
        Assert.assertTrue("shell task writes 'dude' to log", multi.getLastBuild().getLog(10).contains("dude"));
        

        So I think the problem is with the listener or subJob.poll(listener), because the plugin works well after installing at Jenkins. So I am confused about this.

        1. I saw that the latest pull request (#53) is OK ;)

          It will be merged into the upcoming release -> Release date TBD, will keep you posted.

          Tx

          HP

          1. I discovered a minur bug two days ago.

            I've just fixed it, and I've just probe it these days.

            Today I've pushed the changes, and the pull request was OK.

  45. Hello.

    I am developing an improvement to this plugin, but I don't know if it is interesting enough to finished it. This is the scenery:

    In a muiltijob project we have four jobs configured with the "Build only if SCM changes" feature enabled (my first modification of this plugin).

    Jenkins launch the multijob project, but only one job is builded. Jenkins must build another project when at least one of the jobs in multijob project was builded. But the plugin doesn't allow these conditional build.

    With the new code I am developing I can configure an "After all jobs have finished, build and extra job when":

    • Result: Result to compare with (one of hudson.model.Result: SUCCESS, FAILURE, UNSTABLE, ABORTED, NOT_BUILD.
    • Condition to compare with: Equals, isBetterOrEqualTo, isWorseOrEqualTo, ALWAYS, NEVER.
    • How many jobs: At least, how many jobs must agreed the result condition to build the extra job? 0  means "All jobs configured at this phase" (this is planned).

    For example:

    • Result: UNSTABLE
    • Condition to compare with: isBetterOrEqualTo
    • How many jobs: 2

    This results in a condition that will build an extra job only when there is at least 2 jobs with UNSTABLE result (or better) at results of jobs. My code is working now in my PC, but I need to do a little refactory in code, and more testing job.

    With the above configuration, if there is only 1 job with UNSTABLE or better result, the extra job would not be builded.

    Do you think this is interesting enough?

    1. Hi Ramon,

      If you have a use case it applies to so it is interesting, as long as your change doesn't reflect the MultiJob's normal behaviors we are OK with any addition to it.

      Personally I would just add an additional step / phase inside the multijob but I can relate to what you are saying and perhaps there are scenarios where this could make sense.

      Thanks

      HP

  46. I've just spend last days trying to get the solution to the following use case (as described in my previous comment) without my current implementation, but without lucky (currently there is no job results saved at environment to use in a script, for example).

    I have the following jobs: job-1, job-2, job-3 and job-distribution.

    job-1, job-2 and job-3 are normal jobs, that does not depends on another jobs.

    job-distribution is a job that packages the results of the other jobs (and may be another jobs or libraries) to get a simple packed file with all the contents of job-1, job-2 and job-3.

    job-distribution must be launches if and only if one (or more) of these conditions have been agreeded:

    1. job-distribution SCM changed.
    2. Forced build is enabled.
    3. At least one of job-1, job-2 or job-3 have been build at previous or current phase.

    The use case is simplified from funcionality I would like to implement (the condition at #3).

    Why this use case?

    With the Build only if SCM changes those projects (as job-distribution) that has no SCM changes would not be launched when another (job-1) has SCM changes, but the job-distribution should pack it with the other jobs.

    At this time I am thinking about an implementation that allows a conditional step get the results of the previous job results, with TokenMacro and Conditional Step (at Builder we can choose Multijob Phase, more powerfull than my current approach). I will developed the minimum changes at multijob Plugin to save the job results to reuse them with Token Macro.

    What do you think about this? I think that with this modification (save job results to reuse them in Token Macro) this should be more naturally: the conditions #1 and #2 should be cover by the Multijob Plugin, and the condition #3 should be cover by the Conditional BuildStep Plugin.

  47. would be interesting if one had the option to put build steps in phases instead of jobs. Anyone tried to implement this before or is it not feasible?

  48. Hi,

    I am using latest version of multijob plug in . I have configure phase with two sub jobs. I want to stop whole phase if any of the job fails. How can i achieve this. Current options that are provided are not helping me.

    Thanks,

    Niraj

  49. I am trying to setup a multijob configuration based on the instructions provided but I do not get the multi-job triggered by SCM changes. What is required?

    Setup:

    Phase 1: 2 jobs, one with GIT SCM polling selected.

    Phase 2: 1 job, no SCM

    Phase 3: 2 jobs, no SCM

    Expected: A change in job 2 SCM (phase one) should trigger the whole pipeline.

    What happens: Job 2 is executed by its own SCM trigger but does not trigger any downstream.

    Multijob is configured to do SCM polling and expose the SCM of the jobs. All manual downstream have been disabled. Only multi-job orchestration is available.

    1. Hi David,

      We actually have this scenario in mind but haven't implemented it yet (we actually have a PR with that type of functionality.

      The Poll SCM on the multijob should (by-design) trigger all jobs within the multijob, a single SCM triggered job / phase is as I said not implemented yet - care to pitch in and offer a pull request ?

      10x

      HP

  50. Hello,

    Can you please fix defect with opening multijob phase jobs if the multijob is has been opened from some view?

    Case:

    1. create list view

    2. create multijob in it

    3. create Multi-configuration project job with some axis (at least one, any type), and add it job to multijob. Note: job should not exist in view created in step#1

    4. open multijob, link should be like http://HOST:PORT/view/MY_VIEW/job/MULTIJOB/

    5. open multijob phase job, link is like http://HOST:PORT/view/MY_VIEW/axis1=someValue/

    ACTUAL RESULT:

    there is no job name in link, so link is not valid and cannot be opened.

    EXPECTED RESULT:

    there should be job name in link, like http://HOST:PORT/view/MY_VIEW/job/MULTICONFIG-JOB/axis1=someValue/

  51. Hello,

    We use multijob plugin for the first time (version 1.14) and we get this error-message again and again.

    FATAL: hudson.scm.SCM.calcRevisionsFromBuild(Lhudson/model/AbstractBuild;Lhudson/Launcher;Lhudson/model/TaskListener;)Lhudson/scm/SCMRevisionState;
    java.lang.AbstractMethodError: hudson.scm.SCM.calcRevisionsFromBuild(Lhudson/model/AbstractBuild;Lhudson/Launcher;Lhudson/model/TaskListener;)Lhudson/scm/SCMRevisionState;
    at com.tikal.jenkins.plugins.multijob.MultiJobBuilder.getScmChange(MultiJobBuilder.java:117)
    at com.tikal.jenkins.plugins.multijob.MultiJobBuilder.perform(MultiJobBuilder.java:181)
    at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
    at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:756)
    at hudson.model.Build$BuildExecution.build(Build.java:198)
    at hudson.model.Build$BuildExecution.doRun(Build.java:159)
    at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:529)
    at com.tikal.jenkins.plugins.multijob.MultiJobBuild$MultiJobRunnerImpl.run(MultiJobBuild.java:134)
    at hudson.model.Run.execute(Run.java:1706)
    at com.tikal.jenkins.plugins.multijob.MultiJobBuild.run(MultiJobBuild.java:73)
    at hudson.model.ResourceController.execute(ResourceController.java:88)
    at hudson.model.Executor.run(Executor.java:232)

    1. In one of the phasejobs we use the StarTeam-plugin.

      1. Sorry, but we have never tested / used the StarTeam plugin Coud you please open a bug in issues.jenkins-ci.org and spacify:

        1. Jenkins version

        2. "conflicting plugin" version StarTeam 

        Thanks

        HP

        1. Itai-o has already open a bug -> https://issues.jenkins-ci.org/browse/JENKINS-25452  + has a fix on the way, we will release 1.15 once he is done.

  52. Hi,

       We have a problem when create Multi job project. Our requirement is parent Build number want to share all jobs in a phase.

    1. What do you mean you want to pass the BUILD_NUMBER from parent to phases (child builds) ?

      10x

      HP

      1. We have four phases. In the third phase we have 10 jobs, and we want to pass first job BUILD_NUMBER to all jobs in that phase.

        1. Considering theMultiJob just executes the builds in the phase and is not aware of the BUILD_NUMBER of the job he is executing I do not see away to "predict" the BUILD_NUMBER of the first job out of 10 (or 2 for that matter) ...

          I think what we could try to do is pass a BUILD_NUMBER from the MultiJob to the "chiled jobs" - this needs some testing but would probably work without any "special implementation" considering you can set this from the outside whilst executing any job in Jenkins.

          LMK if that helps in any way.

          HP

          1. We have pass input parameters from one job to another. But how can i set that parameter to build number of second job?

            we use echo shell command . But it fails...

            1. I will need to do some testing in order to find a solution for this.

              I will do my best to test and report back First Thing Monday morning.

              Cheers

              HP

  53. Hi,

    with version 1.14 we have to following error:

    Building on master in workspace /mnt/jenkins1/app/workspace
    
    
    [framework] $ hg log \--rev . \--template node
    
    FATAL: Cannot run program "hg" (in directory "e:\jenkins\build\framework"): java.io.IOException: error=2, No such file or directory

    With version 1.13 everything works fine. I think its related to the new feature "Run build only if there is an SCM change (int eh child job)". We start the MultiJob project on the master, each midnight. Then the child jobs (which are again MultiJob projects) are executed on dedicated slaves. But the first job which should be executed on a slave is not even triggered. The error seems to happen on the master, which is a Linux machine and has for sure no e:\jenkins\... directory.

    Maybe this feature needs some improvement or at least a switch to enable/disable it?

    Many thanks and best regards!

    1. It looks like mercurial is missing I don't think this has something todo with the plugin version / plugin update.

      HP

      1. yes, mercurial is NOT installed... and not needed... on the master Jenkins machine. It still works when I downgrade to version 1.13. I think MultiJob tries to gather mercurial information because of the new feature. But I do not need/want this :)

        1. Hi Florian,

          You are correct, the code in 1.14 will always perform he SCM change check - we just releases 1.15 (thanks itai-o), you should see it later today  tomorrow in the Jenkins update service.

          Tx

          HP

          1. Hi HP,

            wow, that's a really fast response. Thank you so much!

            BR,

            Florian

              1. just wanted to confirm here that with version 1.15 everything works as expected. So problem with SCM solved.

  54. Hi,

        We can clone using jenkins job. But how to commit and push data using Jenkins.

        I think we use git publisher. Can you please give steps for the configuration of git publisher.

  55. I am a long time fan of the multijob plugin. I think its great. I saw that in 1.14 you added retry support which I have been looking forward to since naginator doesn't work right when used with multijob. Our build process uses a dynamic matrix job where just one or two items fail. I was wondering if there are plans to expand the newly developed retry support to allow us to retry only the failed portions of a matrix job.

    Thanks,

    Jason

    1. Hi Jason

      Please feel free to submit a feature request for this and we will asses and add it to our Backlog.

      Thanks for reaching out.

      HP

  56. Totally looking forward to latest update with conditional job step ... wondering best way to do regular expression, specifically: "if parameter is set".

    Cheers

  57. Hi,

         I have a Multijob. In third phase i have 10 jobs. How can i build job only Source Code Changes in Jenkins?

    1. since 1.15 you can use the "Build only if SCM changes" checkbox as emphasised in the image below:

      1. Thank you very much...

  58. Hi!

    When I updated to 1.15 all my multi jobs disappeared. They reappeared when I downgraded to 1.13 again.

    Please advice.

    .: Eric, Softube

    1. HI Anton,

      What Jenkins core are you using, we didn't get ny complaint a such for 1.13, 1.14 or 1.15 ...

      Could it be you are on an old Jenkins core and you upgraded the plugin ? 1.14/5 introduce a new dependency on the Jenkins core -> 1.565.1.

      10x

      HP

  59. Hello,

    I've installed version 1.15 on Jenkins 1.580 yesterday and configured 1 multijob with 3 phases.  Each phase has 1 job so they run in sequence.  Each phase has the Configuration Condition set to "Complete (always continue)".

    When I execute the job, phase 1 runs and completes successfully.  But phase 2 never starts.  The multijob continues to show that it's running but the downstream jobs do not execute.  The console output of the multijob shows that Phase 1 is completed successfully. 

    Please let me know what I'm doing wrong.  Screenshots attached.

    Thank you,

    Steven Erat

    Figure 1) Multijob running showing phase 1 complete and successful.

    Figure 2) Job configuration.

    Figure 3) Console output showing Phase 1 complete and successful.

    1. It's weird considering you are did all the right things, let me setup a short sample and get back to you.

      1. Just tested this with a three phase like you deployed above with Jenkins 1.561 (which is what our POM files recommends see -> https://github.com/jenkinsci/tikal-multijob-plugin/blob/master/pom.xml#L6

        And I already see a difference in the build condition options ... 

        Could you test this with Jenkins 1.561 ?

        You need to test this with the dependent version specified in the pom or you should have see some kind of message in the plugin update center saying something like: "This plugin may not work with your version of Jenkins" ...

        In my example it worked ... 

        and the console: 

        Tx
        HP

        1. I trust your experiment to validate Jenkins 1.561.  However this is shared Jenkins server with many teams, so downgrading is not an option.  In fact Jenkins is prompting an upgrade to 1.592 already...  Also the multijob plugin doesn't warn about a support issue on the plugin page.

          I verified that all the dependency plugins are installed, however I just noticed that EnvInject was installed but not enabled.  Re-enabling now....
          ... and that fixed it.  Enabling the EnvInject resolved the issue and multijob is now working.  (This also confirms support for Jenkins 1.580)

          Thanks for your quick response!

          1. Thanks for letting me know, we will need to update our dependency accordingly - what version of EnvInject are you using currently we depend on 1.90.

            Happy to hear that solved your issue.

  60. Hello,

    I have a multijob with enabled option "This build is parameterized".
    Have String parameter NODE_NAME=my-node1
    This job should run on master

    Also there is a parametrized job with Node parameter

    How can I pass String NODE_NAME param from multijob to parametrized job with NodeLabel plugin?

    In case of using "Trigger parameterized build on other projects" - parameter passed successfully. I'm just passing "Current build parameters".

    However option "Current build parameters" doesn't work for Multijob Phase.

    Looks like a defect of multiJob plugin. (or some ugly feature)

  61. I was trying to open visual studio on a machine using jenkins, but he process is runnin on background only, the studio window is not active/ visible to the user.

    I  was trying to execute Scaffolding commands on Visual studio Package manager console using AutoHotKey exe.

    Is there any way to do this.. Please suggest

    1. This has nothing to with multi job :)

      This depends on how you configure you jenkins slave ... as a service / jnlp etc.

      Its been a while since I've done this but AFAIR you must configure the slave as jnlp for you main display to work.

      1. Thank you very much for your realy,

        I posted a comment in wiki common plugins and windows exe runner plugins. But i didin't get any replay. That's why i put your wiki. sorry once again.

        I want a help from you, because i am a beginner in jenkins. how can i configure slave in jenkins as jnlp for run windows service. Step by step process csan you please give me.

        Once again thanks, and i hope you will help me,

        Thanks,

  62. Hi there, 

    I wonder if someone can help me with the following request. For the multijob plugin, how can I configure a phase which would be triggered only the previous phase is "Unstable". Such like phase #2: Test, phase #3 Redeploy, when phase #2 has some failed test cases, it will be marked as unstable. I would like to trigger phase #3, only when phase #2 is unstable.

    Unfortunately, The "Continuation condition to next phase when jobs' statuses are:"

    "Always";"Successful";"Completed";"Stable or Unstable but not failed";"Failed"

    I need another option: "Unstable".

    Any suggestion is appreciated.

  63. Hi there,

    Thanks for this great plugin. I do however have a query.It seems that if a phase is marked as unstable it marks the build as failed.

    I have 3 phases. Lets say :

    A,B, C

    I want the build to stop executing B and C if A is unstable. In this case the build is marked as failed, yet I would rather that the build is marked as Unstable here. Is there a way to control this?

    It seems to me that the issue covered in https://wiki.jenkins-ci.org/display/JENKINS/Multijob+Plugin?focusedCommentId=63144193#comment-63144193

    Cheers,

    Baubak

    1. However after research it seems that the Conditional Step plugin does not work in the case of the Build Status.

      https://issues.jenkins-ci.org/browse/JENKINS-19802

      I did however find a slight workaround:

      If phase A only contains one job, we can see its build status. So in the conditional step we do a string comparision.

      I do not however know if there are any limitations when we run this in parallel.

      It would be nice if we had an environment variable:

      PREVIOUS_PHASE_STATUS

  64. I had a number of jobs already configured before which where all build steps for the same project. I thought it might be nice to regroup them with the Multijob plugin.

    I created a new Nultijob job called Mainline and added the projects to each phase. Unfortunately, when I execute the job, it does the initial execution (synchonizing with perforce) and then it prints:

    "Starting build job JobA"

    and just blocks. JobA is in the build queue but says:

    (pending---Upstream project Mainline is already building.)

    So, basically nothing happens. By the way I have 6 executors. Any ideas why JobA never executes?

  65. I have modified the code of this plugin to get the following features:

    • There are many new variables, to reflect some useful (it is my opinion) cases:* *MULTIJOB_SUCCESS_COUNTER: The name of the new build variable which stores the number of successful jobs. In this context, the SUCCESSFUL state means SUCCESS AND UNSTABLE results.     * In this context, the SUCCESSFUL state means SUCCESS AND UNSTABLE results.
      • MULTIJOB_FAILED_COUNTER: The name of the new build variable which stores the number of failed jobs. In this context, the FAILED state means FAILED AND NOT_BUILT results.
      • MULTIJOB_UNSTABLE_COUNTER: The name of the new build variable which stores the number of unstable jobs. In this context, the UNSTABLE state means the UNSTABLE result.
      • MULTIJOB_STABLE_COUNTER: The name of the new build variable which stores the number of successful jobs. In this context, the STABLE state means SUCESS results.
      • MULTIJOB_ABORTED_COUNTER: The name of the new build variable which stores the number of aborted jobs. In this context, the ABORTED state means the ABORTED result.
      • MULTIJOB_SKIPPED_COUNTER: The name of the new build variable which stores the number of skipped jobs. In this context, the SKIPPED state means the SKIPPED and DISABLED jobs.
      • JOB_IS_BUILDABLE: Now there are many internal states of jobs handled by the new code, every one has a true or false value, exposed with this variable.
      • JOB_STATUS: The job status name (see below).
    • The buildOnlyIfSCMChanges is now one of the diferent states of jobs. It is available as value in JOB_IS_BUILDABLE variable, for using in conditions.
    • The internal states of jobs handled by the new code are exposed in the JOB_IS_BUILDABLE variable, and are the following (in the same order that are checked, and the state name is stored in JOB_STATUS variable):
      • IS_DISABLED. The subjob is disabled. It is not used now, because it is not integrated with the current code, but I think it may be useful in the future. JOB_IS_BUILDABLE = false.
      • NO_BUILD_ONLY_IF_SCM_CHANGES. The value of the Build only if SCM changes property of the subjob is false. JOB_IS_BUILDABLE = true.
      • BUILD_ALWAYS_IS_ENABLED. The current BUILD_ALWAYS feature is enabled for this multijob. JOB_IS_BUILDABLE = true.
      • DOESNT_CONTAINS_LASTBUID. Subjob doesn't contains last build. JOB_IS_BUILDABLE = true.
      • LASTBUILD_RESULT_IS_WORSE_THAN_UNSTABLEJOB_IS_BUILDABLE = true.
      • WORKSPACE_IS_EMPTY. The workspace of the subjob is empty. JOB_IS_BUILDABLE = true.
      • CHANGED_SINCE_LAST_BUILD. Subjob has changes (a new revision) since last build. JOB_IS_BUILDABLE = true.
      • NOT_CHANGED_SINCE_LAST_BUILD. Subjob has no changes since last build. JOB_IS_BUILDABLE = false.
    • So now it is possible to write a condition for the job using the new variables:
      • ${JOB_IS_BUILDABLE}: if the JOB_IS_BUILDABLE == true triggers the subjob.
      • ${JOB_IS_BUILDABLE} || ${MULTIJOB_SUCCESS_COUNTER} > 0: if there exists any reason for triggering the job or the MULTIJOB_SUCCESS_COUNTER is greater than 0 then triggering the subjob. This should be useful if you have a subjob that packs artifacts generated by the previous subjobs; if the current Multijob doesn't trigger any subjob and there is no changes in the current subjob, there is no reason to trigger it.
      • "${JOB_STATE}" == "CHANGED_SINCE_LAST_BUILD": if the internal subjob state is "CHANGED_SINCE_LAST_BUILD" then trigger the subjob.

    I think it is possible adding other variables like the PREVIOUS_PHASE_STATE, I need to finished my modifications first.

    What do you think? Is that a feature that would you use it?

  66. I've been playing a lot with the Build Flow plugin to run all my tests - but passing the name of the job as a parameter to "build()" fails to work (a bug perhaps, or user error). 

    However, this lead me to Multijob plugin, nice job guys! This actually looks like it's much nicer for the dev guys to see the structure of the builds / flow and nicer for them to manage as well. 

    My only issue is I can't specify the jobs using a regex. Sure, can't do that in Build Flow, but it lets me query the API using a groovy snippet in the DSL window and then cycle through all the tests in my Test View (which is based on a regex). Well it would if the above issue didn't hinder me. 

    Is this a feature you might be adding at some stage to the job name field: The ability to specify a regex for the job names (rather than a fixed job name)? 

    1. HI Anthony,

      Please open an "enhancement" request in Jira / Github Repo and we will take a closer look @ it.

      Thanks

      HP

  67. I'm wondering how can I block downstream jobs from running manually? Not leaving them in queue, but blocking them completely. Disabling them doesn't work, because they need to be enabled for the upstream job. Thanks.

    1. What do you mean by "running manually" do you mean you do not want to enable manual triggering from the UI ?

      Sounds like an interesting use-case implementing this would mean expanding the permissions scheme enabling multijob to execute other jobs but disabling manual triggering ...

      I'll discuss this with the team to see if this is something we could consider doing.

      10x

      HP

  68. We are using Multijob plugin as trigger for our entire build pipeline ,

    Our Core build Job uses Label parameter to decide which slaves to use depending upon configuration, When this job is triggered from a multi job project, it completely ignores the label provided from multi job project.and uses any available slaves

    1. According to our code node parameter should be supported, I will take a second look.

      In general when there are issues it's good to know info like

      1. what version of the plugin are you using, I would ensure the latest ...
      2. what version of Jenkins, I would go with the LTS version

      10x

      HP

  69. I have just installed this plugin but when I am trying to create a new job the "Multijob" type is no available.

    1. I would try reloading Jenkins just in case.

  70. There is a strange bug with this plugin. When I add a job that contains a task using the plugin 

    https://wiki.jenkins-ci.org/display/JENKINS/Task+Scanner+Plugin

    MultiJob doesn't detect that the job has finished and gets stuck waiting for it to finish. However, within the console output for the job is says finished with SUCCESS

    1. Could you please open an issue ?

      10x

      1. Where? On the Jenkins Jira?

  71. Hello,

    Can anyone help with "Enable condition" feature, please. After upgrade from 1.16 to 1.17 (Jenkins 1.609.3) I can't use it anymore due to error in console output:Can't evaluate expression, false is assumed: java.lang.NullPointerException

    Reverting to 1.16 resolves this issue.
    Thanks

    1. hi I faced the same problem. 

      Can't evaluate expression, false is assumed: groovy.lang.MissingPropertyException: No such property: DEPLOY_SCENARIO for class: Script1.
      DEPLOY_SCENARIO is predefined-parameters, I used it as enable-condition: "DEPLOY_SCENARIO =~ /os-(nosdn-nofeature|nosdn-kvm|odl_l3-fdio)-ha/" is this correct?
      when I use as "${DEPLOY_SCENARIO}...." or "'${DEPLOY_SCENARIO}'...." it's not correct in grammar. how to solve this?
  72. Hi,

    We use Multi job plugin for our 20 modules project(20 jobs). Another project also configured in that jenkins. So when i build two mutli job we got dead lock situation. So we changed to (# of executors) in main configuration jenkins changed to 10(before it is 2). 

    I want to run one mutli job project, the same time other multi job not run. Can i do this?

    Thanks, Jivesh

    1. Hi JIVESH,

      In regards to the deadlock - you are right you always need to configure your number of executors accordingly - which is total number of phase jobs + 1 so if you have a multijob with 5 jobs in multi-job phase you should have a minimum of 6 executors.

      In terms of Blocking / preventing other jobs from executing the conflicting jobs, You can always use Jenkins built-in "block build when other projects are being built" feature - lookup in the configuration page.

      10x

      HP

  73. Hai,

    Is there any plugin for getting the downstream job changes log to the upstream job changes log..?

    Thanks, Titto

    1. no - but it sounds like a nice feature request ;)

      1. Thanks for it. but any other solution to do so.. other than plugins..?

        1. If you want the logs to be ass attachments to the multijob parent build you can probably use a publisher || archiver on the parent job configuration.

          In regards to having the logs in the parent jobs log it's doable but like I answered it will be come a mess to parse those logs ...

        2. If you want the logs to be ass attachments to the multijob parent build you can probably use a publisher || archiver on the parent job configuration.

          In regards to having the logs in the parent jobs log it's doable but like I answered it will be come a mess to parse those logs ...

          1. ok..thanks..but i don't want the log details, just need the changes whatever occurred in the child to be displayed in the parent job.Suppose if i have 6 sub jobs and wants to see each changes occurred in each job,now i have to go to each job and see it. rather than that if its displayed in the main job (only the changes,not the log details) it will be essay in finding the overall changes to each child in a single place. so can i hope you will be finding a solution for it. Please consider this as a new feature and build a plugin.

            1. That's what I meant by a valid feature request please open an issue and we will take a look at it and probably add it to our backlog.

              10x

              HP

  74. Hi,

         I have a multi job and five child job. Can i show the child job console in Multi job console.

    Thanks, Jivesh

      

    1. no, implementation wise think of the Multijob "parent" job as an aggregator of builds, have you ever tried to append 5 build logs into 1 ? the result is un-readable mess ...

  75. Hi,

    How can i get same build number for both upstream and downstream job in this...? Currently we are getting different build number for each of the jobs in multijob. I want it as single build no for both the jobs in multi job. Is there any plugin or other method to achieve this..? Please help me in this.

    Thanks,

    Titto. 

    1. This sounds doable by setting the BUILD_NUMBER prior to executing the job whilst I didn't check it myself.

      IMO this will cause more confusion the tidiness considering the jobs executed by the multijob usually have a life of their own in the CI context of each module / project.

      Thanks

      HP

      1. Thanks for the reply..But I wana try on it.So you got any steps for doing it as am new in jenkins. Also i made a try by using the build name setter plugin which sets a build no for the entire multi job, but the result was like different build no for each sub jobs. so please help me in this.

        Thanks

        1. I would recommend taking a look at this -> https://wiki.jenkins-ci.org/display/JENKINS/Next+Build+Number+Plugin this plugin has a cli option to set the job's next build number perhaps you can have the first job / phase in the multijob set all the build numbers to all your subjobs and then the next execution will result with build numbers you can live with ;)

          LMK how you get on.

          HP

        2. I would recommend taking a look at the NExt Build Number Plugin -> https://wiki.jenkins-ci.org/display/JENKINS/Next+Build+Number+Plugin this plugin has a cli option to set the job's next build number perhaps you can have the first job / phase in the multijob set all the build numbers to all your subjobs and then the next execution will result with build numbers you can live with ;)

          LMK how you get on.

          HP

          1. Thanks for it ..as i tried with it and its working. but main problem is that if i have 20 sub jobs, i have to set it manually for all time. ie i need to manually give the build no each time before building it and suppose a new job comes in, in between again in the middle of the build i need to set it again and the build no will be different for it. Instead of that if it can automatically set the build number for all that 20 sub jobs,considering the main job build no, then it will much more easy and nice. I hope you can help me in this...?

          2. Thanks for it ..as i tried with it and its working. but main problem is that if i have 20 sub jobs, i have to set it manually for all time. ie i need to manually give the build no each time before building it and suppose a new job comes in, in between again in the middle of the build i need to set it again and the build no will be different for it. Instead of that if it can automatically set the build number for all that 20 sub jobs,considering the main job build no, then it will much more easy and nice.

      2. Thanks for the reply..But I wana try on it.So you got any steps for doing it as am new in jenkins. Also i made a try by using the build name setter plugin which sets a build no for the entire multi job, but the result was like different build no for each sub jobs. so please help me in this.

        Thanks

  76. Hello,

    I have a Multijob task that launchees the same sub-job twice, with different NodeLabel parameters.

    When clicking on the console output for both jobs, it shows me the node output for the last time it was launched in both cases. Expected behavior would be that it displays the output for the specific build.

    1. Sounds right, could you please open a bug /issue @ issues.jenkins-ci.org

  77. I am using multiple SCM plugin for creating different workspace for different repositories, successfully am able to build it and can see the changes occurred.But the problem is that we cannot tag that when we push. Is there any possible way to tag it..?

  78. Hi,

       I have a Multi job and 10 child job. First 9 child job will clone git repo and tagging into repo and 10th job is for deployment.

       My requirement is i want to append all changes of 9 job and show in 10th deployment job.

       Any suggestion is appreciated.

    Thanks

    Jivesh

  79. It would be really really nice if this plugin allowed for the build to pause after a certain phase waiting for manual promotion/resume. This would allow for phases requiring manual deployments to be included in the multijob. Unfortunately, we are having to use the promoted builds plugin in the multijob to trigger another job for deployment of the application. Unfortunately, this means the deployment job and post deployment jobs are missing from the pipeline and is not represented in the pipeline or in the multijob phases. The workflow plugin already allows for a phase to pause and for it to resume following manual input.

  80. I think there is a bug in release 1.19, the jobs that are configured in the MultiJob fails with a "HTTP authorization" error.

    When I downgraded to 1.18 the issue was resolved.

  81. In 1.19 there is also a problem with "build without any SCM change", meaning that sub-jobs which do not use SCM polling as a trigger will not start because the system thinks the parameter is used.

    Building on master in workspace C:\Program Files (x86)\Jenkins\workspace\COMBO.AllHours

    Polling SCM changes on SW-Fintnesss

        >> Job status: [Test_AH.Basic_Settings] subjob has no changes since last build. 

    When I downgraded back to 1.18, the issue was gone.

    Polling SCM changes on SW-Fintnesss
        >> Job status: [Test_AH.Basic_Settings] subjob has no changes since last build. 
    Polling SCM changes on SW-Fintnesss
     

  82. I am having issues with, starting with a multijob and triggering downstream jobs with node name parameter.

    To recreate the issue, I created simple jobs with just "Trigger/Call builds on other projects" in them. My sequence looks like this,
    DummyMultiJob(nodename:rhel6x) > DummyJob1(nodename:rhel6x) > DummyJob2(nodename:db2) > DummyJob3

    So DummyMultiJob, DummyJob1 are expected to get executed on my linux nodes and DummyJob2 on my DB2 node.
    When I run DummyMultiJob, I can see in DummyJob2 that nodelable parameter is getting set properly
    define: [LabelParameterValue: NODELABEL_FOR_DB2=db2]

    But in DummyJob3 I see that its getting executed on a node with label rhel6x than db2 !

    This happens only if i have a chain starting with multijob. If I remove that and try with freestyle jobs, it picks up my db2 node and works fine.
    Could you please let me know whether this is a bug ?

    If yes, as an alternative, I am now thinking of writing a freestyle job and writing groovy code to invoke all my jobs based on various conditions.

    Please let me know if there is any other alternative.

    1. @amiith I didn't understand the use case completly is DummyJob2 triggering DummyJob3 on it's own meaning out of the multijob context ? or is DummyJob3 invoked via multijob.

      If it's via multijob this looks like a bug and we will take a look at it.

      LMK.

  83. @Haggai,

    Thanks for your response.

    I realized what is happening today.

    In the sequence,
    DummyMultiJob > DummyJob1(nodename:rhel6x) > DummyJob2(nodename:db2)

    While triggering each job, I add current build parameters and node label parameter.

    So I start with DummyMultiJob and while calling DummyJob1, I pass on both current build parameters and node label parameter with its value set to rhel6x
    When it comes to DummyJob1, if I check the build parameters, it has got [LabelParameterValue: rhel6x], which is fine.

    Now DummyJob1 triggers DummyJob2 and passes current build parameters and node label value set to db2
    If I check the build parameters of DummyJob2 now, I see that it has got [LabelParameterValue: rhel6x][LabelParameterValue: db2] !
    As you can see, label parameter has been set to db2, but there was this labelparametervalue which I guess came from current build parameters which is set to rhel6x. Now DummyJob2 picks up rhel6x and happily proceeds further though it was asked to execute on db2 node.

    So this has to do with node label parameter plugin and nothing to do with multijob plugin I feel. I will try posting this comment in node label parameter plugin page.

    Thanks again.

  84. The Version history is not up to date.  Version 1.19 introduced a serious problem (and was never documented), version 1.20 is believed to have fixed that problem, but is also undocumented.

    1. You are quite right I will be updating it sometime tomorrow, considering 1.20 was a quick fix for the SCM change regression I didn't get the chance to update the wiki yet - my bad :( 

  85. I am having issues getting the Build component for the multijob phase to show up in my options.  We are using Jenkins ver. 1.609.1.1 (CloudBees Jenkins Enterprise 15.05).  I have restarted Jenkins several times to try and get it to pick up.  Jenkins runs on a Windows 2012 server.

    1. HI, well I am not sure I've tested the plugin with 1.609.1.1 or the CloudBees Jenkins Enterprise edition, It don't see a reason why it should ... 

      Our pom is tested on 1.565.1 (Hint to self - update !), in any case I am going to check now against 1.638 which is the Latest release version - will update when done.

      would appreciate a JIRA ...

      1. Was there any progress on identifying a possible cause of this?  I was not able to get logged in to Jira to create the issue however.

      2. ok i was able to get logged in to JIRA and created the issue as JENKINS-31984.

  86. Can I configure multi-job phase to trigger job on remote Jenkins server?

    I can do that using "Trigger a remote parameterized  job" plugin but how can I configure multi-job plugin to achieve same thing?

  87. Is there a way to collect "parameters" from one job (in one phase) to transmit it to another job (in the next phase)

    My use case is :

    • Build phase (build the app's components)
    • Instanciate VM phase (build a new VM to deploy app)
    • Deploy apps phase

    I'd like to transmit the IP (of the newly created VM) from the Instanciate phase to the deploy phase
    Nice plugin thanks

  88. I have following situation. We deploy automatically chained jobs to several Jenkins instances by updating the Jenkins configuration. Now we would like to extend the current configuration with the MultiJob Plugin to reuse the existing jobs. If the jobs were included in multi job phases the underlying job chain is executed as well, e.g.

    Native Job Chaining

    Job1 -> Job2 -> Job3

    Multi Job Phase

    Job1

    If the multi job is triggered, the job1 is executed and all downstream jobs (jobs 2 and 3) were executed because of the underlying chaining. We have no choice to put the existing job in multi jobs.

    Is there a way to suppress the native job chaining in multi jobs?

    1. From what you are describing this is related to the trigger other jobs configured in job1 it isn't related to MultiJob in any way.

      What you could do is provide a pull request which supresses the execution of the job configured as post build actions in job 1, but IMO this would look like "black magic" which will be hard to understand why - but by all means you can add this logic to the plugin.

      10x

      HP 

      1. Thanks for your answer, this is highly appreciated. I already thought so but wanted to ask anyways.

  89. Is there way to have the parent upstream job succeed even if a "child" job fails?

    E.g. I have a MultiJob M, with A, B, C as phase jobs (can be in 1 phase or several).

    I want M to fail if A or B fail; but I don't care much about C - if it fails, I still want M to pass.

  90. We have set up a Jenkins instance as a remote testing resource for our developers. Every time a tag is created matching our refspec a job is triggered and the results emailed to the developer.

    A job is defined as follows:

    1. 1 phase consisting of three jobs (frontend tests, integration tests, unit tests)
    2. All subjobs are executed, irrespective of success
    3. Email the developer the test results

    This setup mostly works except for two issues:

    1. I cannot get the job to run in parallel. The subjobs run in parallel, but only one instance of the job runs at a time. Is this something I can configure differently somewhere, or is this inherent in the way the plugin works?
    2. The main job checks out and occupies one of our build servers for the duration of the job. Is there a way to do git polling and then just grab the hashref and release the build server on which the polling was done before continuing building the subjobs?

    Does anyone have any ideas here?

  91. How exactly does "Resume build" work? Or at least it's intended use?

    Based on our usage, so far it's just exactly like "Rebuild Last" (plugin).

  92. Hi,

    I guess the MultiJob plugin doesn't yet work with Jenkins 2 ? I tried upgrading to Jenkins 2.3 and all my Multijob jobs were broken. Just wondering, all you planning on supporting it in the future?

    Thnx

    Chris

    1. MultiJob plugin v1.22 seems to cause jobs to NPE with a  JellyTagException when clicking into display the job. I don't have a stack trace as I had to quickly restore back to v1.21. 

  93. Can anyone please help me here. Its urgent for me.

    I am using multi job plogin. In two phases

    Phase 1

       job 1

    phone 2

      job 2

    I want to pass some variables from job 1 to job 2. 

    Both job1 and job2 runs on different set of VMs

    Both job1 and job2 runs multiple concurrent jobs in different different VMs

    Is it possible? How can I achieve it?

    In the top job, I am using, "parameters from property files"

    Somehow the values are not coming up in job2

    1. Are the parameters coming from job1 -> job2 new? Or does the parent know about them already?

      If job1 is outputting the params to a file that the call to job2 is using, are they working in correct workspace path?

  94. Is it intentional that jobs in a sequential phase are executed in random order? I would expect job1 to be executed and then job2

    Here I have a phase with two jobs xx_test1 and xx_test2 where I would expect 1 to be executed before 2 every time. The following two examples shows that the are executed in random order.
    12:12:35 Building remotely on n6-ws18 (host_plot centos5_64 host_linux host_test 64bit) in workspace /var/jenkins/jenkinsRemote/workspace/xx_test_parent
    12:12:35 >> Job status: xx_test2 the 'build only if scm changes' feature is disabled.
    12:12:35 Starting build job xx_test2.
    12:12:35 >> Job status: xx_test1 the 'build only if scm changes' feature is disabled.
    12:12:35 Starting build job xx_test1.
    12:13:07 Finished Build : #2 of Job : xx_test2 with status : SUCCESS
    12:13:37 Finished Build : #2 of Job : xx_test1 with status : SUCCESS

    12:16:26 EnvInject - Loading node environment variables.
    12:16:26 Building remotely on ... xx_test_parent
    12:16:26 >> Job status: xx_test1 the 'build only if scm changes' feature is disabled.
    12:16:26 Starting build job xx_test1.
    12:16:26 >> Job status: xx_test2 the 'build only if scm changes' feature is disabled.
    12:16:26 Starting build job xx_test2.
    12:16:58 Finished Build : #3 of Job : xx_test1 with status : SUCCESS
    12:17:28 Finished Build : #3 of Job : xx_test2 with status : SUCCESS

  95. just wondering if there's any example of retry strategy rule file? Getting not much from the tips on Jenkins general config page where you can add the rules :/

    1. Nate,
      I found only two examples, and there are confusing:

      - https://groups.google.com/forum/#\!topic/jenkinsci-users/0XPryrdYRDg suggests   'Finished: FAILURE', and this works for me. But the same with "Finished: UNSTABLE" doesn't work

      - Helpfile says: "Example for matching any failure :  .*" - doesn't work for me

  96. Hi,

    I have a requirement related with multi job. I have 40 child job phase. Sometimes only two phases will have to build. So currently we have an option to disable checkbox in multijob configuration. But it is not possible check this option all the time, it's time consuming and configuration will fail sometimes. Can you provide checkbox option of every job in interface or select all checkbox option in mutlijob interface.

  97. Hi,

    I had a requirement for executing jobs in parallel and came across this plugin.

    After going through documentation, i created phases and gave job names. But where do i create job basically.I mean the script ,build step and post build step for job.

    Thanks,

    VVP

  98. I like the concept of building only when SCM changes. But I don't always want to build the master branch. When I enable this feature, it appears that MultiJob is checking only the master branch for changes. Is there a way to specify the branch I want to test?

  99. Is it possible for a job to determine if it was started by a multi-job or independently?

  100. Hi!  First of all, nice plugin!

    Bug: When using the same job in more than one phase, all same jobs run at the same time, even if the job of each phase are configured to be sequentially.  Feature request: Can we have a field like description for each job, this way when using the same job in more than one place, we will have the description instead of just the jobname?

      

    Thank you so much in advance

     

    Please use this very simple example to reproduce it : config.xml

    Thank you!

    1. I would also like to see the build description printed under the job name once a job finishes in the phase.

  101. starting somewhere from 1.26 I got tons of unreadable data exceptions

    ConversionException: Could not call com.tikal.jenkins.plugins.multijob.MultiJobParametersAction.readResolve()

     

    can you please fix?

    1. Please upgrade to 1.28

      1. thanks, looks like the defect is foxed!

        May be you wanna close  JENKINS-45552 - Getting issue details... STATUS  ?

  102. Is there a variable which we can consume/target which exposes which iteration of a 'retry' condition? 

    For Example, I have a job which I run in parallel on 5 different systems. OCCASIONALLY one scenario fails due to (stupid reason), I am currently immediately logging a defect due to said (stupid reason). When the job runs the second time it generally passes. I would like to stop this behavior. If the job doesn't pass the second time the job runs (when it retries) then I would only then like to log a defect then, but not on the first try. 

    Is this possible? 

    1. I should likely add that I'd like to be able to pass the retry iteration parameter to the child job. The logic to create the defect or not will reside there. 

      1. Hi Andrew,

        The plugin doesn't expose such variable.

        According to your use-case, why can't you add the bug creation logic after the second fail attempt?

        Perhaps your job can expose/populate a variable that can be consumed later.

        1. Hey Chen, 

          Yeah this is the road I'll likely go down; I'm already making use of temporary files in the workspace for global variables for various other purposes; it's just a matter of figuring out the logistics of it. Having an already exposed variable would have just saved some work is all. 

  103. Hi!  I didn't received any feedback against the bug with the same job reused.

    Bug: When using the same job in more than one phase, all same jobs run at the same time, even if the job of each phase are configured to be sequentially.  Feature request: Can we have a field like description for each job, this way when using the same job in more than one place, we will have the description instead of just the jobname?

      

    Thank you so much in advance

     

    Please use this very simple example to reproduce it : config.xml

    If you need more information, please reply.

    Thank you!

  104. I have configured 3 job in same phase with this plugin, configured "Running phase job in parallel"

    but it is not running parallel (it is running sequentially)

    is there any configuration missing ?

    or any other solution?

    1. Hi,

      There's no special configuration needed, your configuration should be working as is.

      Can you please share you config.xml for further investigation?

      Thanks,

      Chen

      1. Thanks for reply,

        I have attached my config.xml

         config.xml

        1. I meant your job config.xml, this is Jenkins'

          1. Oh ok 

            I have attached my job's config, please check now

            config.xml

            1. from this statement

              All jobs that belong to one phase will be executed in parallel (if there are enough executors on the node)


              do I need to configure something for "executors on the node" ?

              1. Of course you do, and this most probably the issue because your job configuration is correct.

                Make sure your node's executors number >= parallel jobs

                To do that check your node configuration for '# of executors' field.

                1. Its working now great thanks

                  I just increased nodes from 2 to >> 10

                  from 

                  Manage Jenkins > Nodes > (each node) > Configure > # of executors

                  1. Thank you Jayesh and Chen. This helped a lot.

  105. Hi,

    I'm polling SCM and try to use it as a build trigger for a Job defined in a MultiJob Phase. For the job 'Build only if SCM changes' is activated but it is never build also if there are changes in the SCM- What I'm doing wrong? Any hints?

    • Jenkins ver. 2.98
    • Multijob plugin 1.28

    Best regards,
    Günter

    1. Hi Vili, version 1.29 is now released.

  106. Hi,

    I have multjob setup which call another multijob which calls regular jobs. It all showing nice in the UI, yet when root multijob get aborted, the sub jobs inside the sub-multijob are not being canceled. Is this intended? how can I get over it?

    Thanks!

    1. Hi Yaron, this is the current behaviour and abort command is not delegated to inner multijob / job.

  107. Hi,

    I have the same problem as Gaurav Negi, (post of 2016-09-15).

    I have 2 phases, and want to pass parameters between jobs in each phase, so

        Phase 1

            job A → set Parameter PAR=value

        Phase 2

            job B → parametrized build, expects parameter PAR

    In the multijob phase 1, on the job A configuration, I added a "Predefined parameters" set, where I set PAR=value

    But this value is not propagated to job B.

     

    Can anyone please tell me how this could work? I think passing around parameter files is very clumsy, so any other approach would be highly appreciated!

    Thank you!

Write a comment…