Getting the Source Code

Install repo

repo is a tool from Google that works with Gerrit and allows us to manage the multiple git repos that make up the CORD code base.

If you don't already have repo installed, this may be possible with your system package manager, or using the instructions on the android source site, or by using the following commands which download/verify/install it:

curl -o /tmp/repo 'https://gerrit.opencord.org/gitweb?p=repo.git;a=blob_plain;f=repo;hb=refs/heads/stable'
echo '394d93ac7261d59db58afa49bb5f88386fea8518792491ee3db8baab49c3ecda  /tmp/repo' | sha256sum -c -
sudo mv /tmp/repo /usr/local/bin/repo
sudo chmod a+x /usr/local/bin/repo

NOTE: As mentioned above, you may want to install repo using the official repository instead. We forked the original repository and host a copy of the file to make repo downloadable also by organizations that don't have access to Google servers.

Download CORD repositories

The cord repositories are usually checked out to ~/cord in most of our examples and deployments:

{% include "/partials/repo-download.md" %}

NOTE: -b specifies the branch name. Development work goes on in master, and there are also specific stable branches such as cord-4.0 that can be used.

When this is complete, a listing (ls) inside this directory should yield output similar to:

$ ls
automation-tools        component               helm-charts             onos-apps               subscriber.yaml
build                   docs                    incubator               orchestration           test

Download patchsets

Once you've downloaded a CORD source tree, you can download patchsets from Gerrit with the following command:

repo download orchestration/xos 1234/3

Which downloads a patch for the xos git repo, patchset number 1234 and version 3.

Contributing code to CORD

We use Gerrit to manage the CORD code base. For more information see Working with Gerrit.

For a general introduction to ways you can participate and contribute to the project, see Contributing to CORD.

Downloading testing and QA repositories

Whie not useful for deploying a CORD POD, the repo manifest files and the infrastructure code used to configure our test and QA systems, including Jenkins jobs created with Jenkins Job Builder can be downloaded with repo. The ci-management repo uses git submodules, so those need to be checked out as well:

mkdir cordqa
cd cordqa
repo init -u https://gerrit.opencord.org/qa-manifest -b master
repo sync
cd ci-management
git submodule init
git submodule update

See ci-management/README.md for further instructions.