Git Configuration

Joget DX provides built-in integration with Git for version-controlling applications and their components. Here are the key points and features:

Built-in Git Integration:

    • Joget DX automatically manages application definitions and components using Git behind the scenes.
    • All app definitions, including plugins and resources, are stored in the filesystem and version-controlled using Git.
    • To access the built-in Git, the local repository is in <Joget installation folder>\wflow\app_src\<App ID>\<App ID_version number>.

      Example:
      C:\Joget-DX8-Enterprise\wflow\app_src\expenseclaim\expenseclaim_1
      For more information on the built-in Git repository directory structure, see Built-in Git Project Directory Structure.
      Currently, Users cannot customize the Git Message during Commit.

Customization Options:

    • Users can configure Joget DX to integrate with an external Git repository (e.g., GitHub, Bitbucket, GitLab) by providing:
      • Remote Git URL: URL to the remote Git server for pushing commits.
      • Remote Git Username and Password: Credentials for authentication with the remote Git server.
    • Users can exclude sensitive configurations like environment variables and plugin default properties from Git commits.

Directory Structure:

 
Git app definition files are saved in the following directory structure:

 wflow

   |-  app_src

      |-  appId

         |- app.properties

         |-  appId_version

            |- appDefinition.xml

            |- appConfig.xml

            |- package.xpdl

            |-  forms

            |    |- form.json

            |-  lists

            |    |- list.json

            |-  userviews

            |    |- userview.json

            |-  resources

            |    |- file.ext

            |-  plugins

                |-  plugin.jar

  • Description of each file / directory

    • app_src: The directory under wflow contains all the Git projects.
    • appId: Each app has a directory with the app ID as its name e.g., crm.
    • app.properties: This configuration file contains the settings saved in the app's Git Configuration UI. It applies to all app versions.
    • appId_version: Each app version has its directory under the app directory; for example, version 3 of app ID crm would be crm_3. This directory contains an entire app version, including its dependencies, e.g., plugins.
      Note:
      Within this directory, each app version is a separate Git branch.
      It might seem that it is being duplicated for each version, but this is required to accommodate the possibility of different app versions being worked on concurrently.
    • appDefinition.xml: XML contains the main app definition, including process mappings, messages, and resource records.
    • appConfig.xml: XML containing environment variables and plugin default properties. This file is meant to keep configuration values (e.g., settings that might differ in development vs testing vs production) that can be omitted from Git commits if required.
    • package.xpdl: XPDL definition for the app processes.
    • forms: Directory containing form JSON definitions. Each form is saved as 1 JSON file.
    • lists: Directory containing datalist JSON definitions. Each datalist is saved as 1 JSON file.
    • userviews: Directory containing form JSON definitions. Each userview is saved as 1 JSON file.
    • resources: Directory containing uploaded resource files.
    • plugins: Directory containing custom plugins used.

 

Managing version:

    • Each app version resides in a separate directory (appId_version), effectively acting as separate Git branches.
    • This structure allows concurrent development on different app versions without conflicts.
    • Version control in Joget DX facilitates tracking, reverting, merging, and cloning application code.
      Training materials like the 12-Version Control slides from Joget Academy provide detailed guidance on managing versions effectively.

Automatic Sync and DB Updates:

    • Option to enable automatic synchronization (Auto Sync DB From Git) of Git project files with database definitions.
    • Ensures that updates in Git project files are automatically reflected in the Joget DX database definitions.

Disabling Git:

    • Users can disable Git integration by adding -Dgit.disabled=true to the Joget startup script (JAVA_OPTS).
      set JAVA_OPTS=-Xmx2048M -Dwflow.home=./wflow/ -Dgit.disabled=true -javaagent:./wflow/aspectjweaver-1.8.5.jar -javaagent:./wflow/glowroot/glowroot.jar
      
    • This can be useful for scenarios where Git integration is not required or to save disk space in development environments.

By leveraging Joget DX's Git integration and version control features, teams can collaborate efficiently, track changes, and manage the application development lifecycle seamlessly. This ensures consistency and reliability in application deployments across different environments.

Git configuration properties

To go to Git configuration properties, go to App Composer and select Settings > Git Configuration.

When you select Git Configuration, you will see the following properties available for configuration:

  • Remote Git URL: The URL to the remote Git server (e.g., GitHub, BitBucket, GitLab, internal servers, etc) to push commits to.
  • Remote Git Username: The username to authenticate to the remote Git server.
  • Remote Git Password: The password to authenticate to the remote Git server.
  • Exclude App Configuration (Environment Variables and Plugin Default Properties): Check this to NOT commit environment variables and plugin default properties. This is meant for configuration values (e.g., settings that might differ in development, testing, and production).
  • Always Pull from Remote Server: Check this to allow pull from the remote Git server on every request. If unchecked, it will only pull before pushing any updates.
    This dramatically slows the request and should only be used in a development environment.
  • Auto Sync DB From Git: This checkbox automatically checks for updates in the Git project files and updates the DB definitions accordingly.
Created by Julieth Last modified by Aadrian on Dec 13, 2024