Version Control (Git)
Version Control
PhixFlow provides version control for applications, and any packages they use, using a Git repository. This allows the export and import of "snapshots", which are a specific version of an application and any packages associated with that application from specific branches within a Git repository.
Initial Setup
Local Properties File
Set where snapshots should be saved to.
- In the webapp directory on the PhixFlow Server update local.properties with a git directory path*:
- For example:
Windows:
'git.default.path=C://app//tomcat//webapps//phixflow//git'Linux:
'git.default.path=opt//phixflow//data//git'
- For example:
- Ensure the new empty directory is created
- Restart tomcat and start the PhixFlow instance for the git repository to be configured
*the git directory needs to be in a location accessible to PhixFlow, so that Tomcat is able to write to it.
Privileges and Roles
In order to take and restore snapshots, users must either:
- be an Administrator to get full access
- or, be assigned the , Git Configure, to get full access Role
- or, be assigned the relevant (s): Privilege
- Configure Git Repository
- Create Snapshot for Git
- Restore Snapshot from Git
- View Git History
Creating an Application Snapshot
These are the steps to create a snapshot version of your application. For creating a snapshot of a package, the steps are similar and can be found by right-clicking on the package in the Repository.
- Right-click on an application (or package) in the Repository and select
- In the sub-menu, choose
- On the Take Snapshot window, provide the following:
- Name: A useful name that identifies this version
- Description: A useful description that identifies this version
- Application: This is a read-only field containing the application's name
- Packages: This is a list of all packages used by the application
- These packages can be included in the snapshot by clicking the tick box
- Select Take Snapshot
Take Snapshot - On the Take Snapshot window, provide the following:
- PhixFlow will take a snapshot export of your application and save it to your Git server folder, found in the PhixFlow webapps folder
- The folder that the snapshot is saved to is the folder specified as part of the Initial Setup section above
Restoring from an Application Snapshot
- Right-click on an application (or package) in the Repository and select
- In the sub-menu, choose
- Alternatively, on the menu, select Administration, then choose either: Restore from Snapshot
- : lists all applications where a Git version has been previously created Applications
- or, : lists all packages where a Git version has been previously created Packages
- On the Restore from Snapshot window, select the version to be restored, and click Next
- Select any packages that also require restoring and click Restore
Restore from Snapshot - Alternatively, on the menu, select Administration, then choose either: Restore from Snapshot
If multiple users try to take and restore snapshots at the same time, an error message will display to try again later.