Integrating your MettleCI Workbench with ServiceNow will enable you to link every DataStage Git commit to one or more ServiceNow work items directly within the Workbench user interface.
Register Workbench as an OAuth2 ServiceNow Application
Setup OAuth in ServiceNow in your ServiceNow instance.
Create a new OAuth API endpoint for Workbench to access ServiceNow:
Set the “Name” Field to “MettleCI Workbench” and the “Redirect URL” to
https://<workbench url>:8080/api/auth/delegated/service_now
and click “Submit”:
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.Click on your newly created Application Registration:
Note down the “Client ID” and “Client Secret” field properties for later use:
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.Change the
issueManagement
property toserviceNow
, add anserviceNow
section as shown below and replace the<tags>
with the values noted in the previous steps:issueManagement: serviceNow serviceNow: url: <your ServiceNow instance URL> clientId: <your Client ID> clientSecret: "<your Client Secret>"
Add at least one ServiceNow Table to search during Work Item lookup:
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 thecolumn_name
.
For example, the following configuration can be used to first lookup Incident and then Problem Tables as provided in default ServiceNow configurations: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}"
Restart the workbench service
sudo service dm-mettleci-workbench restart
ServiceNow work items will be available from the the Issues drop down during Check-in: