Deploying pre-receive hooks in the Git repository on a Node.js server
You can configure pre-receive hooks on the Node.js server to enable process enforcement between Git and IBM® Engineering Workflow Management (EWM).
About this task
The following steps assume that the Git repositories are present in /var/gitrepos on a Linux system. Repeat this task for each Git repository.
- Copy the pre-receive hook file from EWM-git-integration-toolkit-install-folder/server/hooks/examples/pre-receive to /var/gitrepos/repository-name/hooks.
Assign executable permission to the file:
chmod +x pre-receive.
Open the pre-receive file in a text editor and set the following environment variables:
Environment variable Description NODE_EXECUTABLE Absolute path to the node executable. Required if node executable cannot be found in the system path. RTC_GIT_SERVER_TOOLKIT_PATH Absolute path to the folder where the EWM Git Integration Toolkit has been installed. RTC_GIT_SERVER_TRACE_LEVEL Logging level for the hooks. Set this value to 4 while you set up the integration. Revert it after you validate the integration.