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:

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.

jira-finalizer-config.yaml#
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.

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 part of qg-config.yaml#
finalize:
  run: |
    html-finalizer
    jira-finalizer update-issues
  env:
    JIRA_USERNAME: ${{ secrets.JIRA_USERNAME }}
    JIRA_PASSWORD: ${{ secrets.JIRA_PASSWORD }}