Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
71 commits
Select commit Hold shift + click to select a range
f2fd34e
feat(ci): configure nested e2e cluster for nightly tests
universal-itengineer Nov 26, 2025
47612d0
change token
universal-itengineer Nov 26, 2025
d19feae
fix ask fo del
universal-itengineer Nov 26, 2025
75231bc
use kubeconf
universal-itengineer Nov 26, 2025
a9ce2e5
add additional check
universal-itengineer Dec 12, 2025
880990e
add statis-cluster config
universal-itengineer Dec 15, 2025
c166ee1
test bootstrap with proxy settings in nested cluster
universal-itengineer Dec 16, 2025
cd0ad62
fix
universal-itengineer Dec 16, 2025
11a4947
static: test deploy
universal-itengineer Dec 17, 2025
d9ce80a
remove setup via dhctl cloud provider and leave only static
universal-itengineer Dec 18, 2025
dcf3c99
static: add podSubnet and service CIDR in values yaml, add labels for…
universal-itengineer Dec 19, 2025
5d209de
try dh pr17193
universal-itengineer Dec 19, 2025
b0ad906
upd info msg for virtualization module
universal-itengineer Dec 19, 2025
d1e5a90
static: refactor wf
universal-itengineer Dec 19, 2025
7d505c7
static: fix virt cert
universal-itengineer Dec 19, 2025
95afc30
static: fix msg messages, fix conditions,refactor dbg messages
universal-itengineer Dec 19, 2025
8bfb869
static: add log category, emoji in vort install
universal-itengineer Dec 19, 2025
ffcc16c
static: rename gen-sa to gen-kubeconfig, move to tools
universal-itengineer Dec 19, 2025
a9df565
static: comment https for virt, add dbg
universal-itengineer Dec 20, 2025
9deeb3a
static: add label deploy jump-his, fix d8queue
universal-itengineer Dec 20, 2025
b44d812
fix wait ceph
universal-itengineer Dec 20, 2025
87a7c20
fix sds wait
universal-itengineer Dec 20, 2025
f6e5a8e
fix
universal-itengineer Dec 20, 2025
1be70cb
static: rm cse condition
universal-itengineer Dec 21, 2025
4ce7fbb
static: fix gloabl cfg, use selfsingeg cert
universal-itengineer Dec 21, 2025
07a4043
static: rename tools to scripts
universal-itengineer Dec 21, 2025
8d656d6
static: fix condition, rename tools to scripts
universal-itengineer Dec 21, 2025
3029d9e
static: fix gen-kubecfg,edit permissions
universal-itengineer Dec 21, 2025
819e964
static: fix cfg mc global
universal-itengineer Dec 21, 2025
64a9a7d
static: clean Chart.yaml
universal-itengineer Dec 21, 2025
da2a6bd
static: fix sds conditions
universal-itengineer Dec 22, 2025
cbafd52
static: rm jump host after cluster deployed
universal-itengineer Dec 22, 2025
0fac3a3
install d8 cli via curl
universal-itengineer Dec 22, 2025
7b89879
fix loop seq
universal-itengineer Dec 22, 2025
61a6401
fix condition sds and queue script
universal-itengineer Dec 22, 2025
afcdd3a
use deckhouse main, pr17193 merged
universal-itengineer Dec 22, 2025
d1e7468
static: fix install d8, fix setup
universal-itengineer Dec 22, 2025
4645294
static: add proccesing bootstrap failed
universal-itengineer Dec 22, 2025
072742a
static: fix task show-connection-info
universal-itengineer Dec 22, 2025
3ec3770
bump helm lib to 1.65.2
universal-itengineer Dec 22, 2025
bcf4e55
static: fix loop, fix repodt
universal-itengineer Dec 22, 2025
b361f0e
static: update count of attempt for sds
universal-itengineer Dec 22, 2025
3420ed2
fix scanInterval, add if for dvcr
universal-itengineer Dec 23, 2025
a38b8b0
static: fix cond ceph and sds
universal-itengineer Dec 23, 2025
0b558b9
static: fix cond ceph linstor
universal-itengineer Dec 23, 2025
fb459c4
format yaml
universal-itengineer Dec 24, 2025
bbdad1f
change script ci
universal-itengineer Dec 24, 2025
4b10271
change virtualization tag to pr1757
universal-itengineer Dec 24, 2025
7308eaa
fix cond
universal-itengineer Dec 24, 2025
7ef1ff8
change virt tag to main
universal-itengineer Dec 24, 2025
4702363
ci: update ci for multiple storage type report, add junit xml report …
universal-itengineer Dec 24, 2025
e157255
add sc for e2e
universal-itengineer Dec 24, 2025
a6c1d39
fix run e2e
universal-itengineer Dec 24, 2025
430b9d1
fix e2e report
universal-itengineer Dec 24, 2025
1211067
add additional checks for virt
universal-itengineer Dec 24, 2025
4d53978
add info about storage setup
universal-itengineer Dec 24, 2025
933a530
try use artifact for reports
universal-itengineer Dec 25, 2025
f6da884
change wf, add prepare-report job
universal-itengineer Dec 25, 2025
6edcd58
fix report
universal-itengineer Dec 25, 2025
c221608
fix report
universal-itengineer Dec 25, 2025
51fe3d1
add timeout for checking virt-handler
universal-itengineer Dec 25, 2025
25b1d28
fix branch name in summary
universal-itengineer Dec 26, 2025
bded5c1
fix deploy template custom-certificate
universal-itengineer Dec 26, 2025
4f39ec5
refactor determine-stage and 'Send results to channel'
universal-itengineer Dec 26, 2025
48beb5c
update wait virtualization
universal-itengineer Dec 26, 2025
3f1354d
add condition for FOCUS var for ginkgo test
universal-itengineer Dec 26, 2025
5585678
fix virt-handler wait
universal-itengineer Dec 26, 2025
46e5e28
rm commenter always from undeploy-cluster
universal-itengineer Dec 26, 2025
b846e64
fix FOCUS nexline
universal-itengineer Dec 29, 2025
7d4f48c
fix formatting
universal-itengineer Dec 30, 2025
9808e4d
set current kube context in kubeconfig
universal-itengineer Jan 14, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions .github/actions/install-d8/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,17 @@ description: Install deckhouse-cli
runs:
using: "composite"
steps:
- name: Install deckhouse-cli
# - name: Install deckhouse-cli
# uses: werf/trdl/actions/setup-app@v0.12.2
# with:
# repo: d8
# url: https://deckhouse.ru/downloads/deckhouse-cli-trdl/
# root-version: 1
# root-sha512: 343bd5f0d8811254e5f0b6fe292372a7b7eda08d276ff255229200f84e58a8151ab2729df3515cb11372dc3899c70df172a4e54c8a596a73d67ae790466a0491
# group: 0
# channel: stable
- name: Install deckhouse-cli curl
shell: bash
run: |
sh -c "$(curl -fsSL https://raw.githubusercontent.com/deckhouse/deckhouse-cli/main/tools/install.sh)"
sh -c "$(curl -fsSL https://raw.githubusercontent.com/deckhouse/deckhouse-cli/main/tools/install.sh)" "" --version v0.25.1
echo "/opt/deckhouse/bin" >> $GITHUB_PATH
324 changes: 316 additions & 8 deletions .github/workflows/e2e-matrix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,328 @@
name: E2E Matrix Tests (bootstrap)

