build-docker-images: additional error handling

Handle errors caused by failed git clone attempts.

Related-Bug: 2034255
Signed-off-by: Davlet Panech <davlet.panech@windriver.com>
Change-Id: Ie3708a6522ac4e4ebda9502b697de30927b3d5eb
This commit is contained in:
Davlet Panech 2023-09-08 12:58:52 -04:00
parent 187864f9e7
commit d33c5b7120
1 changed files with 2 additions and 0 deletions

View File

@ -655,6 +655,7 @@ function build_image_docker {
get_git "${DOCKER_REPO}" "${DOCKER_REF}" "${DOCKER_PATCHES}"
if [ $? -ne 0 ]; then
echo "Failed to clone or update ${DOCKER_REPO}. Aborting..." >&2
RESULTS_FAILED+=(${LABEL})
cd ${ORIGWD}
return 1
fi
@ -775,6 +776,7 @@ function build_image_script {
get_git "${SOURCE_REPO}" "${SOURCE_REF}" "${SOURCE_PATCHES}"
if [ $? -ne 0 ]; then
echo "Failed to clone or update ${SOURCE_REPO}. Aborting..." >&2
RESULTS_FAILED+=(${LABEL})
cd ${ORIGWD}
return 1
fi