HiHAT Development
From Modelado Foundation
HiHAT Development Environment on xstg.modelado.org
Welcome to the development environment for HiHAT. This is a brief tutorial on how to set up a development environment and work with the existing development infrastructure on xstg. There are two HiHAT project repositories (aka "repos"):
* HiHAT - public repo for community development * hihat_int - internal repo for special development
This wiki page provides information for working with the public HiHAT git repo intended for community use.
[This page is under development today - Wed, Aug 16, 2017. It should be complete by tonight PT. This message will be removed once the intended content has all been moved here.]
Software Tools
The HiHAT development environment uses the following tools for its Continuous Integration Pipeline:
- git - Git Book
- Gerrit - Gerrit Documentation
- Redmine Bug Tracking - Redmine Overview
- OpenLDAP + LAM - LDAP Account Manager (LAM)
Pre-Requisites
- Git is a broadly used open source distributed version control utility. This page assumes you have a working knowledge of git.
- Gerrit is a git repo management utility which enables code reviews, verification and merging of patches into git repositories. These functions are typically required in a distributed code development project. A brief introduction to the Gerrit Web User Interface is provided later in this document. You can use it to perform code reviews, check your submissions, check your permissions and membership, etc. You will need it before you start with git.
Before You Code, Caveats
- Please read the instructions here completely before you get started
- Make sure your xstg account user name and email match what you provide to the commits in your local git tree (configure your git environment correctly)
- Ensure your origin points to the correct repo URL after cloning
$ git remote -v
- Keep your commit messages short! The total length should be shorter than 80 chars, the subject line shorter than 70 characters. Your commit might succeed but your push to the upstream repo will fail with a "commit message length exceeded" error. [We can configure this to be more flexible going forward].
- Ensure that your git log shows a Change-Id: line (automatically added by /.git/hooks/commit-msg)
Quick Start-Up: Cloning and Submitting Patches Upstream
- Sync with the xstg team to ensure you have an account in LDAP on xstg.modelado.org
- Login to XSTG Gerrit with that account. This is a necessary step to push your credentials to Gerrit before you undertake git operations from your client system.
- Clone the HiHAT git repo on your local system
- $ git clone https://xstg.modelado.org/gerrit/HiHAT
- In your top level HiHAT git clone directory, move (or use ln -s) the hooks repo to .git
- HiHAT$ mv git-hooks .git/hooks
- Make your development changes in your git tree, and commit them to your tree via your usual preferred git operations. e.g.:
- $git add .; git commit .
- Note the git commit msg length limitation above in the Caveats section!
- Push upstream
- git push origin HEAD:refs/for/master
- Check the Gerrit Web UI to see your patch submission
Project Groups
You can check which groups you are in from the Gerrit Web UI -> My -> Groups Dashboard page.
- ldap/hihat-admin: project admin (same as project for now); authority to do all project operations
- ldap/hihat-developer: key developer or maintainer, has authority to approve code submissions (+2 reviews), verify patches (+1 verify in place of build/test automated verification methods, and most other code-flow activity
- ldap/hihat-contributor: individual contributor who can clone repos, submit patches, and provide +1 level code reviews, etc.
Working With Gerrit Web UI
Gerrit is a git repo manager providing code review and verification of patches for submission to a git repository. Gerrit stages submitted patches and provides powerful, fine-grained control over all aspects of the git development environment. The Web User Interface can be confusing at first, hence a few brief tips are provided here.
- Access: https://xstg.modelado.org/gerrit/
- Top level Gerrit Web UI Menu
- All: Shows you current items in the queue for processing (patches submitted for approval, etc.)
- My: Shows items associated with your account (either open items you submitted or are watching)
- Projects: Lists the visible projects (not in hidden state) being managed by this Gerrit server
- People: group information
- Plugins:
- Documentation:
- Note that you also need to actually click on a sub-tab, it does not immediately switch the content of the page to the top-level tab