In our spring-boot project we are using local Git setup so all developer pull and push code in our in house git server.
That means the Git structure of our project is like that under one_project
(project name) repository we have sub folders named api
, ui
, common
, notification
, authentication
, etc..., which have there separate pom.xml
but having one .git
file, all of which is present in one_project
repository.
Here is a rough structure of our project in image:
Now I have to use Jenkins to build these on two different provisioned Virtual Machines: machine A and machine B
So if I have to build and deploy jar of api
, ui
, common
on machine A and notification
,authentication
, common
on machine B,
NOTE THAT common
use on both VMs
Question:
How to create a Jenkins job using slave nodes so that if developer fix bug or new code on any of one sub module and willing to make it build on provisioning VMs using Jenkins token (JENKINS_URL/job/one_project/build?token=api), so it only makes a fresh build of only that eg. api
, not others and same for other two?