Remove kube::build::build_image_built() check.

This check is too restrictive if building into multiple _output
targets, such as the way anago produces releases
When branching we build essentially 2 copies of the same thing
(GKE requirement) the second build will always fail because the
docker image is the same.
This commit is contained in:
David McMahon 2016-11-01 17:25:21 -07:00
parent 5b0bbd0792
commit d403c2c168

View File

@ -410,13 +410,8 @@ function kube::build::clean() {
rm -rf "${LOCAL_OUTPUT_ROOT}"
}
function kube::build::build_image_built() {
kube::build::docker_image_exists "${KUBE_BUILD_IMAGE_REPO}" "${KUBE_BUILD_IMAGE_TAG}"
}
# Set up the context directory for the kube-build image and build it.
function kube::build::build_image() {
if ! kube::build::build_image_built; then
mkdir -p "${LOCAL_OUTPUT_BUILD_CONTEXT}"
cp /etc/localtime "${LOCAL_OUTPUT_BUILD_CONTEXT}/"
@ -427,9 +422,7 @@ function kube::build::build_image() {
chmod go= "${LOCAL_OUTPUT_BUILD_CONTEXT}/rsyncd.password"
kube::build::update_dockerfile
kube::build::docker_build "${KUBE_BUILD_IMAGE}" "${LOCAL_OUTPUT_BUILD_CONTEXT}" 'false'
fi
# Clean up old versions of everything
kube::build::docker_delete_old_containers "${KUBE_BUILD_CONTAINER_NAME_BASE}" "${KUBE_BUILD_CONTAINER_NAME}"