Source control
Ivanti Automation 2021.2 introduces a new Global Setting where a GitHub/GitLab connection can be configured. Version 2021.2 supports GitHub only. Versions 2021.3 and newer also support GitLab. Version 2021.4 adds support for GitLab local servers.
When using GitHub/GitLab, Console users with write access to the Library section will be able to export the current configuration to GitHub/GitLab source control.
Given the dependency relation between Resources, Modules, Projects, and Run Books, when an object is pushed into source control, a building block containing all its dependencies will actually be pushed.
For example: A Project that references two Modules needs to be pushed to source control. Perhaps those two Modules reference various tasks, some of which also reference Resources. In this case, three files will be pushed to source control: The XML file containing the definition of the Project and the two Modules, the XBB file containing the referenced Resources, and a TXT file containing the building block key.
If the source control proxy server is different than the system proxy configuration, see the ProxySettings section in the Registry settings topic for information on specifying custom proxy settings.
Configuration
Source Control can be configured from Global Settings (under Other > Git Setup) and also at the object level. Available configuration options are:
-
Connect to: Select what source control system to be used. Available options are GitHub and GitLab.
-
URL: Enter the URL to the repository. E.g.: https://github.com/<owner or organization>/<repository>. The URL must begin with either https://github or https://gitlab. Note that the connectivity test will not work if the repository exists but there is nothing in it. Please add a README file from the web interface of the source control system.
-
Token: Specify the access token for the selected source control system. If multiple accounts are contributing to source control content, use per user token on object level, after unchecking the option to Use Global Settings.
-
Branch: Select one of the available branches from the previously defined repository.
-
Path: Optionally, a path can be configured so that the objects are placed in a folder specified here. As of 2021.3, right-clicking an empty Path field automatically fills in the current Console path. The Path field is disabled if the Use default path option is selected. Note that this field is case sensitive. Eg: if you want to replicate the same folder structure as in the Console, and you have Module1 in Folder1/SubFolder1, configure “Path:” with “Modules/Folder1/SubFolder1”. Best practice is to have this configured on demand, on the object level.
IMPORTANT: Because the path is case-sensitive, “Modules/Folder1/SubFolder1” is different than “modules/folder1/subfolder1”. -
Author: Optionally, configure the author of the commits.
-
Email: Optionally, configure the email of the author of the commits.
-
Skip resources: Controls whether the resources (the XBB file) should be pushed in source control as part of the Building Block.
-
Use default path: Allows the Console to automatically push the current configuration into a path in Source Control that reflects the path in the Console. This is useful if the Console user wants to keep the same folder structure as in the Library sections. If the current folder path does not exist, the Console will create it in source control. Selecting this option disables the Path field.
-
Use the Test button to check the connectivity to the configured source control system. If the test was OK, the settings can be saved.
To commit a Resource/Module/Project/Run Book version in source control, open the object and go to the Source Control tab. If no Path is configured, the current configuration will be committed in the form of the Ivanti Automation building block in the root location of the repository.
A set of XML, XBB (if resources are involved) and a TXT file will be uploaded in Source Control. The name of the files will be the GUID of the object to be committed. E.g.: If the Module to be committed has GUID “{8B886022-A482-4C67-ACD3-FD0EDFB7B820}”, then {8B886022-A482-4C67-ACD3-FD0EDFB7B820}.XML, {8B886022-A482-4C67-ACD3-FD0EDFB7B820}.XBB and {8B886022-A482-4C67-ACD3-FD0EDFB7B820}.TXT will be uploaded to source control.
IMPORTANT: if the object is moved in the Folder structure in the Library section, its mapping on the source control system is not lost because its GUID does not change.
All available commits, based on the configured connection settings, are listed in the Source Control tab.
IMPORTANT: if the configured connection settings are changed, the list of commits will reflect the available commits in source control based on the new connection settings.
Once content has been committed, Console users can:
-
Revert to one of the versions
-
Export the files from a particular version to local disk for further analysis
-
Open the commit in the browser
-
Copy the commit SHA string to clipboard for later use in the web interface of the Source Control system.
IMPORTANT: Source control systems are not designed to act like a file sharing system. Because of this and the fact that Ivanti Automation has the possibility to store Resources in the database, when such Resources are used/referenced in a Module/Project/ Run Book, the commit will also contain them (its just like when the Console is used to export a building block). If the combined Resources size is above 100MB, a message is presented to the user to confirm the commit. Depending on the size of the resulting XBB file, it can take some time to push the new file to source control.
Also, when the resulting XBB file is larger than 50MB, the file will be divided into 10MB files, to avoid conflicts/limitations with/of the Source Control system.