Integration

Flow Director has a 3-fold integration with the version control system Git:

  1. App libraries in the System app.

  2. Flow component libraries in user apps.

  3. User apps that are linked to a Git repository.

App Libraries

Changes of App libraries such as the default Flow Director and custom app libraries are automatically pulled from our GitHub repository every hour. When we provide a new app or add a new app to your custom app libraries, all running Flow Director instances with these app libraries installed have them available within the next hour. Stopped instances pull during their next startup.

Flow Component Libraries

Changes of flow component libraries are pulled from our GitHub repositories every hour.

User Apps

Changes of user apps linked to a Git repository are pulled from that repository every hour if the app has auto-updates enabled (default). This toolbar button can toggle this:

The button is not visible for apps that are installed from the Flow Director app library.

Integrate a User App with Git

Linking your app with a Git repository has many advantages as it allows you to collaborate and synchronize all installs of your app while having full versioning. Flow Director supports GitHub, GitLab, and BitBucket. You need access via HTTP. Access via SSH key is not supported.

Steps:

  1. Create your app in System app with Create new App.

  2. Create a Git repository and add a README file (or any other file).

  3. Login to your app.

  4. Click on the Git button in the toolbar:

  5. Enter URL, branch, and either username/password or a personal access token. It depends on the Git provider in which field you must enter the token. GitHub uses the username, GitLab the password field. Bitbucket the password field plus a special URL. Please check their documentation.

  6. Click on SET and wait a moment to merge the repository with your app.

  7. Click on the Git button again, and you have the full Git menu:

8. Click on Commit & Push to Remote to transfer your app to the Git repository:

Congratulations! Your app is now in the Git repository. From now on, every change is tracked by Git.

Note that Flow Director exclusively controls the content of your Git repository. Don’t perform any manual changes!

Working with Git

Auto Updates

Any user app that is linked with a Git repository and not installed from the Flow Director app library has the auto-update button in the toolbar:

Green means auto-update is enabled. This will pull changes of flow component libraries and the app every hour. If you start working on your app, you may disable it:

Git Menu

The Git menu (if shown) has several options:

You should see the result of each menu action in the app log.

Pull from Remote

This will pull changes from the remote and merges them into the local repository. If you have had local changes, Flow Director will reject the pull, and you need to revert first. We took this approach to avoid accept/merge dialogs and expose internal files. It works best when only one person applies changes to an app at a time and not multiple people simultaneously.

Commit & Push to Remote

This will commit your local changes and push them to the remote repository.

Revert local Changes

This will revert all changes you made to your local repository since the last commit.

Unlink from Remote

This unlinks the app from the Git repository.

Create a custom App Library

A custom app library enables users to install a collection of apps with a single click without entering Git credentials for each app.

Add an App Library

You will install the app library in the System app by clicking the ADD button here:

It opens a Git dialog to add the app library repository:

App Library Name

A unique name for the app library.

URL

The Git URL of the app library.

Branch

The branch of the app library.

File Name

The name of the file where all app repositories are declared.

Username / Password

Username and password or personal access token to access the library.

Git Repositories

All apps you want to be included in an app library must be linked to a Git repository. Then create a new repository that contains the definition of the app library. All repositories (apps and library) must have read/write access through the credentials given in the app library's ADD dialog. A personal access token works best here.

App Library Git Repository

  1. Create an empty Git repository and add a README file.

  2. Add a single file and name it, i.e., apps.json. This filename is specified in the File Name field of the ADD dialog. It contains the declaration of the app repositories.

Declaration File

This file is a simple JSON that has one entry per app. Example:

{
  "accountservice" : {
      "title": "Account Service",
      "url": "https://github.com/...",
      "branch": "develop"
  },
  "adminservice" : {
      "title": "Admin Service",
      "url": "https://github.com/...",
      "branch": "develop"
  },
  "appservice" : {
      "title": "App Service",
      "url": "https://github.com/...",
      "branch": "develop"
  },
  "basketservice" : {
      "title": "Basket Service",
      "url": "https://github.com/...",
      "branch": "develop"
  }
}
JSON