[jenkins] Looking for advice in how to setup a project

52 views
Skip to first unread message

Don deJuan

unread,
Jan 24, 2015, 3:25:09 PM1/24/15
to jenkins...@googlegroups.com
Looking for some advice in setting up a project. The main issue I see is
the project I need to build has thousands of directories in which any
one of them could be built. I have no control to put everything into
individual repos, nor do I really feel like maintaining that many single
ones. So how we are telling which should be built are with flags in the
git log. I can setup a freestyle project and with the exec shell I can
get it to cd into the proper dir and run the build. So I have grasped
that much so far, I think. The main issue I am running into now is I am
not sure if freestyle is really the best choice for my scenario. Each
build has to be built in up to 7 different environments, inside the
specified directory. I have the slaves all setup for those and I am able
to connect to each with the freestyle project. But is there a way from
the exec shell to actually trigger a build on a slave from the main exec
shell depending on what the bash test gets from the git log? Such as the
test says it needs to build only on env 1 3 6 and it triggers a slave to
build and to cd into proper dir and run the build commands. If this is
possible do these launched slaves stay with the same build number or
would it be a new one? Or am I better of setting up something like a
matrix project where each of these envs are triggered at once, then they
each test if they should actually build or not. Any advice or
recommendations is appreciated. Thanks for your time. If I am missing
anything in my explanation that could help let me know and I will reply
with the needed info.

Stephen Connolly

unread,
Jan 25, 2015, 11:48:15 AM1/25/15
to jenkins...@googlegroups.com
Something this complex sounds like a job for the workflow plugin and job type
--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/54C3FF9B.7000203%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


--
Sent from my phone

Don deJuan

unread,
Jan 26, 2015, 12:44:50 PM1/26/15
to jenkins...@googlegroups.com
On 01/25/2015 08:48 AM, Stephen Connolly wrote:
Something this complex sounds like a job for the workflow plugin and job type

SNIP .....

OK thanks I will look into that. Open to any other advice or suggestions.

Les Mikesell

unread,
Jan 26, 2015, 1:37:27 PM1/26/15
to jenkinsci-users
It's not clear to me from your post what actually determines what you
need to build. You need to understand that and then figure out
whether jenkins can find it internally or if you need some external
wrapper to kick off paramaterized builds of some sort.

--
Les Mikesell
lesmi...@gmail.com

Don deJuan

unread,
Jan 26, 2015, 1:42:34 PM1/26/15
to jenkins...@googlegroups.com
It is part of the commit message in git. There is a script that parses
the git log in post-receive that defines what needs to be built and what
envs it should be built in.

Les Mikesell

unread,
Jan 26, 2015, 2:15:20 PM1/26/15
to jenkinsci-users
On Mon, Jan 26, 2015 at 12:42 PM, Don deJuan <donju...@gmail.com> wrote:
> >>> Something this complex sounds like a job for the workflow plugin and job
>>> type
>>>
>>> SNIP .....
>>>
>>>
>>> OK thanks I will look into that. Open to any other advice or suggestions.
>> It's not clear to me from your post what actually determines what you
>> need to build. You need to understand that and then figure out
>> whether jenkins can find it internally or if you need some external
>> wrapper to kick off paramaterized builds of some sort.
>>
> It is part of the commit message in git. There is a script that parses
> the git log in post-receive that defines what needs to be built and what
> envs it should be built in.


If you can map that into job parameters you should be able to trigger
individual jobs using
https://wiki.jenkins-ci.org/display/JENKINS/NodeLabel+Parameter+Plugin
to control where each job runs, or use a matrix job where you kick off
a groovy or Xshell script (for cross platform compatibility) and the
script figures out what, if anything, it needs to do. The matrix
approach might make sense if most of the builds require multiple nodes
and you like the resulting artifact tree layout on the job page. And
the workflow or build_flow can handle more complex options if you need
them.

--
Les Mikesell
lesmi...@gmail.com

Don deJuan

unread,
Jan 26, 2015, 2:29:10 PM1/26/15
to jenkins...@googlegroups.com
Ahh nice thanks for that.. I think things are becoming much more clear
for me.

Stephen Connolly

unread,
Jan 26, 2015, 3:38:03 PM1/26/15
to jenkins...@googlegroups.com
Or your workflow script could parse the log and fork off the bits that are needed on each node that is needed.

Workflow is the way of the future for complex jobs like this
--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages