38.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.3 server instance.
-
(For Windows operating system) Cygwin is installed with the Git package added during installation and the path to the Cygwin
/bin
folder is added to your environmentPATH
variable. 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.hooks
system property, do one of the following tasks:Add the
org.uberfire.nio.git.hooks
system property to thestandalone.xml
file. For example:<system-properties> <property name="org.uberfire.nio.git.hooks" value="_EAP_HOME_/hooks"> </property> ... </system-properties>
<system-properties> <property name="org.uberfire.nio.git.hooks" value="_EAP_HOME_/hooks"> </property> ... </system-properties>
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Use the
-Dorg.uberfire.nio.git.hooks
environment variable when executing Business Central. For example:./standalone.sh -c standalone-full.xml -Dorg.uberfire.nio.git.hooks=_EAP_HOME_/hooks
$ ./standalone.sh -c standalone-full.xml -Dorg.uberfire.nio.git.hooks=_EAP_HOME_/hooks
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
Start Business Central.
The post-commit Git hook is copied to all Business Central internal repositories and project repositories.
Additional resources