Your use of this download is governed by Stonebranch’s Terms of Use, which are available at https://www.stonebranch.com/integration-hub/Terms-and-Privacy/Terms-of-Use/.
Code is stored in repositories. One of the most popular source control tools is Git.
Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency.
With Universal Automation Center, you can securely automate the synchronization of your local repositories with the cloud or internal repository servers.
This integration requires a Universal Agent and a Python runtime to execute the Universal Task.
Requires Python 3.7.0 or higher. Tested with the Universal Agent bundled Python distribution.
Either:
Universal Controller Version 7.0.0.0 and later.
Git 1.7.0 or newer is required to be installed where Universal Agent is running.
The Universal Extension for Git allows you to securely sync a branch from a remote repository to a local one.
The Universal Extension for Git supports the following main features:
Cloning a repository locally if it does not exist. Otherwise, a pull request is issued to get the latest changes from the specified remote branch of the selected repository.
Authentication:
To use this downloadable Universal Template, you first must perform the following steps:
For the new Universal Task type, create a new task and enter the task-specific details that were created in the Universal Template
The input fields for this Universal Extension are described below.
Field | Input type | Default value | Type | Description |
---|---|---|---|---|
Action | Required | Checkout | Choice | Available Action is:
Checkout action clones a Git repository branch locally if the target directory pointed by Path does not exist. The new directory is named after the repository name. If the repository exist in the Path, a |
Authentication method | Required | HTTP | Choice | Available authentication methods are :
SSH authentication is available only on Linux Agents. |
Repository URL | Required | - | Text | Repository's URL:
|
Branch Name | Required | - | Choice | Branch name. A dynamic drop-down list with all the branches from the remote repository. The agent and Credentials on which the task runs on should be specified, so that it looks up the branches on the repository |
Path | Required | - | Text | Local path where the repository directory will be created. The local path resides on the execution environment of the Universal Agent. Be sure to check your access rights on this location. |
Access Token | Conditional | - | Credentials | Access Token to be used to establish a Token Based authentication. Mandatory only for HTTP/HTTPS (Access Token) authentication method. The Token field is not available on UAC7.0 or Agents 7.0. Please use the Runtime Password field to enter the Token. There is backwards compatibility from UAC7.1 to UAC7.0 |
HTTP(S) Credentials | Conditional | - | Credentials | Credentials (User/Password) to be used for HTTP or HTTPS authentication to the Repository Service. Mandatory only for HTTP/HTTPS (User and Password) authentication method |
SSH key | Conditional | - | Credentials | SSH Credentials include the Key Location of the Private Key, with chmod permission 400 and a Passphrase if set. Key Location field can be left empty only in case the user requires the key to be retrieved by the default user SSH key location (the user's .ssh folder) and the key is created without a passphrase. |
Accept Hostkey | Conditional | No | Boolean | Applicable only for SSH authentication method.
|
The output fields for this Universal Extension are described below.
Field | Type | Description |
---|---|---|
Commit id | Text | Last commit revision during the Checkout action. |
Depending on the Authentication Method (Access Token, SSH, User and Password) use the respective fields as noted in the parenthesis below. Make sure to fill the required fields(*). All fields also can be filled if required.
After pressing the search icon of branch field , and fill the fields as seen below, wait few second for the branch fields list to be populated.
The exit codes are described below.
Exit Code | Status Classification Code | Status Description |
---|---|---|
0 | SUCCESS | SUCCESS: Successful Task execution. |
1 | FAIL | FAIL: < Error Description >. |
20 | DATA_VALIDATION_ERROR | DATA_VALIDATION_ERROR: Validation error. < Error Description > |
The Extension Output for the Universal Task successful execution is described below.
{
"exit_code":0,
"status_description":"SUCCESS: Successful Execution",
"changed":false,
"invocation":{
"extension":"ue-git-new",
"version":"1.1.0",
"fields":{
"action":"checkout",
"authentication_method":"http_access_token",
"access_token_credentials":"****",
"access_token_credentials_password":"****",
"http_credentials_user":null,
"http_credentials_password":null,
"ssh_key_keyLocation":null,
"ssh_key_pasphrase":null,
"accept_hostkey":false,
"repository":"https://gitlab.com/https_clone_address",
"branch_name":"main",
"path":"path/where/repo/folder/will/be/created"
}
},
"result":{
"commit_id":"afce61fd4e66823e588e17b8571c754323ac984599"
}
}
This document references the following documents:
Name | Description |
---|---|
Universal Templates | User documentation for creating Universal Templates in the Universal Controller user interface. |
Universal Tasks | User documentation for creating Universal Tasks in the Universal Controller user interface. |