Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Integrating your MettleCI Workbench with ServiceNow will enable you to link every MettleCI Workbench to perform a dynamic lookup when linking DataStage Git commit commits to one or more ServiceNow work items directly within the Workbench user interface.

...

Register Workbench as an OAuth2 ServiceNow Application

  1. Setup OAuth in ServiceNow in your ServiceNow instance.

  2. Create a new OAuth API endpoint for Workbench to access ServiceNow:

    Image ModifiedImage Modified
  3. Set the “Name” Field to “MettleCI Workbench” and the “Redirect URL” to https://<workbench url>:8080/api/auth/delegated/service_now and click “Submit”:

    Image Modified


    If your organization has installed multiple MettleCI Workbench application, you can add them all to the same ServiceNow Application Registration by adding multiple Redirect URLs.

  4. Click on your newly created Application Registration:

    Image Modified

  5. Note down the “Client ID” and “Client Secret” field properties for later use:

    Image Modified

Configuring MettleCI Workbench Work Item Lookup with Azure DevOps

  1. Access the MettleCI Workbench page to integrate with your Azure Work Item Management system by logging in to MettleCI Workbench and select Issue Management from the Profile menu (top right)

    1. Image Added
  2. On the Registered Issue Management Systems screen select the “+” to create a new Issue Management type.. Initially you will have only the “Default Generic Issue Manager” but you can add as many as you need to (including more than one of the same type)

  3. Enter the following values and click Submit:

    Image Added
  1. Issue Management Type: Azure

  2. Name: Anything you like, but something that identifies your Azure organisational instance would be a sensible choice

  3. Tenant ID: Your Directory (tenant) ID

  4. Client ID: Your Application (client) ID

  5. Client Secret: Your client secret

  6. Restart the workbench service:

    Code Block
    $> sudo service dm-mettleci-workbench restart
  7. ServiceNow work items will be available from the the Issues drop down on the Git Commit page during Check-in:

    Image Added

For older Workbench installations prior to

  1. If you are starting Workbench for the first time, you will be taken through a setup wizard. You can configure your ServiceNow work item lookup in the setup wizard.
    Alternatively, log into your MettleCI Workbench server and open /opt/dm/mci/config.yml in your favorite editor and follow the next three steps.

  2. Change the issueManagement property to serviceNow, add an serviceNow section as shown below and replace the <tags> with the values noted in the previous steps:

    Code Block
    languageyaml
    issueManagement: serviceNow
    serviceNow:
       url: <your ServiceNow instance URL>
       clientId: <your Client ID>
       clientSecret: "<your Client Secret>"

  3. Add at least one ServiceNow Table to search during Work Item lookup:

    Code Block
    issueManagement: serviceNow
    serviceNow:
       url: <your ServiceNow instance URL>
       clientId: <your Client ID>
       clientSecret: "<your Client Secret>"
       search:
          - table: <first ServiceNow Table to search>
            id: <template string>
            summary: <template string>
          - table: <second ServiceNow Table to search>
            id: <template string>
            summary: <template string>

    During issue lookup, Workbench will search each ServiceNow Table configured in the search list. The Ids that will appear in the commit message are generated from the “id” template string and the text shown in the lookup is generated from the “summary” template strings.
    Template Strings are text containing special ${column_name} variables which work bench will replace with Column data from the ServiceNow Table based on the column_name.
    For example, the following configuration can be used to first lookup Incident and then Problem Tables as provided in default ServiceNow configurations:

    Code Block
    issueManagement: serviceNow
    serviceNow:
       url: <your ServiceNow instance URL>
       clientId: <your Client ID>
       clientSecret: "<your Client Secret>"
       search:
          - table: incident
            id: "${number}"
            summary: "${number}: ${short_description}"
          - table: problem
            id: "${number}"
            summary: "${number}: ${short_description}"
  4. Restart the workbench service

    Code Block
    sudo service dm-mettleci-workbench restart

  5. ServiceNow work items will be available from the the Issues drop down during Check-in:

    Image Modified