on:
workflow_dispatch:
pull_request:
types: [opened, reopened, synchronize, labeled, unlabeled]
branches:
- main
- feat/ci-e2e-matrix
workflow_dispatch:
- feat/ci/nightly-e2e-test-nested-env

concurrency:
group: "${{ github.workflow }}-${{ github.event.number || github.ref }}"
cancel-in-progress: true

permissions:
contents: read
defaults:
run:
shell: bash

jobs:
noop:
name: Bootstrap
e2e-ceph:
name: E2E Pipeline (Ceph)
uses: ./.github/workflows/e2e-reusable-pipeline.yml
with:
storage_type: ceph
nested_storageclass_name: nested-ceph-pool-r2-csi-rbd
branch: main
virtualization_tag: main
deckhouse_tag: main
default_user: cloud
go_version: "1.24.6"
e2e_timeout: "3h"
secrets:
DEV_REGISTRY_DOCKER_CFG: ${{ secrets.DEV_REGISTRY_DOCKER_CFG }}
VIRT_E2E_NIGHTLY_SA_TOKEN: ${{ secrets.VIRT_E2E_NIGHTLY_SA_TOKEN }}
PROD_IO_REGISTRY_DOCKER_CFG: ${{ secrets.PROD_IO_REGISTRY_DOCKER_CFG }}
BOOTSTRAP_DEV_PROXY: ${{ secrets.BOOTSTRAP_DEV_PROXY }}

