Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
9e53ea1
feat(ci): configure nested e2e cluster for nightly tests
universal-itengineer Nov 26, 2025
d67fce0
change token
universal-itengineer Nov 26, 2025
6dfd6e3
fix ask fo del
universal-itengineer Nov 26, 2025
548db4e
use kubeconf
universal-itengineer Nov 26, 2025
1b57e66
add additional check
universal-itengineer Dec 12, 2025
1d9931b
add statis-cluster config
universal-itengineer Dec 15, 2025
73ec95a
test bootstrap with proxy settings in nested cluster
universal-itengineer Dec 16, 2025
8ad2db0
fix
universal-itengineer Dec 16, 2025
16d42d0
static: test deploy
universal-itengineer Dec 17, 2025
7127885
remove setup via dhctl cloud provider and leave only static
universal-itengineer Dec 18, 2025
8e9358d
static: add podSubnet and service CIDR in values yaml, add labels for…
universal-itengineer Dec 19, 2025
149d968
try dh pr17193
universal-itengineer Dec 19, 2025
b69c9bc
upd info msg for virtualization module
universal-itengineer Dec 19, 2025
d138c3e
static: refactor wf
universal-itengineer Dec 19, 2025
9d9987f
static: fix virt cert
universal-itengineer Dec 19, 2025
6c60f62
static: fix msg messages, fix conditions,refactor dbg messages
universal-itengineer Dec 19, 2025
8062998
static: add log category, emoji in vort install
universal-itengineer Dec 19, 2025
0750a8a
static: rename gen-sa to gen-kubeconfig, move to tools
universal-itengineer Dec 19, 2025
ae734de
static: comment https for virt, add dbg
universal-itengineer Dec 20, 2025
21e0710
static: add label deploy jump-his, fix d8queue
universal-itengineer Dec 20, 2025
bc32e18
fix wait ceph
universal-itengineer Dec 20, 2025
e7d4805
fix sds wait
universal-itengineer Dec 20, 2025
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
181 changes: 173 additions & 8 deletions .github/workflows/e2e-matrix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,185 @@
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: pr17193
pod_subnet_cidr: 10.88.0.0/16
service_subnet_cidr: 10.92.0.0/16
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: pr17193
pod_subnet_cidr: 10.89.0.0/16
service_subnet_cidr: 10.93.0.0/16
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()}}
steps:
- name: Say hello
run: echo "Bootstrap workflow OK"
- 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
}

# 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"
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"

# Validate date
if [ -n "$date" ] && [ "$date" != "" ]; then
current_date=$(date +"%Y-%m-%d")
if date -d "$current_date" +%s >/dev/null 2>&1 && date -d "$date" +%s >/dev/null 2>&1; then
if [ "$(date -d "$current_date" +%s)" -gt "$(date -d "$date" +%s)" ]; then
status=":x: WRONG REPORT DATE!"
fi
fi
fi

# 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
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"

# Save to json files
cat > /tmp/ceph.json << 'EOF'
${{ needs.e2e-ceph.outputs.e2e-summary }}
EOF

cat > /tmp/replicated.json << 'EOF'
${{ needs.e2e-replicated.outputs.e2e-summary }}
EOF

if [ -s /tmp/ceph.json ] && [ "$(cat /tmp/ceph.json)" != '""' ] && [ "$(cat /tmp/ceph.json)" != '{}' ]; then
parse_summary "$(cat /tmp/ceph.json)" "ceph"
fi

if [ -s /tmp/replicated.json ] && [ "$(cat /tmp/replicated.json)" != '""' ] && [ "$(cat /tmp/replicated.json)" != '{}' ]; then
parse_summary "$(cat /tmp/replicated.json)" "replicated"
fi

COMBINED_SUMMARY+="${markdown_table}\n"

echo -e "$COMBINED_SUMMARY"

# Send to channel if webhook is configured
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