Skip to content

Commit 668302f

Browse files
committed
Merge branch 'main' into issue-525
2 parents 2d98550 + a642f94 commit 668302f

16 files changed

+125
-0
lines changed

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,13 @@
3434
3535
## Basic Use
3636
37+
### Source Control
38+
39+
For those with less experience using source control, we recommend this [page](/docs/scintro.md) for a quick introduction to source control / change control basics.
40+
41+
### Health Connect Cloud
42+
git-source control is the recommended source control for Health Connect Cloud. [This page](/docs/hcc.md) covers HCC specific usage of git-source-control, including the recommended development workflow, initial setup, and CICD pipelining.
43+
3744
### Studio
3845
Add a file for tracking by right-clicking on it in the workspace/project view and choosing Git > Add.
3946
This same menu also has options to remove (stop tracking the file), discard changes (revert to the index), or commit changes.

docs/expert.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
### Feature branches
2+
3+
The first step in making changes in Health Connect Cloud using git-source-control is making a feature branch. In order for changes to be tracked by source control properly, each change (also called a feature) should be made on it's own branch, so as to not interfere with other changes, and allow for testing of its effects on the production environment. To create a new feature branch, navigate to the Git UI in the namespace you plan on doing development.
4+
5+
First, make sure that you are in the development branch. It should be bolded and at the top of the Local Branches in the sidebar. If it is not, as pictured below, click on the "development" branch and press checkout branch.
6+
7+
![Development branch in Git UI Sidebar](images/hcc/developmentsidebar.png)
8+
9+
Once you are in the development branch, press the "+" next the the Local Branches tab, and create a new branch by typing out a name for it. (No spaces or special characters are allowed in branch names).
10+
11+
![Creating a new via sidebar](images/hcc/newbranch.png)
12+
![Naming new branch](images/hcc/newbranchnaming.png)
13+
14+
Finally, you should click on the new branch you just made in the sidebar, and then press "Push".
15+
16+
![Push your new branch](images/hcc/pushbranch.png)
17+
18+
This makes sure that your branch will be tracked in Gitlab, so that other users can checkout your branch to test your changes on their own namespaces.
19+
20+
After this, you can start working on the change.
21+
22+
### Merge Requests
23+
24+
Once you have made all the changes for the specific feature you are working on, and have tested in your namespace, it will be time to merge all of these changes into the development branch. To start, make sure that all your changes have been commited to your feature branch. To do this, navigate to the Git UI, and after making sure you are in the right feature branch, press the "Workspace" tab at the top of the sidebar.
25+
26+
![Workspace tab in the sidebar](images/hcc/sidebar.png)
27+
28+
This will bring you to the workspace view. All the changes you made to files should be in the bottom left of the workspace view. ![Changed files in workspace](images/hcc/workspacechanges.png)
29+
30+
Clicking on one of these files will bring up a line by line view of the changes that have been made. Make sure that these are the changes you want to make, and then select all the files. Next, enter a commit message that should describe that changes that have been made.
31+
32+
![Enter commit message](images/hcc/commitmessage.png)
33+
34+
You can enter more details below, and then press the commit button underneath. This will commit the changes you have made to your feature branch. Once all of your changes have been committed, you should be ready to merge into the development branch.
35+
36+
In the Git UI, first checkout the development branch, by selecting it from the Local Branches and pressing "Checkout branch". Next, find the feature branch that you have been working on, select it from the local branches, and press "Merge Branch".
37+
38+
![Merge Branch](images/hcc/mergebranch.png)
39+
40+
41+
42+

