IRIS for Windows compatibility, update ZPM module desc
Git for IRIS is a Source Control package that aims to facilitate a native integration of the Git workflow with the InterSystems IRIS platform.
Similar to Caché Tortoize Git and Port, it keeps a code directory in sync with the internal packages that can be put under source control with Git. However, it is designed to work as a transparent link between IRIS and Git that, once setup, requires no user interaction.
git *
: commit, push/pull, branch switching, merge./csp/user/sc
) is now secured by an IRIS user and a (randomly generated) password. A new password is generated every time the source control is (re-)activated and the git hooks are installed.git clone https://github.com/MW-de/git-for-iris.git
cd git-for-iris
docker build -t git-for-iris:0.2 --cpuset-cpus="0-3" .
docker-compose up -d
Go to the Management Portal in http://localhost:9092/csp/sys/UtilHome.csp (Login with _system:SYS
) and activate the source control class:
Go to System Administration > Configuration > Additional Settings > Source Control
For namespace USER, choose SourceControl.Git.Git and save.
Access the source control menu, e. g. in a production, and click Enable Source Control.
The source control output window can be opened by clicking on the second item:
Git for IRIS is used with a Git client. You may use the command line Git client or an IDE like VSCode (optionally with Remote SSH). In this docker example, the git
client will be used within the docker image. In the terminal window, run:
docker-compose exec -u 52773 iris-git /bin/bash
cd /opt/iriscode
You may now edit some code in IRIS. As an example, go to Interoperability > Business Process Designer and create a new BPL process. Save it in package dc.PackageSample
as SampleBPLProcess
. Since the dc.PackageSample
package is under source control, it will be exported to /opt/iriscode
. In the docker terminal, run:
git add .
git commit -m "add new BPL process"
Now let's create a branch:
git checkout -b testing-branch
Back in the BPL editor, make some changes in dc.PackageSample.SampleBPLProcess
, like adding a BPL element to it, and save the BPL process.
git commit -a -m "change BPL process"
Now let's switch back to the master branch:
git checkout master
... and refresh the browser window. The BPL will be reverted to the state in master
. Switching branches again ...
git checkout testing-branch
... will get the newer version back.
This workflow extends to all other actions in Git, including working with remote repos and pull/merge.
Git.*
among multiple namespaces makes them share the same source control configuration.Add global Git.Config
with default settings to current namespace:
do ##class(SourceControl.Git.Utils).AddDefaultSettings()
Add/remove package to/from source control:
do ##class(SourceControl.Git.Utils).AddPackageToSourceControl(<package name>, <namespace>)
do ##class(SourceControl.Git.Utils).RemovePackageFromSourceControl(<package name>)
Globally (that is, among all namespaces that share the same ^Git.Config
mapping) enable/disable source control synchronization (same as in the Source Control Menu):
do ##class(SourceControl.Git.Utils).SetSourceControlStatus($$$YES / $$$NO)
Enabling source control will install the git hooks and export all classes currently under source control to the code directory. If the code directory has gone out-of-sync in the meantime, IRIS still exports the current internal state of all classes, and potential conflicts shall, by design, be managed through Git (git merge
).
Git for IRIS is currently in beta. The core features are implemented and ready to use. Known limitations are:
git stash
, so IRIS will not be notified about stashing.This project is based on Caché Tortoize Git by Alexander Koblov. This project started as a fork of the original project, however, most of the code has been rewritten.
IRIS for Windows compatibility, update ZPM module desc
v0.2: Add compile, add REST security
Initial Release