diff --git a/dw-auto-validate.sh b/dw-auto-validate.sh index 3b02b3d..033fa5b 100755 --- a/dw-auto-validate.sh +++ b/dw-auto-validate.sh @@ -145,7 +145,8 @@ if [ -z "${SCENARIO}" ]; then fi # Read values from scenario's setting -. settings/settings-${SCENARIO}.env +# shellcheck source=settings/settings-vscode.env +. settings/settings-"${SCENARIO}".env # user namespace where testing will occur DEVWORKSPACE_NS=$(oc project -q) @@ -200,7 +201,10 @@ log "Iterating over ${#DEVFILE_URL_LIST[@]} Devfiles and ${#IMAGES_LIST[@]} Imag for devfile_url in "${DEVFILE_URL_LIST[@]}"; do curl -sL -o ${TMP_DEVFILE} ${devfile_url} - sed -i 's/^/ /' ${TMP_DEVFILE} + # Strip commands and events sections — they reference devfile-specific tools + # and projects that don't match the test project, causing postStart failures + sed -i.tmp -e '/^commands:/,/^[^ ]/{ /^[^ ]/!d; /^commands:/d; }' -e '/^events:/,/^[^ ]/{ /^[^ ]/!d; /^events:/d; }' ${TMP_DEVFILE} && rm -f "${TMP_DEVFILE}.tmp" + sed -i.tmp 's/^/ /' ${TMP_DEVFILE} && rm -f "${TMP_DEVFILE}.tmp" for image in "${IMAGES_LIST[@]}"; do [[ ${DEBUG} -eq 1 && ${total_count} == 1 ]] && continue