Skip to content

Commit 263bd61

Browse files
committed
fix import settings pass
Signed-off-by: Maksim Khimchenko <[email protected]>
1 parent 91adb80 commit 263bd61

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

svace_analyze/action.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,10 @@ runs:
234234
info "Importing \"${project_name}\"..."
235235
response=$(send_request "${svacer_import}" $request_attempts)
236236
read import_task_id import_task_status <<< $(jq -r '(.task_id|tostring)+" "+.status' <<< ${response})
237+
if [[ -z "${import_task_id}" ]]; then
238+
error "Import task failed. Response: ${response}"
239+
exit 1
240+
fi
237241
info "Import task scheduled succesfully. Task id: ${import_task_id}"
238242
239243
get_import_log="curl --write-out \"\\n%{http_code}\" -sSL --request GET \
@@ -322,8 +326,8 @@ runs:
322326
fi
323327
324328
if [[ $(send "[[ -f ${proj}/${build_item}.tar.gz ]] && echo true || echo false") == true ]]; then
325-
info "Start importing project \"${svacer_proj}\" ..."
326-
upload_to_svacer "${svacer_proj}" "${CI_COMMIT_REF_NAME}" "${proj}/${build_item}.tar.gz"
329+
info "Start importing project \"${import_project}\" with branch \"${import_branch}\" ..."
330+
upload_to_svacer "${import_project}" "${import_branch}" "${proj}/${build_item}.tar.gz"
327331
success "Import completed successfuly!"
328332
else
329333
warning "Nothing to import! Couldn't find \"${build_item}.tar.gz\" in \"${proj}\""

0 commit comments

Comments
 (0)