Job Configuration

15 views
Skip to first unread message

Krishna Vishal Rekala

unread,
Sep 16, 2011, 1:12:09 PM9/16/11
to jenkins...@googlegroups.com, jenkinsc...@googlegroups.com, ravi.b...@gmail.com
Hi All,

Is there a way in Jenkins to run a particular job after its dependencies are built first.

For example: I have jobs - Job1, Job2 and Job3.  Job1 should be built only after Job2 and Job3 are built.
In other words, I want to add Job2 and 3 as dependencies for Job1 and just want to trigger Job1 this should first build Job2 and 3(should force Job2 and 3 to build first), then execute Job1.

Thanks,
Vishal

Jesse Farinacci

unread,
Sep 16, 2011, 2:08:36 PM9/16/11
to jenkins...@googlegroups.com
Greetings,

On Fri, Sep 16, 2011 at 1:12 PM, Krishna Vishal Rekala
<vishal...@gmail.com> wrote:
> In other words, I want to add Job2 and 3 as dependencies for Job1 and just
> want to trigger Job1 this should first build Job2 and 3(should force Job2
> and 3 to build first), then execute Job1.

[x] Build other projects

-Jesse

--
There are 10 types of people in this world, those
that can read binary and those that can not.

screenshot.jpg

Krishna Vishal Rekala

unread,
Sep 16, 2011, 3:21:32 PM9/16/11
to jenkins...@googlegroups.com, jie...@gmail.com, ravi.b...@gmail.com
Thanks jesse for the replying to my email. 
When it says "Trigger builds of the other projects once a build is successfully completed"  Is it going to trigger the builds for other projects which are defined here as soon as the build for current job is successful?

Lets say if I configured Job2 and 3 here in Build other projects section for Job1.  Will Jenkins trigger Job2 and 3 as soon as Job1 is finished building?  If that is the case, then that is not which I am looking for. 

Whenever Job1 is triggered, it should first force Job2 and 3 to build before it actually starts building job1.

-Vishal 

Christoph Vogtländer

unread,
Sep 18, 2011, 4:45:15 PM9/18/11
to jenkins...@googlegroups.com
Hallo,

On Friday 16 September 2011 12:21:32 Krishna Vishal Rekala wrote:
> Thanks jesse for the replying to my email.
> When it says "Trigger builds of the other projects once a build is
> successfully completed" Is it going to trigger the builds for other
> projects which are defined here as soon as the build for current job is
> successful?
>
> Lets say if I configured Job2 and 3 here in Build other projects section for
> Job1. Will Jenkins trigger Job2 and 3 as soon as Job1 is finished
> building? If that is the case, then that is not which I am looking for.
>
> Whenever Job1 is triggered, it should first force Job2 and 3 to build before
> it actually starts building job1.

At least in a free style project it is possible to add a build step
"Trigger/call builds on other projects". I think this is a standard feature
and not provided by a plug in.


--
Christoph

Michael Pisula

unread,
Sep 19, 2011, 3:01:58 AM9/19/11
to Jenkins Users
Hi Krishna,

I am not aware of a plugin that lets you configure the jobs like you
describe here.
What is possible is to use the Join Plugin, and define a Job 4. This
Job 4 will only trigger Job 2 and Job 3 and you the Join Plugin to
trigger Job 1 once both Job 2 and Job 3 were build. Take a look at the
wiki page for the Join Plugin, this might work you.

Cheers,
Michael

On 16 Sep., 19:12, Krishna Vishal Rekala <vishalrek...@gmail.com>
wrote:

Krishna Vishal Rekala

unread,
Sep 19, 2011, 8:23:03 PM9/19/11
to jenkins...@googlegroups.com
Christoph,

I have chosen a free-style project and I don't see any Build step as you specified.  Please see the screenshot attached.

-Vishal
buildstep.jpg

Christoph Vogtländer

unread,
Sep 20, 2011, 5:03:50 PM9/20/11
to jenkins...@googlegroups.com
Vishal,

On Monday 19 September 2011 17:23:03 Krishna Vishal Rekala wrote:
> I have chosen a free-style project and I don't see any Build step as you
> specified. Please see the screenshot attached.


hah, found it. The feature is provided by the "Parameterized Trigger Plugin".
From the docu:
"...
This triggering mechanism can be used both as a post-build step or as a build
step, in which case you can also block for the completion of the triggered
builds. This lets you create a "function call" like semantics.
.."

https://wiki.jenkins-ci.org/display/JENKINS/Parameterized+Trigger+Plugin

Hope this will do the job for you.
--
Christoph

trigger.png
Reply all
Reply to author
Forward
0 new messages