Reputation: 71
My project structure looks as follows:
Core
Project A
Project B
Core, Project A, Project B are separate git repositories. I need this structure because all of my Projects should use the same core settings (and when I have to change something in the core, all Projects are updated without having troubles).
I haved added the following dependency to the Project (Project A + Project B) pom:
<!-- Core -->
<dependency>
<groupId>my-group</groupId>
<artifactId>my-core</artifactId>
<version>${my-core.version}</version>
</dependency>
In eclipse on my local machine it works like a charm. The project finds the core and i am able to run all of my selenium tests.
Now I want to setup jenkins and one jobs should contain Project A + Core, another job Project B + Core - but I have no idea how to do that. I have already searched for some solutions, but I dont want to setup a Nexus for example. So is there a easy way to include my core + project in jenkins?
Looking forward to your answers!
Upvotes: 3
Views: 2582
Reputation: 21
In the SCM section of the Jenkins job configuration screen, choose 'Multiple SCMs'. You'll then see a drop-down list of the available SCM plugins which can be configured similar to the way build steps are configured for a freestyle job. When chosen, each SCM plugin will present its normal set of configuration options.
Make sure each SCM checkout is done in a separate sub-directory of the workspace to avoid conflicts between the SCM providers. If using Mercurial, this option is hidden in the 'Advanced' section, so don't forget to configure it.
If changing the SCM provider for an existing job, I recommend wiping out the workspace.
Upvotes: 0
Reputation: 7326
You can use Multiple SCMs Plugin to retrieve all repositories into job's workspace and then:
install
lifecycle (so, my-core
becomes available in local maven repository on Jenkins machine).Upvotes: 1