Page tree

Versions Compared

Key

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

...

  1. Log onto the FDio Gerrit
  2. in Settings→SSH Public Keys, click "Add Key..." (or click this link https://gerrit.fd.io/#/settings/ssh-keys)
  3. Paste the infra@nordix.org public key below into the text box

    ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCdyLRXDIU4w/0H/kZa+2Fw/NLPTyW83F9cQqrahGybbff/pY3CxBKUqRefIp6SLjcR5TjrWOLVO6hlan+nzUzVahlgim8YIGYiD7l6ZuWBvlt/WpqqZOswRLKsgQgTDBUNFXl4V++bsZfbJwlv1QnNaeXGYdfGulXTnQ0wk4+/rBhPXqKVIPJyjnnrz1yCxwyRGOtB9hzSiG1VoKEoddgqIydRnxPQER7K5mc3E6CmvNr8FB5sbo+urT8EVLlb9Df8a7G0XRfMrM0z+1mFjlXG6ckvbIrlfJjQkeK00cXiFwwAmRQeHKZEQrl9++uhjcueIT0TYnGMW7ZW/Hl6NfV8z21pcj+erD3ltDXn3yZjlzf44ekvtNGegJ7hlB7mSdY17rk46QPSlPtPDeibZFj33c+jhZVFeB8PV7DOfXhqtNEVCZ/GlajQlgqbJqy1ILVftD/AhZpyEK0P6j8RiP7IF+rKVrdLsnoXPuHPMV+l+JKJE7STDHiCST0Opn5+WbQhiysDkORCfZMa+q02+/V4X6Khc97ws2LVJU19EQpqGSTYRew44E/cPGFMd3MvlyvzULV56XEtGESAYGAJdgj8g+zif8R4HjfgXo0KRgnz9yk3UU9qo2QZ1aqfu7+mO5r33cVk5ZVUIp3r0f7SD6OEOpj2nlc+cIaV6XRlF/BDYQ== infra@nordix.org


  4. Click "Add"

1.2 Add Repository Jenkins JJB Jobs

...

  1. Clone the Nordix infra/cicd repository

    git clone ssh://<your-userid>@gerrit.nordix.org:29418/infra/cicd


  2. Create or amend the JJB yaml file for your job under the jjb directory in the cloned infra/cicd repo
    Note that by convention, there are subdirectories under the jjb directory for the various FDio projects, create your new JJB file in the fast-data-project directory.
  3. Submit your new or updated JJB yaml files as a review

...

For example, for the vpp project, the fields are as follows:

name: fdio-vpp-push-upstream
project: vpp
project-name: vpp

You can check running and/or completed jobs on the Nordix Jenkins.

...

  1. The Push Upstream Job: <project-name>-push-upstream-jobs.yaml This job pushes your reviews upstream from the Nordix master branch to the FDio master branch. You activate by posting a comment containing the magic word "push-upstream" to your review in the Nordix master  branch. 
  2. The Rebase Job: <project-name>-rebase-jobs.yaml This job keeps the Nordix master branch synchronized with the FDio master branch in the repository. It is called whenever code is merged on the FDio gerrit repo. It pushes the merged code from the OpenDev the FDio master branch to the Nordix master branch. Also it makes sure that if the review is merged in FDio then the corresponding review in Nordix is automatically closed.

...

  1. Prepare your review on the master branch of the Nordix repo that is a downstream of an FDio repo. You can also prepare pull from FDio git repos if you wish.
    1. You may work on the review on the master branch from scratch
    2. You may create the review on the master branch by squashing or cherry picking reviews from development branches.
  2. Submit your review to the master branch of the repo on the Nordix gerrit.

    git push <nordix> HEAD:refs/for/master</optional gerrit topic>


  3. Upstream your review to the master branch of the repository on the FDio gerrit by logging onto the Nordix gerrit and posting a comment with the word push-upstream. This triggers the Jenkins job that upstreams your review to the FDio master branch.
    Note: Never +2 or commit/merge a review directly on the Nordix master branch as this will cause the FDio and Nordix master branches to diverge.
  4. The review is approved and merged in FDio. When the review is merged in FDio, the merge triggers a push of the review in the Nordix cloned repo. The Nordix cloned repo is therefore always in lock step with the FDio upstream original repo.
  5. When the review in upstream gets merged, the status of your original review on Nordix Gerrit will also be automatically closed since Gerrit associates reviews using ChangeId and when sync job brings your commit from upstream to Nordix Gerrit, it will be in Merged state. No further work is required on your side.

...

  1. Make whatever changes and additions you require to the review and check it in locally.

    git commit --amend


  2. Push your commit to the Nordix gerrit as a patch set on an existing review.

    git push <nordix> HEAD:refs/for/master</optional gerrit topic>

    You can check that you review has a new patch set on the master branch of the Nordix gerrit.

  3. Transfer the review from the Nordix gerrit to the FDio gerrit. Post a comment on the Nordix gerrit containing the magic word "push-upstream". You can now check that your review has a new patch set on the master branch of the FDio Gerrit.