e2e-replicated:
name: E2E Pipeline (Replicated)
uses: ./.github/workflows/e2e-reusable-pipeline.yml
with:
storage_type: replicated
nested_storageclass_name: nested-thin-r1
branch: main
virtualization_tag: main
deckhouse_tag: main
default_user: cloud
go_version: "1.24.6"
e2e_timeout: "3h"
secrets:
DEV_REGISTRY_DOCKER_CFG: ${{ secrets.DEV_REGISTRY_DOCKER_CFG }}
VIRT_E2E_NIGHTLY_SA_TOKEN: ${{ secrets.VIRT_E2E_NIGHTLY_SA_TOKEN }}
PROD_IO_REGISTRY_DOCKER_CFG: ${{ secrets.PROD_IO_REGISTRY_DOCKER_CFG }}
BOOTSTRAP_DEV_PROXY: ${{ secrets.BOOTSTRAP_DEV_PROXY }}

report-to-channel:
runs-on: ubuntu-latest
name: End-to-End tests report
needs:
- e2e-ceph
- e2e-replicated
if: ${{ always()}}
env:
STORAGE_TYPES: '["ceph", "replicated"]'
steps:
- name: Say hello
run: echo "Bootstrap workflow OK"
- uses: actions/checkout@v4

- name: Download E2E report artifacts
uses: actions/download-artifact@v5
continue-on-error: true
id: download-artifacts-pattern
with:
pattern: "e2e-report-*"
path: downloaded-artifacts/
merge-multiple: false

- name: Send results to channel
run: |
# Map storage types to CSI names
get_csi_name() {
local storage_type=$1
case "$storage_type" in
"ceph")
echo "rbd.csi.ceph.com"
;;
"replicated")
echo "replicated.csi.storage.deckhouse.io"
;;
*)
echo "$storage_type"
;;
esac
}

# Function to load and parse report from artifact
# Outputs: file content to stdout, debug messages to stderr
# Works with pattern-based artifact download (e2e-report-*)
# Artifacts are organized as: downloaded-artifacts/e2e-report-<storage_type>-<run_id>/e2e_report_<storage_type>.json
load_report_from_artifact() {
local storage_type=$1
local base_path="downloaded-artifacts/"

echo "[INFO] Searching for report for storage type: $storage_type" >&2
echo "[DEBUG] Base path: $base_path" >&2

if [ ! -d "$base_path" ]; then
echo "[WARN] Base path does not exist: $base_path" >&2
return 1
fi

local report_file=""

# First, search in artifact directories matching pattern: e2e-report-<storage_type>-*
# Pattern downloads create subdirectories named after the artifact
# e.g., downloaded-artifacts/e2e-report-ceph-<run_id>/e2e_report_ceph.json
echo "[DEBUG] Searching in artifact directories matching pattern: e2e-report-${storage_type}-*" >&2
local artifact_dir=$(find "$base_path" -type d -name "e2e-report-${storage_type}-*" 2>/dev/null | head -1)
if [ -n "$artifact_dir" ]; then
echo "[DEBUG] Found artifact dir: $artifact_dir" >&2
report_file=$(find "$artifact_dir" -name "e2e_report_*.json" -type f 2>/dev/null | head -1)
if [ -n "$report_file" ] && [ -f "$report_file" ]; then
echo "[INFO] Found report file in artifact dir: $report_file" >&2
cat "$report_file"
return 0
fi
fi

# Fallback: search for file by name pattern anywhere in base_path
echo "[DEBUG] Searching for file: e2e_report_${storage_type}.json" >&2
report_file=$(find "$base_path" -type f -name "e2e_report_${storage_type}.json" 2>/dev/null | head -1)
if [ -n "$report_file" ] && [ -f "$report_file" ]; then
echo "[INFO] Found report file by name: $report_file" >&2
cat "$report_file"
return 0
fi

echo "[WARN] Could not load report artifact for $storage_type" >&2
return 1
}

