Attaching the results of a run to a Jira Issue#
Introduction#
The Jira finalizer allows you to add comments or attach files to Jira issues based on the results of a qg run.
Use-Case#
Within this example, we will do the following:
update a Jira issue with information about the results of our run and also upload
Preparation#
Download Resources#
Please go ahead and download the following files:
Steps#
Map Issues and Requirements#
First, adjust the finalizer-config.yaml
file to connect the requirements to the issue. You can find the Jira Issue ID either in the Web UI or extract it from the issue URL:
In the example config provided, change the placeholder to include your Jira issue id.
requirements:
'1.15': # requirement ids from qg-config
issues: # A list of mapped issues that should be updated with the content of the requirement result.
- <Jira-Issue-ID>
Create Secrets#
Next, create two new secrets, as described here: Using secrets.
One secret should hold your username and
the other secret should contain either the Jira password or a personal access token that can be used instead of the password (More information regarding this can be found here: https://confluence.atlassian.com/enterprise/using-personal-access-tokens-1026032365.html)
Adjust the Config File#
Lastly, update the config file with the previously created secrets. Also make sure that you have the environment variable JIRA_API_URL
set in case you are using a different Jira instance.
finalize:
run: |
html-finalizer
jira-finalizer update-issues
env:
JIRA_USERNAME: ${{ secrets.JIRA_USERNAME }}
JIRA_PASSWORD: ${{ secrets.JIRA_PASSWORD }}