The following plugin provides functionality available through Pipeline-compatible steps. Read more about how to integrate steps into your Pipeline in the Steps section of the Pipeline Syntax page.

For a list of other such plugins, see the Pipeline Steps Reference page.

ServiceNow CI/CD Plugin

snActivatePlugin: SN: Activate plugin

  • credentialsId : String (optional)
    User name and password defined in global credentials (credentials ID is required here).
    This field cannot be empty. It doesn't use global settings from ServiceNow Parameters.
  • apiVersion : String (optional)
    Optional. Version of the endpoint to access. For example, v1 or v2. Only specify this value to use an endpoint version other than the latest.
  • pluginId : String (optional)
    Unique identifier of the plugin. You can locate this identifier on the Plugins page within the card of the desired plugin; identified with the name "ID".
  • url : String (optional)
    ServiceNow instance url. This field cannot be empty. It doesn't use global settings from ServiceNow Parameters.

snApplyChanges: SN: Apply changes

  • credentialsId : String (optional)
    User name and password defined in global credentials (credentials ID is required here) used for the instance (usually where the application will be published).
  • apiVersion : String (optional)
    Optional. Version of the endpoint to access. For example, v1 or v2. Only specify this value to use an endpoint version other than the latest.
  • appScope : String (optional)
    Required if application system ID is not specified. The scope name of the application for which to apply the changes, such as x_aah_custom_app. You can locate this value in the scope field in the Custom Application [sys_app] table.
  • appSysId : String (optional)
    Required if application scope is not specified. The system id of the application for which to apply the changes. You can locate this value in the Sys ID field in the Custom Application [sys_app] table.
  • branchName : String (optional)
    Name of the branch in the source control system from which to acquire the application.
  • url : String (optional)
    ServiceNow instance url (usually where the application will be published to).

snBatchInstall: SN: Batch install

  • credentialsId : String (optional)
    User name and password defined in global credentials (credentials ID is required here) used for the instance where the application will be installed.
  • apiVersion : String (optional)
    Optional. Version of the endpoint to access. For example, v1 or v2. Only specify this value to use an endpoint version other than the latest.
  • batchName : String (optional)
    Required. User specified descriptive name for this batch request.
  • file : String (optional)
    Name of the batch file with json manifest. If only a name is given or relative path then the file will be searched in WORKSPACE directory of the build.

    The field is required if Use file is checked. If the field is not changed default value will be used: now_batch_manifest.json.

  • notes : String (optional)
    User specified additional notes about the batch install plan.

    Default: null

  • packages : String (optional)
    Required. JSON array, where each object specifies details of a package to install.
            
        [{
            "id": "String",
            "load_demo_data": Boolean,
            "notes": "String",
            "requested_customized_version": "String",
            "requested_version": "String",
            "type": "String"
        }]
            
        
    id Required. Sys_id of the application or identifier of the plugin to install.
    load_demo_data Flag that indicates whether demo data is loaded when installing the package.
    Valid values:
     true: Demo data should be loaded.
     false: Demo data should not be loaded.
    Default: false
    notes User specified notes about the package.
    Default: null
    requested_customized_version Only applicable when packages.type is set to application. Version of the store application customization package to install, such as 1.0.2 or 2.3.
    requested_customized_version Only applicable when packages.type is set to application. Version of the store application customization package to install, such as 1.0.2 or 2.3.

    Default: None. If this is not set, then the system does not look for customizations for the application.
    requested_version Required if type is set to application; ignored if set to plugin. Version of the package to install, such as 1.0.2 or 2.3.
    type Required. Type of package.
    Valid values:
    • application
    • plugin
  • url : String (optional)
    ServiceNow instance url where the application will be installed.
  • useFile : boolean (optional)
    Specifies if manifest json file will be used to define the batch. The file can be stored in git repository (in this case SCM should be configured).

    Default: false

snBatchRollback: SN: Batch rollback

  • credentialsId : String (optional)
    User name and password defined in global credentials (credentials ID is required here).
    If ServiceNow Parameters are used, then credentials for installation instance will be used.
  • apiVersion : String (optional)
    Optional. Version of the endpoint to access. For example, v1 or v2. Only specify this value to use an endpoint version other than the latest.
  • rollbackId : String (optional)
    Unique identifier (sys_id) of the rollback installed before.
  • url : String (optional)
    ServiceNow instance url where the batch of packages was installed.

    If ServiceNow Parameters are used, then the URL of installation instance will be used.

snInstallApp: SN: Install application

  • credentialsId : String (optional)
    User name and password defined in global credentials (credentials ID is required here) used for the instance where the application will be installed.
  • apiVersion : String (optional)
    Optional. Version of the endpoint to access. For example, v1 or v2. Only specify this value to use an endpoint version other than the latest.
  • appScope : String (optional)
    Required if application system ID is not specified. The scope name of the application for which to apply the changes, such as x_aah_custom_app. You can locate this value in the scope field in the Custom Application [sys_app] table.
  • appSysId : String (optional)
    Required if application scope is not specified. The system id of the application for which to apply the changes. You can locate this value in the Sys ID field in the Custom Application [sys_app] table.
  • appVersion : String (optional)
    Version of the application to install. If empty, the published version will be used.
  • baseAppAutoUpgrade : boolean (optional)
    Only applicable if Application Customization is active and the associated application is a higher version than the currently installed version. Flag that indicates whether the associated base application should be automatically upgraded to a newer version.

    Valid values:
    • true: Automatically upgrade the associated application when a newer version becomes available.
    • false: Upgrades need to be explicitly installed.

    Data type: Boolean

    Default: false
  • baseAppVersion : String (optional)
    Only applicable if Application Customization is active. Version of the base application on which to apply the customizations. A base application is any third-party application that comes in the ServiceNow Store.

    Data type: String

    Default: If the version field in the associated Custom Application [sys_app] or Store Application [sys_store_app] table is set, then that value is used. If the version field is not set.
  • url : String (optional)
    ServiceNow instance url where the application will be installed.

