Files
EventHubBack/scripts/fetch-ci-report.sh
T
aleksey 3c2c33f83b feat(ci-reports): publish report.tar.gz archive for offline download
Pack HTML report after publish; link archive in run index and CI log.
Add fetch-ci-report.sh helper for agent curl/extract.

[skip ci]
2026-07-28 13:52:01 +03:00

26 lines
803 B
Bash

#!/usr/bin/env bash
# Download CI report archive from ci-reports server and extract for agent/offline analysis.
# Usage: fetch-ci-report.sh <report.tar.gz URL> [out_dir]
# Example:
# bash scripts/fetch-ci-report.sh \
# 'https://ci-reports.ift.eventhub.local/EventHubFront/40/allure-ift/report.tar.gz' \
# ./.tmp-ci-report
set -euo pipefail
URL="${1:?report.tar.gz URL}"
OUT="${2:-./ci-report-archive}"
CURL=(curl -fsSL)
if [[ "${CI_REPORTS_INSECURE:-}" == "1" ]]; then
CURL+=( -k )
fi
mkdir -p "${OUT}"
ARCHIVE="${OUT}/report.tar.gz"
"${CURL[@]}" "${URL}" -o "${ARCHIVE}"
rm -rf "${OUT}/contents"
mkdir -p "${OUT}/contents"
tar -xzf "${ARCHIVE}" -C "${OUT}/contents"
echo "Archive: ${ARCHIVE}"
echo "Extracted: ${OUT}/contents"
echo "Allure index (if present): ${OUT}/contents/index.html"