Versions Compared
Key
- This line was added.
- This line was removed.
- Formatting was changed.
this guide will walkthrough
1) going to JIRA to start a change
2 ) creating a development branch
3) checkout out the new branch
...
This guide will outline the steps needed to begin development. Ready to submit your code? Read the section on Code Submission.
Introduction
OSCAR EMR has adopted the Atlassian suite of tools in streamline the change management process. Observing best practices will greatly reduce the amount of effort needed to integrate code contributions to the official branches.
Branching
OSCAR EMR employs a branching strategy designed to increase efficiency. There are 2 branches a submitter can push code to.
- master
- stable
Stable - this branch has full Quality Assurance and is used in production across our user base. This branch accepts bug fixes and feature requests in JIRA.
Master - this branch accepts new Features and Bug fixes. Periodically a new RELEASE branch will be created from master which will eventually be merged into stable.
Learn more about OSCAR EMR's branching strategy.
Creating a development branch
Note: Before completing this step, make sure you've created an issue first.
You can do this step from JIRA or through the command line. An example of both methods has been provided.
JIRA
Beginning from the issue, click on "Create Branch" in the Development panel.
Note: If you don't see the Development Panel, you must request "Developer" access from OSCAR EMR (link).
Image Added
There are 3 fields available.
Repository - always choose oscaremr/oscar for changes to OSCAR.
Branch from - Choose stable or master as appropriate.
Branch name - Leave the default. If you want something different, just make sure to leave the OSCAREMR-<id> prefix.
Image Added
Select "Create branch", and you are redirected to the Bitbucket page for the new branch and instructions on how to check it out.
Image Added
If you don't already have the code downloaded, make sure you clone the repository first. You can then checkout the branch through the command line, Eclipse or a GIT client such as SourceTree.
Command Line
If you have git installed, it's really easy to create a remote branch through the command line. Just be careful in your naming; make sure you have OSCAREMR-<ID>- as your prefix to your branch name. That way it connects up to JIRA and Jenkins knows to build it.
Basically, you clone the repository, if you havn't already, then create the branch locally, and push it to Bitbucket (the remote name will be the same as the local name using this format)
Code Block | ||
---|---|---|
| ||
git clone git@bitbucket.org:oscaremr/oscar.git
cd oscar
git checkout -b OSCAREMR-<id>-some-description
git push origin OSCAREMR-<id>-some-description |
Here's an example.
Image Added
Image Added
Working in your branch
You can create a series of commits within your branch. When it's time to merge into OSCAR, all your commits will go into a single pull request (see Submitting Code).
Make sure you are periodically merging in changes from your source branch so that you minimize the chance of conflicts when you are ready to make a pull request.
Page Tree | ||||
---|---|---|---|---|
|