java - Jenkins: Build job with dependency to other artifact/project -
i'm trying configure jenkins jobs have problems regarding setup.
my goal:
- one build job core project
- one build job project has dependencies core project
current setup:
- core -- src/ -- build.gradle -- settings.gradle - project -- src/ -- build.gradle -- settings.gradle
"core" , "project" in separate git repositories.
the settings.gradle of "project" contains following code:
include ':drivers', ':capabilities', ':features', ':extensions', ':pageobjects', ':reports' project(':drivers').projectdir = new file(settingsdir, '../core/drivers') project(':capabilities').projectdir = new file(settingsdir, '../core/capabilities') project(':features').projectdir = new file(settingsdir, '../core/features') project(':extensions').projectdir = new file(settingsdir, '../core/extensions') project(':pageobjects').projectdir = new file(settingsdir, '../core/pageobjects') project(':reports').projectdir = new file(settingsdir, '../core/reports')
so, "project" needs modules of core. on local machine (using eclipse, 1 workspace) works charm, don't know how setup jenkins jobs. maybe path settingsdir not suitable jenkins? it's possible include both repositories in 1 job, better if there 2 build jobs.
how configure properly?
in case want use different jobs core , project, gradle settings projectdir doesn't meet path structure respective jenkins workspaces if use comes jenkins default workspace management.
use custom workspace, helps point folder have setup folder similar dev folder structure.
ex: create root folder hold core , projects , assuming running jenkins (/var/lib/jenkins/workspace/code)
code
-core
--src/
--build.gradle
--settings.gradle
-project
--src/
--build.gradle
--settings.gradle
use custom workspace core job /var/lib/jenkins/workspace/code/core
and project job use custom workspace /var/lib/jenkins/workspace/code/project
Comments
Post a Comment