Set Release Blocker
Sets the "Release Blocker" custom field on a JIRA issue. Component Readiness regressions are treated as release blockers, so any bug filed for a regression should have this field set to "Approved".
See the release blocker definition for details on the criteria and process.
Prerequisites
- JIRA_API_TOKEN: Environment variable must be set with a valid JIRA API token
- JIRA_USERNAME: Environment variable must be set with your Atlassian account email
Usage
# Set Release Blocker to Approved (default)
python3 plugins/ci/skills/set-release-blocker/set_release_blocker.py OCPBUGS-76523
# Explicitly set to Approved
python3 plugins/ci/skills/set-release-blocker/set_release_blocker.py OCPBUGS-76523 --value Approved
# Set to Proposed
python3 plugins/ci/skills/set-release-blocker/set_release_blocker.py OCPBUGS-76523 --value Proposed
# Set to Rejected
python3 plugins/ci/skills/set-release-blocker/set_release_blocker.py OCPBUGS-76523 --value Rejected
# Clear the field
python3 plugins/ci/skills/set-release-blocker/set_release_blocker.py OCPBUGS-76523 --value ""
# JSON output
python3 plugins/ci/skills/set-release-blocker/set_release_blocker.py OCPBUGS-76523 --format json
JIRA Field Details
- Field ID:
customfield_10847 - Field name: Release Blocker
- Type: Select dropdown
- Options:
Approved(option ID:16772)Proposed(option ID:16773)Rejected(option ID:16774)
Output
Text format (default)
Release Blocker set to 'Approved' on OCPBUGS-76523
https://redhat.atlassian.net/browse/OCPBUGS-76523
JSON format
{
"success": true,
"issue_key": "OCPBUGS-76523",
"value": "Approved",
"url": "https://redhat.atlassian.net/browse/OCPBUGS-76523"
}
Error Handling
- If
JIRA_API_TOKENorJIRA_USERNAMEis not set, the script exits with an error message - If the API call fails, returns
success: falsewith the HTTP error details - The script verifies the update after setting it and reports the confirmed value