Reducing build time by docker images separation and new profiles
In order to reduce SDC build time, new profiles were added, each for every docker image.
Cassandra and catalog-be-init are now modules that can be built separately.
The relevant jenkins jobs were 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 created a new profile and two new modules were added: cassandra and catalog-be-init.
In addition, we created 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 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 reduces the build time and builds only specified modules. Only relevant docker images will be changed.
Jenkins Flow: A script that identifies specific profiles was added to the relevant Jenkins jobs.