# Function to create failure summary JSON (fallback)
create_failure_summary() {
local storage_type=$1
local stage=$2
local run_id=$3
local csi=$(get_csi_name "$storage_type")
local date=$(date +"%Y-%m-%d")
local time=$(date +"%H:%M:%S")
local branch="${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}"
local link="${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}/actions/runs/${run_id:-${GITHUB_RUN_ID}}"

# Map stage to status message
local status_msg
case "$stage" in
"bootstrap")
status_msg=":x: BOOTSTRAP CLUSTER FAILED"
;;
"storage-setup")
status_msg=":x: STORAGE SETUP FAILED"
;;
"virtualization-setup")
status_msg=":x: VIRTUALIZATION SETUP FAILED"
;;
"e2e-test")
status_msg=":x: E2E TEST FAILED"
;;
*)
status_msg=":question: UNKNOWN"
;;
esac

jq -n \
--arg csi "$csi" \
--arg date "$date" \
--arg time "$time" \
--arg branch "$branch" \
--arg status "$status_msg" \
--arg link "$link" \
'{CSI: $csi, Date: $date, StartTime: $time, Branch: $branch, Status: $status, Passed: 0, Failed: 0, Pending: 0, Skipped: 0, Link: $link}'
}


# Parse summary JSON and add to table
parse_summary() {
local summary_json=$1
local storage_type=$2

if [ -z "$summary_json" ] || [ "$summary_json" == "null" ] || [ "$summary_json" == "" ]; then
echo "Warning: Empty summary for $storage_type"
return
fi

# Try to parse as JSON (handle both JSON string and already parsed JSON)
if ! echo "$summary_json" | jq empty 2>/dev/null; then
echo "Warning: Invalid JSON for $storage_type: $summary_json"
echo "[DEBUG] json: $summary_json"
return
fi

# Parse JSON fields
csi_raw=$(echo "$summary_json" | jq -r '.CSI // empty' 2>/dev/null)
if [ -z "$csi_raw" ] || [ "$csi_raw" == "null" ] || [ "$csi_raw" == "" ]; then
csi=$(get_csi_name "$storage_type")
else
csi="$csi_raw"
fi

date=$(echo "$summary_json" | jq -r '.Date // ""' 2>/dev/null)
time=$(echo "$summary_json" | jq -r '.StartTime // ""' 2>/dev/null)
branch=$(echo "$summary_json" | jq -r '.Branch // ""' 2>/dev/null)
status=$(echo "$summary_json" | jq -r '.Status // ":question: UNKNOWN"' 2>/dev/null)
passed=$(echo "$summary_json" | jq -r '.Passed // 0' 2>/dev/null)
failed=$(echo "$summary_json" | jq -r '.Failed // 0' 2>/dev/null)
pending=$(echo "$summary_json" | jq -r '.Pending // 0' 2>/dev/null)
skipped=$(echo "$summary_json" | jq -r '.Skipped // 0' 2>/dev/null)
link=$(echo "$summary_json" | jq -r '.Link // ""' 2>/dev/null)

# Set defaults if empty
[ -z "$passed" ] && passed=0
[ -z "$failed" ] && failed=0
[ -z "$pending" ] && pending=0
[ -z "$skipped" ] && skipped=0
[ -z "$status" ] && status=":question: UNKNOWN"

# Format link - use CSI name as fallback if link is empty
if [ -z "$link" ] || [ "$link" == "" ]; then
link_text="$csi"
else
link_text="[:link: $csi]($link)"
fi

# Add row to table
markdown_table+="| $link_text | $status | $passed | $failed | $pending | $skipped | $date | $time | $branch |\n"
}

