Enable application developers to integrate with a GIT source control repository. Save
and manage multiple versions of an application from a non-production instance.
Linking an application to source control allows all application developers on a
non-production instance to:
- 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
To link an application to source control:
- 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.
Note: All application developers on the instance share a single set of credentials per
repository.
Options available from Studio
After linking an application to source control, application developers can use
Studio to manage the repository. From
Studio, developers can:
- 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.
Source control integration does not support managing applications on a production instance.
Instead, 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
ServiceNow offers limited support for modifying linked application
files outside of an instance. From GIT, developers can:
- Move application files to a different GIT directory structure.
- Edit application files outside of 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
.
The system generates a
checksum.txt file in the GIT repository to
determine if any application files have been changed outside of
Studio. When
the checksum value from the file matches the current checksum value, the integration skips
the validation and sanitization process. When the checksum values do not match, the
integration validates and sanitizes the application files as part of the source control
operation. The sanitization process:
- 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 only sanitizes 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.