Welcome to Deployer - created and maintained by Sascha Wildgrube.
The Deployer app provides several tools to support a fully automated CICD pipeline. Its capabilities can be used on target instances for deplyoments - that is the instances to which apps are to be deployed - and on the instance that orchestrates the CICD process.
The "CICD Instance" is an instance that is used to run and operate CICD pipeline automation tools - a control tower.
Repository Credentials need be configured so that the Deployer can access a public or internal source control system based on the repository url alone. Repository Credentials allow to map credential records with specific repository urls or just fractions of urls to cover multiple repositories.
The Repository App Status feature can be used to analyse a given repository and check its readyness for deployment. To access the repositories, the Repository Credentials must be configured.
Target Instances need be configured to enable deployments of applications to these instances. The exact steps performed during a deployment can be configured for each Target Instance - e.g., whether to execute the default ATF Test Suite of each installed application and whether CodeSanity checks should be performed during deployment.
Deployments represent the specific deployment of an application (and its dependencies) in a given version to a specified Target Instance. As of now Deployer does not conduct any deployment activities itself - it only provides a task list - but stay tuned!
The "Target Instance" is an instance to which applications are to be deployed.
The Deployer app exposes a REST API to check the status of the target instance and to execute the installation scripts of an application and all of its dependencies in the correct order.
Deployer is NOT an officially supported ServiceNow product.
Deployer does NOT come with any kind of warranty. If you use it, you own it!
x_snc_devtools.InstallApp("x_snc_deployer");
x_snc_devtools.InstallApp("x_snc_deployer");
Controls if the Deployer application and its REST APIs are active.
Controls the verbosity of log output produced by the Deployer application.
A Deployer admin user has access to all configuration and process assets of the Deployer application. The role contains the deployer manager role.
The api user is entitled to execute REST API calls against the REST APIs exposed by the Deployer app.
A Deployer manager user can trigger deployments and has read access to all configuration assets and the source control based dependency tree.
A Deployer viewer user has read access to the Deployer configuration assets and has access to the source control-derived dependency tree of a given application.
The API provides endpoints to be used while installing applications.
Method: GET
URI: /api/x_snc_deployer/target/get_status
Executes the AppInstall() functions of the given app and its dependencies.
Method: GET
URI: /api/x_snc_deployer/target/run_install_scripts
Refreshes the status of the current application by creating a new status record.
Displays a wiki-formatted task list for the deployment.
Validates if the instance is configured correctly and if it is up and running.
Displays the dependency tree.
Retrieves information about the app's dependencies to other apps and required versions.
Gets a system property of this application.
This script installs Deployer.
Sets all system properties to default values.
Sets a system property of this application.
Removes all fields from a package record object that are not required for preparing and executing deployments.
Produces a log output in the application log using the DevTools Debug function.
Implements the extension point for DevTools.
The function DevToolsGetApplicationStatus is called by the DevTools extension point instance class and returns the application status object with additional status information to be displayed on the "DevTools Application Overview" page.
The DevToolsGetFormatConfig function is called by the DevTools extension point instance class and returns an object with field formatting information.
The function DevToolsGetInstancePipelineName is called by the DevTools extension point instance class and returns the pipeline name of an instance based on the given actual name.
The DevToolsGetLinkDirectory function is called by the DevTools extension point instance class and returns an extended (or modified) link directory object that serves as the basis for the DevTools Link page.
The DevToolsGetParentRecord function is called by the DevTools extension point instance class and returns a parent record for the given record if it can be determined.
The function DevToolsRenderDebugDump is called by the DevTools extension point instance class and returns additional debug information provided by the application.
Returns the array of applications from an instance.
Retrieves an array of objects representing the applications available on the target instance.
Retrieves a credential record for the given repository based on the configured Repository Credential records. If no match is found or no valid repository url is provided, the function returns false.
Returns the status object including the required deployment tasks based on the given status and instance objects.
Returns the latest available dependency list for the given repository and version or false if no status is available.
Returns an object containing the latest available dependency list and tree for the given repository and version or false if no status is available.
Returns the latest available dependency tree for the given repository and version or false if no status is available.
Returns an array of objects representing the packages representing the dependency list based on the given repository url and the desired version.
Returns the dependency tree based on the given repository url and the desired version.
Returns the type identifier for a given repository url. The function returns false of the type could not be determined.
Returns true if the application is active, otherwise false.
Returns if the given branch name indicates whether the branch is deployable. The branch must either be named "master" or contain a semantic version.
Produces a log output in the application log.
Produces an error log output in the application log.
Produces a warning log output in the application log.
The class acts as an interface to source control repositories in GitHub or GitLab.
Triggers the background process to create a new repository application status based on a given repository url and version.
Returns true if the given instance is correctly configured and accessible.
Copyright 2023 by Sascha Wildgrube
Licensed under the Apache License, Version 2.0 (the "License")
You may not use Deployer except in compliance with the License.
You may obtain a copy of the License at: https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
First baselined version