Skip to content

Commit

Permalink
Merge pull request #3232 from uselagoon/image-sizes
Browse files Browse the repository at this point in the history
  • Loading branch information
tobybellwood authored Jul 27, 2022
2 parents b9fcd11 + 190d80c commit 111e147
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions images/kubectl-build-deploy-dind/build-deploy-docker-compose.sh
Original file line number Diff line number Diff line change
Expand Up @@ -694,6 +694,24 @@ if [[ "$BUILD_TYPE" == "pullrequest" || "$BUILD_TYPE" == "branch" ]]; then

fi

set +x
# print information about built image sizes
function printBytes {
local -i bytes=$1;
echo "$(( (bytes + 1000000)/1000000 ))MB"
}
if [[ "${IMAGES_BUILD[@]}" ]]; then
echo "##############################################"
echo "Built image sizes:"
echo "##############################################"
fi
for IMAGE_NAME in "${!IMAGES_BUILD[@]}"
do
TEMPORARY_IMAGE_NAME="${IMAGES_BUILD[${IMAGE_NAME}]}"
echo -e "Image ${TEMPORARY_IMAGE_NAME}\t\t$(printBytes $(docker inspect ${TEMPORARY_IMAGE_NAME} | jq -r '.[0].Size'))"
done
set -x

set +x
currentStepEnd="$(date +"%Y-%m-%d %H:%M:%S")"
patchBuildStep "${buildStartTime}" "${previousStepEnd}" "${currentStepEnd}" "${NAMESPACE}" "imageBuildComplete" "Image Builds"
Expand Down

0 comments on commit 111e147

Please sign in to comment.