Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[6.13.z] Add support for reporting/commenting test results to the Jira issue #15274

Merged

Conversation

Satellite-QE
Copy link
Collaborator

Cherrypick of PR: #15104

What does this do?

  • This PR adds support for reporting/commenting test results to Jira based on issues referenced in the Verifies or BlockedBy doc fields.

Primary use case

  1. Add a Verifies or BlockedBy doc field to the test, mapping it to a Jira RFE/Bug. For example, :Verifies: SAT-25230 or :BlockedBy: SAT-24796.
    • For BlockedBy, the test will be collected only if the corresponding Jira issue is in the Review (ON_QA) state. This behavior can be overridden by using the --blocked-by SAT-25230 option.
  2. Set ENABLE_COMMENT to true in the jira.yaml configuration file.
  3. Use the --jira-comments pytest option.

Note:

  • To prevent accidental usage of this functionality, the user is required to perform both steps 2 and 3.(Open to suggestions)
  • By default, the comment will be added on issues in "Review" and "Release Pending" state, but this could be overridden by setting issue_status in jira.conf.

PRT example

Assuming the test has a Verifies or BlockedBy doc field set and you want to comment on issues in "New" or "In Progress" state.

trigger: test-robottelo
pytest: tests/foreman/api/test_ping.py --jira-comments
env:
    ROBOTTELO_jira__enable_comment: true
    ROBOTTELO_jira__issue_status: ['New', 'Review']

Related Issues

  • SAT-24954
  • satellite-jenkins#1341

@Satellite-QE Satellite-QE added 6.13.z Introduced in or relating directly to Satellite 6.13 Auto_Cherry_Picked Automatically cherrypicked PR using GHA No-CherryPick PR doesnt need CherryPick to previous branches labels Jun 3, 2024
@Satellite-QE
Copy link
Collaborator Author

trigger: test-robottelo
pytest: tests/foreman/api/test_ping.py --jira-comments
env:
    ROBOTTELO_jira__enable_comment: true
    ROBOTTELO_jira__comment_type: 'group'
    ROBOTTELO_jira__comment_visibility: 'Red Hat Employee'
    ROBOTTELO_jira__issue_status: ['Review', 'Release Pending']

@Satellite-QE
Copy link
Collaborator Author

PRT Result

Build Number: 7251
Build Status: SUCCESS
PRT Comment: pytest tests/foreman/api/test_ping.py --jira-comments --external-logging
Test Result : ================== 1 passed, 9 warnings in 1193.44s (0:19:53) ==================

@Satellite-QE Satellite-QE added the PRT-Passed Indicates that latest PRT run is passed for the PR label Jun 3, 2024
@ogajduse ogajduse merged commit 40ee3f2 into 6.13.z Jun 3, 2024
16 checks passed
@ogajduse ogajduse deleted the cherry-pick-6.13.z-d71f6ab20881193448346554802b94a194988ea2 branch June 3, 2024 12:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.13.z Introduced in or relating directly to Satellite 6.13 Auto_Cherry_Picked Automatically cherrypicked PR using GHA No-CherryPick PR doesnt need CherryPick to previous branches PRT-Passed Indicates that latest PRT run is passed for the PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants