Granting Azure DevOps Git repository access to Workbench
Log onto the server hosting MettleCI Workbench and navigate to
/opt/dm/mci/
Open the public Git SSH key
workbench_rsa.pub
in your favorite text edit and copy its contents:This file is automatically generated and configured during MettleCI workbench installation.
Following “Step 2: Add the public key to Azure DevOps Services/TFS” of the Azure DevOps instructions to set up SSH Key Authentication
Register Workbench as an OAuth 2.0 Azure Application
Prerequisite
In order for MettleCI Workbench and Azure DevOps to communicate, work bench needs to be accessible using an HTTPS based URL. This URL does not have to be accessible outside your corporate network.
Please refer to the MettleCI FAQ for configuring Workbench to use HTTPS
Follow Microsoft’s instructions for registering a new app with Azure. Use the following settings:
Note down the “Application (client) ID” and Directory (tenant) ID for later use:
Navigate to the “Authentication” section of your application registration and add a Redirect URI for workbench using the
https://<workbench url>:8443/api/auth/delegated/azure_access
and click saveIf your organization has installed multiple MettleCI Workbench application, you can add them all to the same Azure App Registration by adding multiple Redirect URIs.
Navigate to the “Certificates & Secrets” section of your application registration and add a “New Client Secret”, select an expiry (Never is convenient) and note down the generated secret for later use:
Navigate to the “API permissions” section of your application registration, click “Add a permission” and select “Azure DevOps” → “user_impersonatation”:
Log into your MettleCI Workbench server an open
/opt/dm/mci/config.yml
in your favorite editorChange the
issueManagement
property toazure
, add anazure
section as shown below and replace the<tags>
with the values noted in the previous steps:Code Block language yaml issueManagement: azure azure: tenant: <your Directory (tenant) ID> clientId: <your Application (client) ID> clientSecret: "<your client secret>"
Restart the workbench service
Code Block language bash sudo service dm-mettleci-workbench restart
Azure Work Items will be available from the the Issues drop down during Check-in: