3
votes

I am currently working on C++ project which uses 3 external libraries Boost, LibPNG and blaze. I can compile and run my code on my local machine. i want to use Jenkins for continuous integration. Can someone please guide me how to do it? I am confused about the external libraries. I have these installed on local machine. The server machine on which Jenkins will running does not have it. How should i go about it ? Thanks in advance

1
If there is something better than Jenkins for C++ projects. I am open to use itDhruvin Naik
How about installing the 3 libs on the Jenkins server? Either you regard them as part of your project (then compile them together with your project) or as prerequisites. In the latter case you need to make sure that the host compiling your project (e.g. Jenkins) has them installed.pitseeker

1 Answers

2
votes

One way could be to install the dependencies on the server. But if you need different versions it gets a bit messy and cannot be a solution in the long run. If you need different versions for different builds, it gets complicated and is very error prone.

A cleaner way: I would suggest a container system like docker. Then you can encapsulate the build dependencies for each project and even for each branch. Building a container is not much of an overhead. Docker and Jenkins work smoothly together. Only drawback imho, docker needs to be installed on the Jenkins. But this can be avoided by having a VM as jenkins node which handles all docker pipelines.