Integrating CMake, Jenkins, and JIRA for multi-project CI pipeline?

Hey folks, I’m trying to set up a CI system for our Linux-based projects. We’ve got about 50-100 apps and 15-20 libs, all interconnected. I’ve started using CMake for builds, but I’m not sure if I’m doing it right.

I’ve installed the libs to /usr/local/include and /usr/local/lib. Is this okay? Or should I be using CMake’s export interface or ExternalProject_Add?

I’m also looking at Jenkins for CI and JIRA for issue tracking. But I’m worried about how Jenkins will handle building projects that depend on each other.

Has anyone tackled a similar setup? Any tips on making this work smoothly? I’m especially interested in how to manage dependencies between projects in the CI pipeline.

Here’s a simplified version of our project structure:

/apps
  /app1
  /app2
/libs
  /lib1
  /lib2
/include

Thanks for any advice!

From my experience, managing a large number of interconnected projects can be challenging. For CMake, I’d suggest using the find_package() command to locate and link dependencies, rather than installing them system-wide. This approach provides better isolation and version control.

In Jenkins, you might want to explore the concept of ‘pipelines as code’ using Jenkinsfile. This allows you to define build steps, tests, and deployments in a script that lives with your source code. For handling project dependencies, consider creating a build order based on your dependency graph.

Integrating JIRA with Jenkins can be done via plugins, but ensure you have a clear strategy for ticket creation and updates to avoid overwhelming your team with notifications.

Lastly, don’t underestimate the importance of comprehensive unit tests and integration tests in your CI pipeline. They’ll save you countless hours of debugging down the line.

Having tackled a similar setup, I can share some insights. First off, installing libs to /usr/local/ can work, but it’s not ideal for CI. Instead, consider using CMake’s FetchContent or ExternalProject_Add for managing dependencies. This approach gives you more control and reproducibility.

For Jenkins, I’d recommend setting up a multibranch pipeline. This allows you to define your build process in a Jenkinsfile, which can be version-controlled alongside your code. To handle inter-project dependencies, you might want to look into the Pipeline: Dependency Graph plugin.

Regarding JIRA integration, Jenkins has plugins that can update JIRA tickets based on build status. This can be incredibly useful for tracking progress and issues across your projects.

One last tip: Consider containerizing your build environment. Docker can help ensure consistency across different build agents and make it easier to manage complex dependency chains.

Remember, setting up a system like this is an iterative process. Start small, get the basics working, and then gradually expand and refine your pipeline.

heya, i’ve dealt with similar setups before. instead of /usr/local/, try using cmake’s fetchcontent for deps. it’s WAY easier to manage in CI.

for jenkins, use multibranch pipelines + jenkinsfile. helps with version control. theres also a plugin for dependency graphs that could help.

jira integration is cool, but watch out for notification spam. goodluck with ur setup!