Fail image build when build script is missing

When an image did not provide a build script, due to a broken link for
instance, the build-all-docker-images script was wrongly marking the
image as "up-to-date", and the functional gate was reporting success.

This commit restores the expected behavior, and mark the images with
non-existent build scripts as failures.

Change-Id: Ifedc8d9c312925fe5aa953ed8f8fdae02b756906
Closes-Bug: #1460959
This commit is contained in:
Martin André 2015-06-03 10:22:57 +09:00
parent f69084a5aa
commit 9a5fed6608

View File

@ -54,8 +54,8 @@ function requires_build {
function build_image {
local dir=$1
printf "\n"
if [ -x "$dir/build" ]; then
printf "\n"
info "Building image in $dir"
if $dir/build $ARGS --no-use-released-parent; then
success "Successfully built image in $dir"
@ -64,6 +64,9 @@ function build_image {
warn "Failed to build image in $dir"
status[$image]="fail"
fi
else
warn "Image $image does not provide build script"
status[$image]="fail"
fi
}