Skip to content
Draft
Changes from all commits
Commits
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
8 changes: 6 additions & 2 deletions dw-auto-validate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't this a bit overkill for https://registry.devfile.io/devfiles/java-quarkus ? It seems like the problem is the init-compile that gets executed as part of postStart is specific to the first entry of starterProjects (with ${PROJECT_SOURCE} ).

Should we maybe avoid injecting the project into the sample if we discover the original devfile has a starterProjects entry ? Is there some other way to get this passing without completely removing the events + commands ?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good point. i'll try to update this.
i agree we should stick to the original as much as possible

# 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
Expand Down