US1_getResults.sh

This guide explains how to configure the US1_getResults.sh script to extract code-to-ticket information from Git and update your SeaLights TGA report.


Required Variables

  • SEALIGHTS_API_TOKEN: Your SeaLights API token (securely store it with a Secret Manager if possible).

  • DOMAIN: Your SeaLights domain (e.g., yourdomain.sealights.co).

  • DAYS_BACK: Number of days back to analyze code changes (e.g., 30).

  • OUTPUT_FOLDER: Path where results will be saved (default is current directory).

  • KEY_PATTERN_REGEX: Regular expression to match ticket IDs in Git commit comments (e.g., JIRA-[0-9]+).

  • HIGHEST_PATTERN_REGEX: Keyword indicating critical code (default is Critical).

  • UPDATE_LATEST_TGA: Set to true to update existing TGA reports with latest builds.

  • CREATE_NOT_EXIST_TGA_DAYS: Days back to create TGA reports for missing apps.

  • APPLICATION_LIST: JSON array defining applications to analyze:

    • appName: Application name in SeaLights.

    • branchName: Branch name in SeaLights.

    • base_url: SSH base URL for repos or components.

    • repoName: Repo name for single components (empty for integration builds).

Optional Variables

  • GIT_KEYFILE: Path to a temporary Git SSH key file (if not using default SSH keys).

  • REPO_MAP: Map component names to different base URLs or repo names (uncomment and update if needed).


Customization and Tips

  • Update regular expressions according to your ticket ID format and critical code keywords.

  • Consider environment variables for sensitive information like API tokens.

  • Adjust DAYS_BACK and CREATE_NOT_EXIST_TGA_DAYS based on your data retention needs.

  • Add more applications to the APPLICATION_LIST as needed.

  • Modify the script logic and variables for specific workflows.

Last updated