Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

only pull addon images when it does not exist #23040

Merged
merged 1 commit into from
Mar 17, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 5 additions & 2 deletions build/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ readonly GCS_STAGE="${LOCAL_OUTPUT_ROOT}/gcs-stage"
# Get the set of master binaries that run in Docker (on Linux)
# Entry format is "<name-of-binary>,<base-image>".
# Binaries are placed in /usr/local/bin inside the image.
#
#
# $1 - server architecture
kube::build::get_docker_wrapped_binaries() {
case $1 in
Expand Down Expand Up @@ -875,7 +875,10 @@ function kube::release::write_addon_docker_images_for_server() {
kube::log::status "Pulling and writing Docker image for addon: ${addon_path}"

local dest_name="${addon_path//\//\~}"
"${DOCKER[@]}" pull "${addon_path}"
if [[ -z $("${DOCKER[@]}" images | awk '{print ($1":"$2)}' | grep "${addon_path}") ]]; then
kube::log::status "Addon image ${addon_path} does not exist, pulling it..."
"${DOCKER[@]}" pull "${addon_path}"
fi
"${DOCKER[@]}" save "${addon_path}" > "${1}/${dest_name}.tar"
) &
done
Expand Down