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

OPTIONALLY: When cloning the repo, add the "--recurse-submodules" option in git clone command to also fetch the submodules in one step. 

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.
  • No labels

3 Comments

  1. Jessica Wagantall and Yang Xu  in the windriver lab, does https://jenkins.onap.org/job/lab-windriver-oom-staging-daily/ include the git submodule update step?

    1. Yes, Integration deployment script clones submodule as well. 

    2. Gary Wu  does the http://onapci.org/jenkins/job/oom-verify/ build script that finds changed files in gerrit reviews also work for the aai/oom repository? The directory structure is different from oom repository and it seemed like there were errors in the console output in earlier jobs.