Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Fetch the latest changes for all branches from central repo to local repo.

    Code Block
    languagebash
    git checkout master
    git pull --rebase


  2. Create a temporary local delivery branch. origin/master will point at the latest master version

    Code Block
    languagebash
    git checkout -b nordix-dev_delivery origin/master


  3. Squash all the commits you want to deliver into one and merge, or cherry pick the commit into the temporary local delivery branch.
    git merge -–squash origin/nordix-dev (Need to find another way to do this, since there will be too many commits included in the squash merge from the branch after some time. Maybe this can help: https://www.roman10.net/2012/08/03/git-merge-a-range-of-commits-from-one-branch-to-another/)
    Or

    Copy the "Cherry Pick" option from "Download" drop down on the change's Gerrit page.
  4. Update commit message (see Commit Messages for format) and commit. This will also create a new Change-ID
    git commit
  5. Sanity check that the changes seem to be ok
    git diff origin/master
  6. Push the new commit to dev in the central ONAP repo, by using "upstream", for review and verification
    git push upstream HEAD:refs/for/master
    For this to work, an entry similar to the one below is needed int the .git/config file in the repo:
    [remote "upstream"]
            url = ssh://<username>@gerrit.onap.org:29418/dcaegen2/collectors/datafile.git
            fetch = +refs/heads/*:refs/remotes/upstream/*


  7. Move to another branch so the temporary delivery branch can be deleted (git branch shows you the branches you have which you can move to)
    git checkout <some other branch>
  8. Remove the temporary local delivery branch
    git branch –D nordix-dev_delivery

Submit DRAFT review to ONAP

Submitting draft review to ONAP is the same as Deliver to ONAP except from Step 6. Use the following push command in step 6 to submit draft review,

Code Block
git push upstream HEAD:refs/drafts/master

The commit is pushed directly from your environment, make sure your commit message following the ONAP commit message template

Uplift a Team Branch

Use this procedure to uplift (merge) the nordix-dev branch after your changes have been merged in to the ONAP repo and synched back to the nordix master branch.

...