Select several jobs to be build from existing job

14 views
Skip to first unread message

ibrahim deek

unread,
Dec 19, 2013, 4:11:16 AM12/19/13
to jenkins...@googlegroups.com
Hi,

I would like to create a general job, and in this job I want to select the projects I want to run.
I know we can use build other projects in "Post-build Actions", but I want to select the jobs to run, something like list.

anyone can help please?

Regards,
Ibrahim

Steven Deal

unread,
Dec 19, 2013, 9:03:38 AM12/19/13
to jenkins...@googlegroups.com
I'm not sure I understand the end goal; but, conceptually your first job could be parameterized and present the user a drop down list to select which job to run, that choice possibly could be used in the 'trigger calls on other projects'/'post build actions' or what have you.

Robert CHAVANNE

unread,
Dec 19, 2013, 11:03:31 AM12/19/13
to jenkins...@googlegroups.com
ibrahim deek <ibrahim.deek <at> gmail.com> writes:

>
>
> Hi,I would like to create a general job, and in this job I want to select
the projects I want to run.I know we can use build other projects in
"Post-build Actions", but I want to select the jobs to run, something like
list.anyone can help please?Regards,Ibrahim
>
>
>
>


Hi ibrahim, to do that you need to create a parametrized job A with "Choice"
parameter named projectToBeRun.
In Choices you put all the job of your list.
Then as build step you choose "trigger/call build on other project", in
"Projects to build" you put ${projectToBeRun}.
Then when you will run A, you will have to choose the project to be run.

Hope it can help.


ibrahim deek

unread,
Dec 20, 2013, 8:22:34 AM12/20/13
to jenkins...@googlegroups.com, robert....@gmail.com
Thanks Steven and Robert. I tried the solution you have mentioned and it works fine.
But here I can chose only one job, and I want to select several jobs/projects to build not only one, could you help in that?

I appreciate your help.

Regards,
Ibrahim

Steven Deal

unread,
Dec 20, 2013, 8:57:47 AM12/20/13
to jenkins...@googlegroups.com
I'm not sure. One thing I would keep in mind is not to loose sight of automation. Normally, jobs are kicked off based on code changing in a repository or a upstream dependency. Jenkins is incredibly flexible, to the point of abuse (I'm guilty). There is nothing you can't do; in this example, I think you could make each of these jobs a boolean choice and when you kick off the job you are trying to create, you uncheck or check what you want to run. But again, I'd have to ask is this really what you want to do?
hth,
steven 


--
You received this message because you are subscribed to a topic in the Google Groups "Jenkins Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/jenkinsci-users/bbKHpolUtUE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to jenkinsci-use...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Mark Kendzior

unread,
Dec 22, 2013, 3:20:22 PM12/22/13
to jenkins...@googlegroups.com
You could create multiple parameters as suggested above for the number of jobs that you would like to run.  ie ${projectToBeRun}, ${projectToBeRun1}, ${projectToBeRun2}

mark
Reply all
Reply to author
Forward
0 new messages