Skip to content

Commit 36a5e1a

Browse files
authored
fix(x2a): report git clone and init-phase errors to the UI (#2573)
Signed-off-by: Marek Libra <marek.libra@gmail.com>
1 parent 0af1aad commit 36a5e1a

2 files changed

Lines changed: 10 additions & 1 deletion

File tree

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@red-hat-developer-hub/backstage-plugin-x2a-backend': patch
3+
---
4+
5+
Bugfix - failures in git clone and init-phase are propagated to the UI.

workspaces/x2a/plugins/x2a-backend/templates/x2a-job-script.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,11 @@ report_result() {
2323
url="${url}&moduleId=${MODULE_ID}"
2424
fi
2525

26-
local cmd=(uv run app.py report --url "${url}" --job-id "${JOB_ID}" --source-dir "${SOURCE_BASE}")
26+
local cmd=(uv run app.py report --url "${url}" --job-id "${JOB_ID}")
27+
28+
if [ -n "${SOURCE_BASE:-}" ]; then
29+
cmd+=(--source-dir "${SOURCE_BASE}")
30+
fi
2731

2832
for artifact in "${ARTIFACTS[@]}"; do
2933
cmd+=(--artifacts "${artifact}")

0 commit comments

Comments
 (0)