Git Integration
Integration
Flow Director has a 3-fold integration with the version control system Git:
App libraries in the System app.
Flow component libraries in user apps.
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 when the Flow Director platform is updated.
Flow Component Libraries
Changes in flow component libraries are pulled from our GitHub repositories when the app is updated.
User Apps
Changes of user apps linked to a Git repository are pulled from that repository when the app is updated.
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:
Create your app in System app with Create new App.
Create a Git repository and add a
README
file (or any other file).Login to your app.
Click on the Git button in the toolbar:
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.
Click on
SET
and wait a moment to merge the repository with your app.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
Updates
Any user app has an update button in the toolbar:
By clicking on it, you can choose to use auto-updates at a particular hour or manual update.
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 merge 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 exposing 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
Create an empty Git repository and add a README file.
Add a single file and name it, i.e.,
apps.json
. This filename is specified in the File Name field of theADD
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"
}
}