AE - How to setup Version control with Github

Document ID : KB000112059
Last Modified Date : 27/08/2018
Show Technical Document Details
Introduction:

Version Control - A new feature in Automation Engine 12.2

As a developer and object designer, you create and manage multiple versions of an object, export and import these versions to and from a remote repository, rollback changes to a previous version and have access to the Client's commit history. You can synchronize repositories across multiple nodes of a system to access your data and, simultaneously, ensure a collaborative working environment for all developers and object designers.

You can access the Version Control functionality from the Process Assembly, you can carry out the following operations:

  • Commit your changes to the remote repository
  • Merge changes made in other branches to your Client
  • Rollback to a previous version of your Client
  • Create a new branch from an existing branch
  • Pull changes that have been committed to your branch from another client.
Instructions:
1/ Set up a Github Repo
2/ Set up SSH key: Automation Engine will communication with Github via a SSH key

+ Double check your Github email: It will be used when you create your SSH key. 
User-added image

+ (Additional Information 4) Create SSH key in your Automation Engine server 
Step 1:
$ssh-keygen -t rsa -b 4096 -C "your_github_email@example.com"

Step 2:
When you're prompted to "Enter a file in which to save the key," press Enter. This accepts the default file location.
Enter a file in which to save the key (/home/you/.ssh/id_rsa): [Press enter]

Step 3:
Start the ssh-agent in the background.
$eval "$(ssh-agent -s)"

Step 4:
Add your SSH private key to the ssh-agent. If you created your key with a different name, or if you are adding an existing key that has a different name, replace id_rsa in the command with the name of your private key file.
$ssh-add ~/.ssh/id_rsa
The result if you choose default key name and folder:
User-added image

+ (Additional Information 4) Add the public key (id_rsa.pub content) to your Github account.
User-added image

3/ Automation Engine side:
Open UC_CLIENT_SETTINGS Variable and add the following keys:

+  REMOTE_REPOSITORY_URL - Setup the Github URL:
git@github.com:githubusername/yourgithubrepo.git
User-added image

+ REPOSITORY_SSH_DIR - Setup the SSH directory that have your newly created SSH key:
If this parameter is not specified, the default SSH folder of the user that start Automation Engine will be used.
In this example it will be: /home/uc/.ssh

User-added image


4/ Access the Version Control functionality from the Process Assembly and initialize your Automation Engine Client (Create Branch) 
User-added image

5/ The result in Github repo after you initialize your Automation Engine Client 
User-added image
Additional Information:
1/ In case you are using Oracle Database, make sure that ojdbc8.jar, xmlparserv2.jar,xdb6.jar is present in your lib folder of the JWP.
For more information:
https://docs.automic.com/documentation/webhelp/english/AWA/12.2/DOCU/12.2/AWA%20Guides/help.htm#Installation_Manual/AE/InstalltheAE_JWP.htm?Highlight=ojdbc 

2/ Automation Engine Version Control Reference:
https://docs.automic.com/documentation/webhelp/english/ALL/components/DOCU/12.2/AWA%20Guides/help.htm#AWA/Versioning/Versioning.htm

3/ Automation Engine key for SSH key directory:
https://docs.automic.com/documentation/webhelp/english/ALL/components/DOCU/12.2/AWA%20Guides/help.htm#AWA/Variables/UC_CLIENT_SETTINGS.htm?Highlight=REPOSITORY_SSH_DIR

4/ Create SSH key - Github guide
https://help.github.com/articles/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent/#platform-linux
https://help.github.com/articles/adding-a-new-ssh-key-to-your-github-account/