There are a few simple steps to get GitLab Issue Lookup working in MettleCI Workbench:
Register your MettleCI Workbench public SSH key with GitLab
Ensure your the public SSH key from the DataStage Engine running MettleCI Workbench has been registered with your GitLab instance. You can do this by following the instructions here.
Register MettleCI Workbench as an GitLab Application
Register your Engine’s MettleCI Workbench instance as an authorised Application in GitLab.
Got to the menu icon select Admin
Select Applications then New application
Name your application logically so GitLab administrators understand its function. Something like MettleCI Workbench {EngineName} might be a good example.
For your Redirect URI start by enter a URL following the example given below (substituting your DataStage Engine URI to appropriate values)
http://your-engine.your-org.com:PORT/api/auth/delegated/2
e.g
http://demo115-engn.dm-demo-datastage.datamigrators.io:8080/api/auth/delegated/2
Ensure the following checkboxes are selected:
Trusted
Confidential
Expire access tokens
Scopes
API
openid
For example…
Click Save application and you’ll be presented with information about your registered Application.
You should keep this window open, to support you during the next configuration step, as…
You’ll need to copy and paste the Application ID and Secret values into the MettleCI Workbench, and
You may need to edit the GitLab Application Callback URL, depending upon what Workbench tells you in later configuration steps
Configure your GitLab Issue Lookup in Workbench
You’ll need to register your GitLab instance as an Issue lookup source in MettleCI Workbench.
Select Issue Management from the Profile icon in the top-right of the Workbench window.
On the resulting page click the [+] icon, in the top-right, to add a new issue management system.
Select GitLab as your Issue Management Type, then Next.
On the next page enter
A Name that will help you uniquely identify your GitLab instance,
The URL of your GitLab instance
The Application ID and Secret values you were presented by GitLab in the previous configuration step
Once complete, click Next. You’ll be presented with your list of registered Issue Management Systems including your newly-defined GitLab instance
At this point you must check that the Callback URL presented on this page matches the Callback URL shown against your registered Application in GitLab.
The value presented by Workbench takes precedence, so if the values don’t match return to GitLab and Edit the Application definition to update the Callback URL with the value presented by Workbench.
Associate it with a MettleCI project
Select Manage Projects from the Profile icon in the top-right of the Workbench window.
Select the pencil icon alongside the DataStage project with which you wish to use GitLab issue lookup
At the bottom of the project configuration page select your newly-defined GitLab Issue management Service then click Update Project.
Test your GitLab Issue Lookup is working by Workbench
Now test your GitLab Issue Lookup has been configure you can test that it’s working in MettleCI Workbench.
Navigate to the Commit/Check-in page of the MettleCI Workbench
Type some text (minimum 3 characters) that matches title of one or more GitLab issues in your integrated GitLab instance. Matching issues will be presented as options in a drop-down menu.
Select the issue(s) you wish to associate with your commit and they’ll be added to the Work item(s) field