Reducing build time by docker images separation and new profiles


In order to reduce SDC build time, new profiles will be added, each for every docker image.
Cassandra and catalog-be-init will be modules that could be built separately.
The relevant jenkins jobs will be configured so that upon a new commit, only the relevant modules will be built and the relevant docker images will be changed.   


Old model structure: The profiles in the SDC pom are “all”, ”catalog”, ”onboarding”, “ci-tests”.
backend and backend-init images are coupled within a single module.
nfv-cassandra image is coupled with other images within a single module as well.


New model structure: For each docker image we'll create a new profile and add two new modules: cassandra and catalog-be-init.
In addition, we'll create a map file which maps all file paths to certain profile.


Flow: The SDC programmer should specify the desired profile to be built using the "-P" flag when running maven command (e.g. mvn clean install -P docker,catalog-be-m).
One could also build a specific module within a profile using the --pl flag.


Benefits: This feature will reduce the build time and build only specified modules. Only relevant docker images will be changed.


Jenkins Flow: In the second phase, a script that identifies specific profiles will be added to the relevant Jenkins jobs.


  • No labels