docs/hcc.md

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# git-source-control for Health Connect Cloud Overview
2+
3+
## Development Workflow
4+
5+
git-source-control has two main use modes: Basic and Expert. For Health Connect Cloud, we recommend beginning with Basic Mode, since it includes all of the necessary functionality for proper source control development while being easy to use for those with less Git experience. The recommended workflow for Health Connect Cloud is to create interface branches, create merge requests into development, and then pull the changes into the main dev development namespace.
6+
7+
A Health Connect Cloud Dev deployment will have a main namespace (which is also present in Test and Prod) and should also have a dedicated namespace for each developer contributing. These namespaces can be configured via the Cloud Portal. It is important for changes to originate in developer-specific namespaces; the main namespace in the dev deployment should always be kept up to date with the development branch in GitLab, either through a CI/CD pipeline or by use of the Git Pull page from git-source-control.
8+
9+
### Interface Branches
10+
11+
The first step in making changes in Health Connect Cloud using git-source-control is making an interface (feature) branch. To start out, you should be in your own personal development namespace. In order for changes to be tracked by source control properly, each change (also called a feature) should be made on it's own branch, so as to not interfere with other changes, and allow for testing of its effects on the production environment. To create a new feature branch, use the source control menu and select "Create new branch".
12+
13+
![Creating a new branch](images/hcc/newbranchmenu.png)
14+
15+
You will be prompted to enter a name for your new branch (no spaces or special characters), after which your environment will switch to that new branch. All new branches are fresh copies of the development branch. We recommend that you name branches descriptively based on a reference to the issue/bug that you are trying to fix - a GitLab issue number, Jira, ServiceNow ticket reference, etc.
16+
17+
### Making Changes
18+
19+
Now that you are in your new branch (you can see your current branch in the first item in the source control menu), you can start making changes. As you make changes to different business processes, rules, and productions, make sure that all of these changes are saved properly and any new items are added to source control (via the "Add" menu item) before you continue to sync and merge.
20+
21+
### Syncing and Merge Requests
22+
23+
Once you have made all the changes for the specific feature you are working on, and have tested in your namespace, it will be time to merge all of these changes into the development branch.
24+
25+
To start, press the sync button from the source control menu.
26+
27+
![Sync option in menu](images/hcc/sync.png)
28+
29+
This will bring up the sync interface, where you are able to see all the of the files you have changed, as well as add a descriptive comment for the changes you made. When you sync, these changes will be pushed to the git remote.
30+
31+
![Sync Interface](images/hcc/syncinterface.png)
32+
33+
Use the link in the output of the sync in order to create a merge request in the git remote (don't worry if you close out of the sync tab, you can also navigate to GitLab manually). Here, you should make sure that you are merging your interface branch into the development environment, and notify / add the relevant reviewers. Once this merge request is approved, it will be merged into the development branch, so that all of your changes will now be a part of development.
34+
35+
### Switching Branches
36+
37+
Suppose you begin working on a larger project in one branch, and then need to shift to something else. The proper approach to this in git-source-control is to commit your in-progress work on the first interface, and then to switch to a new branch. This branch will be based on the development branch and may be missing components from the first project, but that's OK. You can always switch back to the first interface branch to continue work there.
38+
39+
## Deploying Changes to the Main Dev Namespace
40+
41+
If you are using a CI/CD pipeline in GitLab, simply merging the feature branch to development is enough; your change will be deployed to the main development namespace automatically.
42+
43+
If you are not using a CI/CD pipeline, you can get merged changes into the main development namespace using the "Git Pull" link from the Favorites section in the Health Connect Cloud home page. This will load and compile the incremental set of changes from new commits to the development branch.
44+
45+
## Deploying Changes to Test and Prod
46+
47+
### Deploying using CI/CD Pipelines
48+
49+
With CI/CD pipelines in place, the most important thing is that there is a branch in GitLab that corresponds to the main namespace in Test and another that corresponds to the main namespace on Prod, so that you can see exactly when changes made it to each branch/environment. With CI/CD pipelines, there's no action needed to move the change forward - merging the merge request is sufficient. The recommended workflow for this is to create additional merge requests from the interface branch to each of Test and Prod. Other Git branching and change flows may be appropriate if you have a strong opinion about them.
50+
51+
### Deploying using the Deployment Manager
52+
53+
Another way to move work from the main Dev namespace to the corresponding namespace in Test and Prod environments is using the Deployment Manager to move from Dev to Test, then Test to Prod. This loses the traceability of a clean branch-to-environment mapping, but is perhaps simpler technically and involves less time wrangling merge requests in GitLab. For guidance on using the deployment manager, see [InterSystems Documentation](https://docs.intersystems.com/irisforhealthlatest/csp/docbook/Doc.View.cls?KEY=EGDV_deploying).

docs/images/basicmodesetting.png

23.1 KB
Loading

docs/images/hcc/commitmessage.png

50.1 KB
Loading
29.9 KB
Loading

docs/images/hcc/mergebranch.png

18.3 KB
Loading

docs/images/hcc/newbranch.png

15.2 KB
Loading

docs/images/hcc/newbranchmenu.png

79.4 KB
Loading

docs/images/hcc/newbranchnaming.png

16.6 KB
Loading

0 commit comments

Comments
 (0)