Sandboxed Maven builds on Jenkins

134 views
Skip to first unread message

Jozo Vilcek

unread,
Apr 16, 2015, 4:56:03 PM4/16/15
to jenkins...@googlegroups.com
I have asked this question on stack overflow:

Any help is much appreciated!

Brent Atkinson

unread,
Apr 16, 2015, 5:00:31 PM4/16/15
to jenkins...@googlegroups.com
Hi,

I may be missing something, but is there a reason you aren't just provisioning VMs or containers and using normal maven builds using agents?

Brent 

--
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/b0f048f9-90a6-4237-84d0-caae29fec7a7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Jozef Vilcek

unread,
Apr 16, 2015, 5:26:57 PM4/16/15
to jenkins...@googlegroups.com
Hi Brent,

I am not sure. I am not familiar with Jenkins very well, therefore, most likely, I am missing something :)
Can you elaborate or point me to some documentation?
What do you mean by "containers"? With quick search, I have found a section about distributed builds and slave setup. Do you refres to that whne you talk about agents?

Jozo

--
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/ZISjWJ48VNY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CALyHw0GGpxgA_aoH2zYPbkpWcJkLGqTdhbKP%3D45VKCbkFmQQMQ%40mail.gmail.com.

Brent Atkinson

unread,
Apr 16, 2015, 5:34:02 PM4/16/15
to jenkins...@googlegroups.com
Hi Jozo,

Yes, I was using the less incendiary term for the distributed build agents (or slaves), so you found the right docs.

"Container" was referring to something like, but not necessarily Docker containers. 

When you use agents, you are typically do it to:

  * unload the load from the build master
  * need to build on different operating system or architecture from the master
  * need to build in an isolated or preconfigured environment different from the master

That last one would seem to align with your question, unless there's a reason you didn't want to use distributed builds.

Hope that helps,

Brent

Jozef Vilcek

unread,
Apr 16, 2015, 5:52:00 PM4/16/15
to jenkins...@googlegroups.com
Actually, Jenkins build environment I use does distributed builds (I do not manage this). I have a feeling that agent setup is rather static. Projects I need to build have native dependencies, which can change a lot. There are many projects, they share build cluster and there dependencies can be often in conflict.

Can I do something like:
* setup an agent with desired OS and basic setup (libraries)
* project X build gets triggered
* project is assigned to the agent
* pre-build step is executed, which takes from workspace file list of libraries specific to project X and install them
* maven build is executed -> everything is green
* cleanup
* ...
* project Y build gets triggered
* by chance, it is assigned to the same agent
* there is no trace of any library installed by project X
* pre-build step installs libraries specific to project Y
* ... etc 

--
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/ZISjWJ48VNY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to jenkinsci-use...@googlegroups.com.

Brent Atkinson

unread,
Apr 16, 2015, 6:04:43 PM4/16/15
to jenkins...@googlegroups.com
Hi Jozo,

Yes, you should be able to do something like that. However, your feeling isn't quite right: it is fairly common for people to provision hosts and tear-down them down part of the build. One reason this is advantageous is that your "cleanup" can fail and then your build environment is corrupt and builds start failing (or worse, don't fail but yield bad output silently). 

Just as an example, here's a group doing it with Vagrant and VMs: http://pivotallabs.com/spinning-useful-vms-quickly-vagrant-puppet-puppet-forge/

Brent

--
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/CAOUjMkwvAoOYTEt8s9d7rKu_GHMurugSHWsQV%3DfFtmZmfbra%3Dw%40mail.gmail.com.

Jozef Vilcek

unread,
Apr 16, 2015, 6:14:37 PM4/16/15
to jenkins...@googlegroups.com
Brent,

Thanks for the lead. I will dig into it. It seems there is a light at the end of my tunnel :)
Thanks a lot!

Jozo

Reply all
Reply to author
Forward
0 new messages