@@ -48,42 +48,42 @@ trap "rm -rf $TEMP_DIR" EXIT
4848
4949echo -e " \n${BLUE} Step 1: Downloading artifacts...${NC} "
5050
51- # Download artifacts from the run
52- cd " $TEMP_DIR "
53- if ! gh run download " $RUN_ID " --name " regression-test-results-${RUN_ID} -1" 2> /dev/null; then
54- # Try without attempt suffix
55- if ! gh run download " $RUN_ID " 2> /dev/null; then
56- echo -e " ${RED} Error: Failed to download artifacts from run ${RUN_ID}${NC} "
57- exit 1
58- fi
51+ # Download all test-results artifacts from the run
52+ # Try downloading all artifacts (will download test-results-v1beta3-*, test-results-v1beta2-*, test-results-supportbundle-*)
53+ if ! gh run download " $RUN_ID " --dir " $TEMP_DIR " 2> /dev/null; then
54+ echo -e " ${RED} Error: Failed to download artifacts from run ${RUN_ID}${NC} "
55+ echo " Make sure the workflow run completed successfully."
56+ exit 1
5957fi
6058
6159echo -e " ${GREEN} ✓ Artifacts downloaded${NC} "
6260
6361# Check which bundles are present
6462echo -e " \n${BLUE} Step 2: Checking available bundles...${NC} "
6563
66- V1BETA3_BUNDLE=" "
67- V1BETA2_BUNDLE=" "
68- SUPPORTBUNDLE=" "
64+ # Use find to locate bundles in artifact subdirectories
65+ V1BETA3_BUNDLE=$( find " $TEMP_DIR " -name " preflight-v1beta3-bundle.tar.gz" | head -1)
66+ V1BETA2_BUNDLE=$( find " $TEMP_DIR " -name " preflight-v1beta2-bundle.tar.gz" | head -1)
67+ SUPPORTBUNDLE=$( find " $TEMP_DIR " -name " supportbundle.tar.gz" | head -1)
6968
70- if [ -f " preflight-v1beta3-bundle.tar.gz" ] || [ -f " test/output/preflight-v1beta3-bundle.tar.gz" ]; then
71- V1BETA3_BUNDLE=$( find . -name " preflight-v1beta3-bundle.tar.gz" | head -1)
69+ if [ -n " $V1BETA3_BUNDLE " ]; then
7270 echo -e " ${GREEN} ✓${NC} Found v1beta3 preflight bundle"
7371fi
7472
75- if [ -f " preflight-v1beta2-bundle.tar.gz" ] || [ -f " test/output/preflight-v1beta2-bundle.tar.gz" ]; then
76- V1BETA2_BUNDLE=$( find . -name " preflight-v1beta2-bundle.tar.gz" | head -1)
73+ if [ -n " $V1BETA2_BUNDLE " ]; then
7774 echo -e " ${GREEN} ✓${NC} Found v1beta2 preflight bundle"
7875fi
7976
80- if [ -f " supportbundle.tar.gz" ] || [ -f " test/output/supportbundle.tar.gz" ]; then
81- SUPPORTBUNDLE=$( find . -name " supportbundle.tar.gz" | head -1)
77+ if [ -n " $SUPPORTBUNDLE " ]; then
8278 echo -e " ${GREEN} ✓${NC} Found support bundle"
8379fi
8480
8581if [ -z " $V1BETA3_BUNDLE " ] && [ -z " $V1BETA2_BUNDLE " ] && [ -z " $SUPPORTBUNDLE " ]; then
8682 echo -e " ${RED} Error: No bundles found in artifacts${NC} "
83+ echo " Downloaded artifacts:"
84+ ls -la " $TEMP_DIR "
85+ echo -e " \nSearching for bundles:"
86+ find " $TEMP_DIR " -name " *.tar.gz" -o -name " *.json"
8787 exit 1
8888fi
8989
@@ -110,21 +110,21 @@ echo -e "\n${BLUE}Step 3: Updating baselines...${NC}"
110110# Update v1beta3 baseline
111111if [ -n " $V1BETA3_BUNDLE " ]; then
112112 mkdir -p test/baselines/preflight-v1beta3
113- cp " $TEMP_DIR / $ V1BETA3_BUNDLE" test/baselines/preflight-v1beta3/baseline.tar.gz
113+ cp " $V1BETA3_BUNDLE " test/baselines/preflight-v1beta3/baseline.tar.gz
114114 echo -e " ${GREEN} ✓${NC} Updated preflight-v1beta3 baseline"
115115fi
116116
117117# Update v1beta2 baseline
118118if [ -n " $V1BETA2_BUNDLE " ]; then
119119 mkdir -p test/baselines/preflight-v1beta2
120- cp " $TEMP_DIR / $ V1BETA2_BUNDLE" test/baselines/preflight-v1beta2/baseline.tar.gz
120+ cp " $V1BETA2_BUNDLE " test/baselines/preflight-v1beta2/baseline.tar.gz
121121 echo -e " ${GREEN} ✓${NC} Updated preflight-v1beta2 baseline"
122122fi
123123
124124# Update support bundle baseline
125125if [ -n " $SUPPORTBUNDLE " ]; then
126126 mkdir -p test/baselines/supportbundle
127- cp " $TEMP_DIR / $ SUPPORTBUNDLE" test/baselines/supportbundle/baseline.tar.gz
127+ cp " $SUPPORTBUNDLE " test/baselines/supportbundle/baseline.tar.gz
128128 echo -e " ${GREEN} ✓${NC} Updated supportbundle baseline"
129129fi
130130
@@ -139,7 +139,7 @@ cat > test/baselines/metadata.json <<EOF
139139 "updated_at": "$CURRENT_DATE ",
140140 "git_sha": "$GIT_SHA ",
141141 "workflow_run_id": "$RUN_ID ",
142- "k8s_version": "v1.28.3 ",
142+ "k8s_version": "v1.31.2-k3s1 ",
143143 "updated_by": "$( git config user.name) <$( git config user.email) >"
144144}
145145EOF
0 commit comments