Background of the code transfer
OOM code transfer will allow tech teams to take ownership of their tech team code while still having the code being pulled
in oom.git.
Basically, at the end of the transfer, the oom.git will consist of a repo with several submodules for each tech team code:
oom.git/kubernetes/aaf.git (submodule pointing to aaf/oom.git)
oom.git/kubernetes/aai.git (submodule pointing to aai/oom.git)
oom.git/kubernetes/appc.git (submodule pointing to appc/oom.git)
...
For example, this is how the oom.git/.gitmodules file will look like for each entry for each submodule:
After the code from oom.git/kubernetes/* is transferred to each tech team, the development of the code can still happen within oom.git
and push the changes to Gerrit into each individual submodule. Since the path of each submodule is defined as an HTTP path, the only thing
needed to be done will be to add a similar SSH remote to perform the push.
Developing code in oom
1- Clone the oom repo
git clone ssh://<LFID>@gerrit.onap.org:29418/oom
2. - Sync the submodules
cd oom
git submodule update --init --recursive
3- Notice oom has a remote that points to the oom repo while, for example, oom/kubernetes/aai has a remote that points to aai/oom
4- Proceed with any changes needed to be done in the kubernetes/<component> files
5- Once the changes are committed and ready to be pushed, add the needed SSH remote to push
git remote add gerrit ssh://<LFID>@gerrit.onap.org:29418/aai/oom
6- Push your changes as usual
Few things to consider...
- Commit changes to each submodule should only include files within the submodule itself and not contain files outside it.
- If changes are made to files outside the submodule, after doing "git commit" in the submodule those files outside the submodule will stay staged to the submodule that they belong.
- Each submodule will allow the related component committers to +2 changes.
- For example, committers to appc can +2 changes in the appc/oom submodule and no other submodule.
- File changes to oom excludding kubernetes folder are still managed by the OOM team.