...
On any secure machine with openssl
installed (It is easiest doing this directly on your DataStage Engine where MettleCI Workbench is installed)…
Generate a 1024-bit private key:
jira_privatekey.pem
Code Block $> openssl genrsa -out jira_privatekey.pem 1024 Generating RSA private key, 1024 bit long modulus .......++++++ ..++++++ e is 65537 (0x10001) $>
Create an X509 certificate:
jira_publickey.cer
Code Block $> openssl req -newkey rsa:1024 -x509 -key jira_privatekey.pem -out jira_publickey.cer -days 3650 You are about to be asked to enter information that will be incorporated into your certificate request. What you are about to enter is what is called a Distinguished Name or a DN. There are quite a few fields but you can leave some blank For some fields there will be a default value, If you enter '.', the field will be left blank. ----- Country Name (2 letter code) [XX]:AU State or Province Name (full name) []:Victoria Locality Name (eg, city) [Default City]:Melbourne Organization Name (eg, company) [Default Company Ltd]:Data Migrators Pty Ltd Organizational Unit Name (eg, section) []:MettleCI Common Name (eg, your name or your server's hostname) []:myhost.datamigrators.io Email Address []:admin@mettleci.com $>
Extract the private key (PKCS8 format) to a ‘pkcs8’ file:
jira_privatekey.pkcs8
Code Block $> openssl pkcs8 -topk8 -nocrypt -in jira_privatekey.pem -out jira_privatekey.pkcs8 $> ll jira_* -rw-r--r-- 1 mciworkb dstage 916 Aug 2 15:10 jira_privatekey.pkcs8 -rw-r--r-- 1 mciworkb dstage 887 Aug 2 15:05 jira_privatekey.pem -rw-r--r-- 1 mciworkb dstage 1224 Aug 2 15:08 jira_publickey.cer $>
Extract the public key from the certificate to a ‘pem’ file:
jira_publickey.pem
file:Code Block $> openssl x509 -pubkey -noout -in jira_publickey.cer > jira_publickey.pem $>
Ensure all files are owned by the account used to execute the MettleCI Workbench service:
Code Block $> chown mciworkb jira_* $>
Step 2 - Creating a Jira Application Link
These steps are geared specifically towards Workbench. Atlassian’s own documentation is under the Create an application link section of this page: https://developer.atlassian.com/server/jira/platform/oauth/
Start by going to the Application links option (under Integrations) of your Jira Administration area.
In the field at the top (under Configure Application Links) enter your MettleCI Workbench URL including protocol and port number (e.g.
https://my-engine.company-intranet.com:8443
) and click Create new linkOn the Configure Application URL window you can leave the default New URL as proposed by Jira (usually identical to the Entered URL). You can safely ignore the ‘No response was received…’ message and click Continue.
On the next window enter the Application Name
Check the Create incoming link checkbox
Status colour Red title IMPORTant! Note that we will enter a value for Consumer key later on - but not in this dialog
Click Continue (ensure you leave the other fields blank)
On the next dialog enter …
A random value for Consumer Key (this is just an arbitrary value to uniquely identify this Application Link),
The Consumer Name (e.g. ‘MettleCI Workbench’ without quotes), and
The Public Key (i.e. the contents of
jira_publickey.pem
) that will be used by your Workbench application.
Click Continue
Step 3 - Enter the credentials into workbench
...
You will now want to fill out all the details for your particular Jira Configuration.
Name | This can be anything you like but is often (and is best to use if possible) the name of the Jira project you’re connecting to. |
Jira URL | The Application URL you entered when configuring the Application Link Application in Jira If you have already configured Jira we recommend:
|
Jira Key | The Consumer Key you entered when configuring the Application Link Application in Jira. |
Consumer Secret | Copy and paste the contents of your |
Info |
---|
If you have previously configured a Jira application link then you will also find the |
...
After you’ve set this up:
Restart the Workbench service
Log into Workbench
Start to perform a check-in (the Job name isn’t important) but start to enter a valid Jira ID in the work item field.
At this point you should be prompted to permit access to Jira so click on Allow
After this you can actually cancel the check-in since its purpose was simply to complete the Workbench-to-Jira integration.
Done!