# Initialize markdown table
echo "[INFO] Generate markdown table"
markdown_table=""
header="| CSI | Status | Passed | Failed | Pending | Skipped | Date | Time | Branch|\n"
separator="|---|---|---|---|---|---|---|---|---|\n"
markdown_table+="$header"
markdown_table+="$separator"

# Get current date for header
DATE=$(date +"%Y-%m-%d")
COMBINED_SUMMARY="## :dvp: **DVP | End-to-End tests | $DATE**\n\n"

echo "[INFO] Get storage types"
readarray -t storage_types < <(echo "$STORAGE_TYPES" | jq -r '.[]')
echo "[INFO] Storage types: ${storage_types[@]}"

echo "[INFO] Generate summary for each storage type"
for storage in "${storage_types[@]}"; do
echo "[INFO] Processing $storage"

# Try to load report from artifact
# Debug messages go to stderr (visible in logs), JSON content goes to stdout
echo "[INFO] Attempting to load report for $storage"
structured_report=$(load_report_from_artifact "$storage" || true)

if [ -n "$structured_report" ]; then
# Check if it's valid JSON
if echo "$structured_report" | jq empty 2>/dev/null; then
echo "[INFO] Report is valid JSON for $storage"
else
echo "[WARN] Report is not valid JSON for $storage"
echo "[DEBUG] Raw report content (first 200 chars):"
echo "$structured_report" | head -c 200
echo ""
structured_report=""
fi
fi

if [ -n "$structured_report" ] && echo "$structured_report" | jq empty 2>/dev/null; then
# Extract report data from structured file
report_json=$(echo "$structured_report" | jq -c '.report // empty')
failed_stage=$(echo "$structured_report" | jq -r '.failed_stage // empty')
workflow_run_id=$(echo "$structured_report" | jq -r '.workflow_run_id // empty')

echo "[INFO] Loaded report for $storage (failed_stage: ${failed_stage}, run_id: ${workflow_run_id})"

# Validate and parse report
if [ -n "$report_json" ] && [ "$report_json" != "" ] && [ "$report_json" != "null" ]; then
if echo "$report_json" | jq empty 2>/dev/null; then
echo "[INFO] Found valid report for $storage"
parse_summary "$report_json" "$storage"
else
echo "[WARN] Invalid report JSON for $storage, using failed stage info"
# Fallback to failed stage
if [ -n "$failed_stage" ] && [ "$failed_stage" != "" ] && [ "$failed_stage" != "success" ]; then
failed_summary=$(create_failure_summary "$storage" "$failed_stage" "$workflow_run_id")
parse_summary "$failed_summary" "$storage"
else
csi=$(get_csi_name "$storage")
markdown_table+="| $csi | :warning: INVALID REPORT | 0 | 0 | 0 | 0 | — | — | — |\n"
fi
fi
else
# No report in structured file, use failed stage
if [ -n "$failed_stage" ] && [ "$failed_stage" != "" ] && [ "$failed_stage" != "success" ]; then
echo "[INFO] Stage '$failed_stage' failed for $storage"
failed_summary=$(create_failure_summary "$storage" "$failed_stage" "$workflow_run_id")
parse_summary "$failed_summary" "$storage"
else
csi=$(get_csi_name "$storage")
markdown_table+="| $csi | :warning: NO REPORT | 0 | 0 | 0 | 0 | — | — | — |\n"
fi
fi
else
# Artifact not found or invalid, show warning
echo "[WARN] Could not load report artifact for $storage"
csi=$(get_csi_name "$storage")
markdown_table+="| $csi | :warning: ARTIFACT NOT FOUND | 0 | 0 | 0 | 0 | — | — | — |\n"
fi
done

echo "[INFO] Combined summary"
COMBINED_SUMMARY+="${markdown_table}\n"

echo -e "$COMBINED_SUMMARY"

# Send to channel if webhook is configured
echo "[INFO] Send to webhook"
if [ -n "$LOOP_WEBHOOK_URL" ]; then
curl --request POST --header 'Content-Type: application/json' --data "{\"text\": \"${COMBINED_SUMMARY}\"}" "$LOOP_WEBHOOK_URL"
fi
env:
LOOP_WEBHOOK_URL: ${{ secrets.LOOP_TEST_CHANNEL }}
Loading
Loading