snInstanceScan: SN: Instance scan

  • credentialsId : String (optional)
    User name and password defined in global credentials (credentials ID is required here) used for the instance (usually where the application will be published).
  • apiVersion : String (optional)
  • comboSysId : String (optional)
  • requestBody : String (optional)
  • scanType : String (optional)
  • suiteSysId : String (optional)
  • targetRecordSysId : String (optional)
  • targetTable : String (optional)
  • url : String (optional)
    ServiceNow instance url (usually where the application will be published to).

snPublishApp: SN: Publish application

  • credentialsId : String (optional)
    User name and password defined in global credentials (credentials ID is required here) used for the instance where the application will be published.
  • apiVersion : String (optional)
    Optional. Version of the endpoint to access. For example, v1 or v2. Only specify this value to use an endpoint version other than the latest.
  • appScope : String (optional)
    Required if application system ID is not specified. The scope name of the application for which to apply the changes, such as x_aah_custom_app. You can locate this value in the scope field in the Custom Application [sys_app] table.
  • appSysId : String (optional)
    Required if application scope is not specified. The system id of the application for which to apply the changes. You can locate this value in the Sys ID field in the Custom Application [sys_app] table.
  • appVersion : String (optional)
    Version under which to store the application. Provide 2 significant numbers separated by '.' eg. 1.0 (the third number will be automatically added with build number, what gives eg. 1.0.106).
    If the version number is passed, the publish process uses that version and updates the local application version if different. If the version number is not passed, the publish process uses the current version of the local application.
  • devNotes : String (optional)
    Developer notes to store with the application.
  • incrementBy : int (optional)
  • isAppCustomization : boolean (optional)
  • obtainVersionAutomatically : boolean (optional)
    Calculate next application version that will be published. Retrieve it in smart way using API or source control (if SCM is configured for the build). API has the highest priority, then SCM will be used.
    The value from ''Application version'' will be ignored.
  • url : String (optional)
    ServiceNow instance url where the application will be published to.

snRollbackApp: SN: Roll back application

  • credentialsId : String (optional)
    User name and password defined in global credentials (credentials ID is required here) used for the instance where the application is installed.
  • apiVersion : String (optional)
    Optional. Version of the endpoint to access. For example, v1 or v2. Only specify this value to use an endpoint version other than the latest.
  • appScope : String (optional)
    Required if application system ID is not specified. The scope name of the application for which to apply the changes, such as x_aah_custom_app. You can locate this value in the scope field in the Custom Application [sys_app] table.
  • appSysId : String (optional)
    Required if application scope is not specified. The system id of the application for which to apply the changes. You can locate this value in the Sys ID field in the Custom Application [sys_app] table.
  • rollbackAppVersion : String (optional)
    Expected rollback version. This version is compared to the version that is included in the last rollback context, if they don't match, the build step fails.
    If empty, installed version from previous step will be taken.
  • url : String (optional)
    ServiceNow instance url where the application was installed.

snRollbackPlugin: SN: Roll back plugin

  • credentialsId : String (optional)
    User name and password defined in global credentials (credentials ID is required here).
    This field cannot be empty. It doesn't use global settings from ServiceNow Parameters.
  • apiVersion : String (optional)
    Optional. Version of the endpoint to access. For example, v1 or v2. Only specify this value to use an endpoint version other than the latest.
  • pluginId : String (optional)
    Unique identifier of the plugin. You can locate this identifier on the Plugins page within the card of the desired plugin; identified with the name "ID".
  • url : String (optional)
    ServiceNow instance url. This field cannot be empty. It doesn't use global settings from ServiceNow Parameters.

snRunTestSuite: SN: Run test suite with results

  • credentialsId : String (optional)
    User name and password defined in global credentials (credentials ID is required here) used for the instance where the application will be installed.
  • apiVersion : String (optional)
    Optional. Version of the endpoint to access. For example, v1 or v2. Only specify this value to use an endpoint version other than the latest.
  • browserName : String (optional)
    Name of the browser to use to run the client test. This value must match what is specified in the scheduled client test runner. For additional information on scheduled client test runners, see Scheduled Client Test Runners.

    Valid values:

    • Any
    • Chrome
    • Firefox
    • Edge
    • IE
    • Safari
  • browserVersion : String (optional)
    Starting value of the version of the browser specified in browser_name to use to run the test. For example, if you enter "9", that would enable all 9.x.x.x versions. This value must match what is specified in the scheduled client test runner.
  • osName : String (optional)
    Name of the operating system under which to run the test suite. This value must match what is specified in the scheduled client test runner.
  • osVersion : String (optional)
    Starting value of the version of the operating system under which to run the test suite. For example, if you enter "8", that would enable all 8.x.x.x versions. This value must match what is specified in the scheduled client test. runner.
  • responseBodyFormat : String (optional)
  • testSuiteName : String (optional)
    Required if Test suite sys_id is not specified. The name of the test suite to run. This value is located in the Test [sys_atf_test_suite] table.
  • testSuiteSysId : String (optional)
    Required if Test suite name is not specified. The sys_id of the test suite to run. This value is located in the Test [sys_atf_test_suite] table.
  • url : String (optional)
    ServiceNow instance url where the application will be installed.
  • withResults : boolean (optional)
    If the checkbox is checked, then results from ServiceNow will be visible in Output Console, together with the link to the visualization on the NOW platform.

Was this page helpful?

Please submit your feedback about this page through this quick form.

Alternatively, if you don't wish to complete the quick form, you can simply indicate if you found this page helpful?

    


See existing feedback here.