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 (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.
    • Type: String
  • apiVersion (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.
    • Type: String
  • pluginId (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".
    • Type: String
  • url (optional)
    ServiceNow instance url. This field cannot be empty. It doesn't use global settings from ServiceNow Parameters.
    • Type: String

snApplyChanges: SN: Apply changes

  • credentialsId (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).
    • Type: String
  • apiVersion (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.
    • Type: String
  • appScope (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.
    • Type: String
  • appSysId (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.
    • Type: String
  • branchName (optional)
    Name of the branch in the source control system from which to acquire the application.
    • Type: String
  • url (optional)
    ServiceNow instance url (usually where the application will be published to).
    • Type: String

snBatchInstall: SN: Batch install

  • credentialsId (optional)
    User name and password defined in global credentials (credentials ID is required here) used for the instance where the application will be installed.
    • Type: String
  • apiVersion (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.
    • Type: String
  • batchName (optional)
    Required. User specified descriptive name for this batch request.
    • Type: String
  • file (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.

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

    Default: null

    • Type: String
  • packages (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
    • Type: String
  • url (optional)
    ServiceNow instance url where the application will be installed.
    • Type: String
  • useFile (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

    • Type: boolean

snBatchRollback: SN: Batch rollback

  • credentialsId (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.
    • Type: String
  • apiVersion (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.
    • Type: String
  • rollbackId (optional)
    Unique identifier (sys_id) of the rollback installed before.
    • Type: String
  • url (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.

    • Type: String

snInstallApp: SN: Install application

  • credentialsId (optional)
    User name and password defined in global credentials (credentials ID is required here) used for the instance where the application will be installed.
    • Type: String
  • apiVersion (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.
    • Type: String
  • appScope (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.
    • Type: String
  • appSysId (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.
    • Type: String
  • appVersion (optional)
    Version of the application to install. If empty, the published version will be used.
    • Type: String
  • baseAppAutoUpgrade (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
    • Type: boolean
  • baseAppVersion (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.
    • Type: String
  • url (optional)
    ServiceNow instance url where the application will be installed.
    • Type: String

snInstanceScan: SN: Instance scan

  • credentialsId (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).
    • Type: String
  • apiVersion (optional)
    • Type: String
  • comboSysId (optional)
    • Type: String
  • requestBody (optional)
    • Type: String
  • scanType (optional)
    • Type: String
  • suiteSysId (optional)
    • Type: String
  • targetRecordSysId (optional)
    • Type: String
  • targetTable (optional)
    • Type: String
  • url (optional)
    ServiceNow instance url (usually where the application will be published to).
    • Type: String

snPublishApp: SN: Publish application

  • credentialsId (optional)
    User name and password defined in global credentials (credentials ID is required here) used for the instance where the application will be published.
    • Type: String
  • apiVersion (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.
    • Type: String
  • appScope (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.
    • Type: String
  • appSysId (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.
    • Type: String
  • appVersion (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.
    • Type: String
  • devNotes (optional)
    Developer notes to store with the application.
    • Type: String
  • incrementBy (optional)
    • Type: int
  • isAppCustomization (optional)
    • Type: boolean
  • obtainVersionAutomatically (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.
    • Type: boolean
  • url (optional)
    ServiceNow instance url where the application will be published to.
    • Type: String

snRollbackApp: SN: Roll back application

  • credentialsId (optional)
    User name and password defined in global credentials (credentials ID is required here) used for the instance where the application is installed.
    • Type: String
  • apiVersion (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.
    • Type: String
  • appScope (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.
    • Type: String
  • appSysId (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.
    • Type: String
  • rollbackAppVersion (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.
    • Type: String
  • url (optional)
    ServiceNow instance url where the application was installed.
    • Type: String

snRollbackPlugin: SN: Roll back plugin

  • credentialsId (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.
    • Type: String
  • apiVersion (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.
    • Type: String
  • pluginId (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".
    • Type: String
  • url (optional)
    ServiceNow instance url. This field cannot be empty. It doesn't use global settings from ServiceNow Parameters.
    • Type: String

snRunTestSuite: SN: Run test suite with results

  • credentialsId (optional)
    User name and password defined in global credentials (credentials ID is required here) used for the instance where the application will be installed.
    • Type: String
  • apiVersion (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.
    • Type: String
  • browserName (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
    • Type: String
  • browserVersion (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.
    • Type: String
  • osName (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.
    • Type: String
  • osVersion (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.
    • Type: String
  • responseBodyFormat (optional)
    • Type: String
  • testSuiteName (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.
    • Type: String
  • testSuiteSysId (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.
    • Type: String
  • url (optional)
    ServiceNow instance url where the application will be installed.
    • Type: String
  • withResults (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.
    • Type: boolean

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.