Your requirements to have each library build in a separate job and it all 
sit in the same workspace are rather at odds with each other, even without 
using Pipeline.  What you describe sounds more like a multijob project, 
which would then pull artefacts out of each of the library jobs for the 
overall build.

You could maybe have a separate job for each component (to build & run 
tests for just that component), and a single job which builds each 
component in a separate stage?

Your project structure really pushes towards having a single job to build 
the lot, it that's not ideal maybe consider if the project structure makes 
sense?

On Sunday, 4 February 2018 04:09:09 UTC, [email protected] wrote:
>
> I would be grateful for advice on how to set up CI for a project with the 
> following requirements:
>
>     C++ codebase with CMake as the build system
>     Let's say 10 separate software components each with their own 
> CMakeLists.txt and in their own git repo.
>     The components depend on each other
>     There's a top-level CMakeLists.txt via which any of the software 
> components can be built (CMake will resolve the dependencies)
>
>
> So the folder structure is like this:
>
>
> src/
>
> -- top_level_build_scripts/
>
> ---- .git
>
> ---- CMakeLists.txt
>
> ---- Jenkinsfile
>
>
> -- mylib1/
>
> ---- .git
>
> ---- CMakeLists.txt
>
> ---- Jenkinsfile
>
>
> -- mylib2/
>
> ---- .git
>
> ---- CMakeLists.txt
>
> ---- Jenkinsfile
>
>
> etc.
>
> I would like to do this with modern Jenkins practices, so Pipeline and 
> with Jenkinsfile. What's important is that in Jenkins there should be 
> listed 11 jobs: the 10 components each with their "Last Successful", "Last 
> Failed", Weather, etc. And the first job "Build Whole Project" which 
> should  build each component first to last.
>
> I've gotten as far as in the top_level_build_scripts/Jenkinsfile I add 
> `build job: 'mylib1', wait: false`, which does manage to start the next 
> job, but sadly the "mylib1" job creates  a new workspace in a separate 
> directory, so the folder structure for the 
> top_level_build_scripts/CMakeLists.txt is invalid. For it to work the 
> folder structure must be as I drew above. Am I on the right track? Or 
> totally wrong approach?
>
>

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/d8673f50-bf94-4d35-9246-6192f0022964%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to