Uploaded image for project: 'OpenShift Windows Containers'
  1. OpenShift Windows Containers
  2. WINC-1634

CI Failure Tracker - Automated ReportPortal to Jira Bridge for QE Teams

XMLWordPrintable

    • None
    • False
    • Hide

      None

      Show
      None
    • False
    • 5
    • None
    • None
    • WINC - Sprint 285

      Overview

      New tool that automatically analyzes CI test failures from ReportPortal and creates Jira tickets for failed test cases.

      Key Features

      • One ticket per test case: Creates a single Jira ticket for each unique test (e.g., OCP-11111)
      • Multi-platform aggregation: If OCP-11111 fails on AWS, GCP, and Azure, all failures appear in ONE ticket with platform breakdown
      • Comprehensive failure links: Lists every failure instance with direct links to ReportPortal logs
      • Platform breakdown: Shows failure count per platform (AWS: 3 failures, GCP: 2 failures, etc.)
      • Version tracking: Track failures across multiple OpenShift versions (4.19, 4.20, 4.21, 4.22)
      • Team configuration: YAML-based per-team configuration (jobs, platforms, thresholds)
      • Server-side filtering: Efficient API queries with status and name filtering
      • Configurable CLI: Adjust page size, max pages, and lookback days

      Repository

      GitHub: https://github.com/rrasouli/ci-failure-tracker

      How to Use

      Installation

      git clone https://github.com/rrasouli/ci-failure-tracker.git
      cd ci-failure-tracker
      python3 -m venv venv
      source venv/bin/activate
      pip install -r requirements.txt
      

      Set Environment Variables

      h1. Required for all operations
      export REPORTPORTAL_API_TOKEN="your-reportportal-token"
      
      h1. Required only for creating tickets (not needed for --dry-run)
      export JIRA_USER="your-jira-username-or-email"
      export JIRA_API_TOKEN="your-jira-api-token"
      

      Get your Jira API token from: https://id.atlassian.com/manage-profile/security/api-tokens

      Usage Examples

      h1. Dry run - analyze failures without creating tickets
      ./ci_failure_tracker.py --team winc --dry-run --days 7
      
      h1. Create tickets for failures in last 7 days
      ./ci_failure_tracker.py --team winc --days 7
      
      h1. Fetch more launches if some are missing
      ./ci_failure_tracker.py --team winc --dry-run --days 7 --max-pages 20
      
      h1. Show all available options
      ./ci_failure_tracker.py --help
      

      Configuration

      Each team has a YAML configuration file in the teams/ directory:

      • teams/winc.yaml - WINC team configuration (example)
      • teams/template.yaml - Template for creating new team configs

      To add your team:

      1. Copy teams/template.yaml to teams/yourteam.yaml
      2. Update the configuration with your team's job patterns, versions, and platforms
      3. Run the tool with --team yourteam

      Benefits

      • Saves time: No more manual ticket creation for recurring CI failures
      • Better visibility: See all platform failures in one place
      • Consistent format: All tickets follow the same structure with links to logs
      • Configurable: Each team can customize thresholds, versions, and platforms
      • Reduces noise: Only creates tickets when failures exceed threshold

      Documentation

      Full documentation: https://github.com/rrasouli/ci-failure-tracker/blob/master/README.md

      Next Steps

      • Try the tool with --dry-run to see what tickets would be created
      • Review the output and adjust thresholds in your team config
      • Run without --dry-run to create actual tickets
      • Set up periodic runs (cron job or Prow periodic) for continuous tracking

      Support

      For questions or issues:

              rrasouli Aharon Rasouli
              rrasouli Aharon Rasouli
              None
              None
              None
              None
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated: