Skip to content

Importing from a Git Repository

It's possible to import workflow defintions and/or event definition groups into AireFlow from a Git repository by opening the AireFlow menu and selecting "Repositories".

Importing

To import workflow defintions and/or event definition groups from a Git repository, click the "+" button in the top right of the "Repositories" page. Enter the following details:

  • Repository URL of the user
  • Branch to import from
  • Email address to send error if any during the import
  • Authentication details - Public/ SSH Key or Credentials and supporting details

Then select "Save" to initiate the import. AireFlow will validate the details and the contents of the definitions from the repository and perform the import process accordingly.

Authentication details - SSH Key

When setting the Authentication Type to SSH Key you will be presented with a Vault Secret Key text field. This field relates to a secret you must have already configured in AireVault. For example, you may have a secret in AireVault with the key AireFlowSshKey with the value of your SSH Key stored against it. In this case you would enter AireFlowSshKey into the Vault Secret Key field. When saving the repository, as part of the validation process, AireFlow will try and retrieve the correct secret value from AireVault using the following scope flow:repoName:repoBranch. Therefore, you will need to ensure that you have a value for the Vault Secret Key for this corresponding scope.

Authentication details - Credentials

When setting the Authentication Type to Credentials you will be presented with a Username text field as well as a Vault Secret Key text field. The Username field requires you to just enter the username required to gain access to the Git repository. On the other hand the Vault Secret Key relates to a secret you must have already configured in AireVault. For example, you may have a secret in AireVault with the key AireFlowCredentialsPassword with the value of your credentials password stored against it. In this case you would enter AireFlowCredentialsPassword into the Vault Secret Key field. When saving the repository, as part of the validation process, AireFlow will try and retrieve the correct secret value from AireVault using the following scope flow:repoName:repoBranch. Therefore, you will need to ensure that you have a value for the Vault Secret Key for this corresponding scope.

Validations

AireFlow will perform the following validations to ensure that there are no conflicts between the existing definitions in the system and the ones that get imported.

Workflow Definitions

  • Uniqueness of task keys - The task keys present in an imported workflow definitions should be unique and not match with any existing workflow definitions in the system. The task keys should also be unique within the imported workflow definitions.
  • Valid access to the repository for the logged on user - The specified repository URL should be accessible with the given credentials or SSH Key accordingly to the Authentication type. When the Authentication type is Public, the repository should be accessible without the need for any credentials or SSH key.

Event Definition Groups

  • Uniqueness of event definition group names - The names present in the imported event definition groups should be unique and not match with any existing event definition group names in the system. The names should also be unique within the imported event definition groups.
  • Uniqueness of event definition group key - The group keys present in the imported event definition groups should be unique and not match with any existing event definition group keys in the system. The group keys should also be unique within the imported event definition groups.
  • Valid access to the repository for the logged on user - The specified repository URL should be accessible with the given credentials or SSH Key accordingly to the Authentication type. When the Authentication type is Public, the repository should be accessible without the need for any credentials or SSH key.

Required Git Folder and File Structure

In order for the import to be successful you need at least one of the following folders to be present:

  • WorkflowDefinitions
  • EventDefinitionGroups

The folder names must be spelt exactly like this. Then within these folders you must only include .json files. An example of how these should be formatted can be seen when you click export on either the Workflow Definition or Event Definition Group pages.