Build Flow Plugin - Dynamic Job Invocation

34 views
Skip to first unread message

Zile Rehman

unread,
Apr 22, 2015, 11:08:22 AM4/22/15
to jenkins...@googlegroups.com
I am trying to use the Build Flow Plugin (https://wiki.jenkins-ci.org/display/JENKINS/Build+Flow+Plugin) to dynamically define a parallel build job.

In my main script, I am dynamically defining a playCompBuilderList. Then I iterate through through the list and trigger the build for each item, as shown below.. My question is, how do I wrap it up in parallel statement to trigger the builds in parallel?


playCompBuilderList.each {
        it.each {
            comp, map -> build('play_comp_builder',
                                COMP            : map['comp'],
                                COMP_TAG        : map['comp_tag'],
                                CORUS_TAG       : map['corus_tag'],
                                DRAGONBALL_TAG  : map['dragonball_tag'],
                                PLAY_VERSION    : map['play_version'])
        }
}

This is a sample playCompBuilderList ==> [
    {
        "athena": {
            "comp": "athena",
            "comp_tag": "develop",
            "corus_tag": "develop",
            "dragonball_tag": "master",
            "play_version": "2.3.6"
        }
    },
    {
        "atlas": {
            "comp": "atlas",
            "comp_tag": "develop",
            "corus_tag": "develop",
            "dragonball_tag": "master",
            "play_version": "2.3.6"
        }
    }
]




I tried something like this but didn’t work:

parallel (
  playCompBuilderList.each {
        it.each {
            comp, map -> build('play_comp_builder',
                                COMP            : map['comp'],
                                COMP_TAG        : map['comp_tag'],
                                CORUS_TAG       : map['corus_tag'],
                                DRAGONBALL_TAG  : map['dragonball_tag'],
                                PLAY_VERSION    : map['play_version'])
        }
  }
)

Please help! Thanks.

Venkata Amirineni

unread,
Apr 7, 2016, 9:54:03 AM4/7/16
to Jenkins Users
did you figure out a solution?
Reply all
Reply to author
Forward
0 new messages