19.4. Configuring Git hooks as a system property for Business Central
If you do not have an existing Git repository project or if you want to apply post-commit Git hooks to a large number of project repositories you can specify a directory containing a hook file for the value of the org.uberfire.nio.git.hooks system property. This directory is copied to the Git repositories.
If you specify the org.uberfire.nio.git.hooks system property, all Business Central internal repositories and project repositories use the post-commit Git hook. You should only use fully qualified paths in your script.
Prerequisites
- Red Hat Decision Manager is installed in a Red Hat JBoss EAP 7.2 server instance.
-
(For Windows operating system) Cygwin is installed with the Git package added during installation and the path to the Cygwin
/binfolder is added to your environmentPATHvariable. For example,C:\cygwin64\bin. For more information about Cygwin installation, see Installing and Updating Cygwin Packages.
Procedure
Create a post-commit Git hook in a directory on your local system.
For more information about creating post-commit Git hooks, see 「Creating post-commit Git hooks」.
To specify the directory with the hook file for the value of the
org.uberfire.nio.git.hookssystem property, do one of the following tasks:Add the
org.uberfire.nio.git.hookssystem property to thestandalone.xmlfile. For example:<system-properties> <property name="org.uberfire.nio.git.hooks" value="_EAP_HOME_/hooks"> </property> ... </system-properties>
Use the
-Dorg.uberfire.nio.git.hooksenvironment variable when executing Business Central. For example:$ ./standalone.sh -c standalone-full.xml -Dorg.uberfire.nio.git.hooks=_EAP_HOME_/hooks
Start Business Central.
The post-commit Git hook is copied to all Business Central internal repositories and project repositories.
Additional resources