Source Control integration
Summarize
Summary of Source Control Integration
The Source Control integration enables application developers on a ServiceNow non-production instance to seamlessly manage multiple versions of applications using a Git repository. This integration allows developers to import applications, pull updates, commit local changes, create tags, and maintain different application versions through branching.
Show less
Key Features
- Integration Requirements: Admin role required, network access to the Git repository, unique repository for each application, and shared credentials for developers.
- ServiceNow Studio Options: Manage repository credentials, commit changes, apply remote updates, create and switch branches, and import applications.
- Git Repository Operations: Move files, edit outside of Studio, and utilize checksum validation for file integrity checks.
- MID Server Support: Connect to repositories behind firewalls, requiring specific configuration and proxy settings.
- Source Control Operations: Includes importing applications, linking to source control, editing repository configurations, applying remote changes, and managing branches.
Key Outcomes
By integrating Source Control, ServiceNow customers can effectively manage application development, ensuring version control and collaboration among developers. The integration supports optimized loading of applications, enhances commit processes through collision avoidance, and allows for efficient management of development workflows, ultimately improving deployment practices and reducing risks in production environments.
Enable application developers to integrate with a Git Source Control repository. Save and manage multiple versions of an application from a non-production instance.
- Import applications from a Git repository.
- Pull and apply remote changes from a Git repository.
- Commit all local changes on the instance to a Git repository.
- Create tags to permanently link to a given version of an application.
- Create branches to maintain multiple versions of an application simultaneously.
Integration requirements
- The user must have the admin role.
- The non-production instance must have network access to the Git repository.
- Each application must be within its own Git repository.
- The repository user credentials must grant read and write access.
Options available from ServiceNow Studio
- Edit the application repository credentials.
- Commit all local changes on the instance.
- Apply remote changes from the repository.
- Create a branch.
- Switch branches.
- Import an application from a remote repository.
It is not recommended to use Source Control to manage applications on a production instance, deploying to production may lead to unintended consequences, see Production deployment tips. Instead, you can manage applications on a production instance using the application repository, an update set, or the ServiceNow Store. For more information about managing applications on a production instance, see Application sharing.
Options available from a Git repository
- Move application files to a different Git directory structure.
- Edit application files outside of ServiceNow Studio.
The system generates a properties text file called
sn_source_control.properties at the root level of the repository. To
move application files to a different Git directory structure, application developers can
set the path parameter to specify the subfolder path containing their
application files. For example, if you moved your application to the
src/app subfolder, set the path to
path=src/app.
- Creates upgrade log entries for each sanitization action taken.
- Removes unsupported folders and files from the repository.
- Aborts all Source Control operations when a system application file fails XML schema validation. For example, if a database dictionary record fails XML schema validation, the system aborts all operations.
- Skips the current Source Control operation when a non-system application file fails XML schema validation.
The Source Control integration sanitizes only content within the application path listed in the sn_source_control.properties file. Repository content outside the application path is ignored.
MID Server support
Use an existing MID Server to connect to a Source Control repository. Linking or importing an application through a MID Server enables access to repositories behind a firewall.
Configure MID server for source control integration
Configure a MID server for Source Control Integration to enable communication and the movement of data between a ServiceNow instance and external applications, data sources, and services.
- Add "bundle" extension to glide.attachment.extensions properties.
- If the MID Servers must go through a proxy to access the remote git repository, do as
follows:
- Add the following line to agent\conf\wrapper-override.conf file:
- wrapper.java.additionial.3=-Dhttps.proxyHost=<proxyHost>
- wrapper.java.additionial.4=-Dhttps.proxyPort=<proxyPort>
- Restart the MID
- Add a new entry in "MID Security Policy":
- Name: <proxy host name>
- Check "Active" only
Denoise source control commits
Skip unloading into XML files of noisy update fields for any metadata record in source control.