potiuk commented on a change in pull request #7656: [AIRFLOW-7013] Automated check if Breeze image needs to be pulled URL: https://github.com/apache/airflow/pull/7656#discussion_r390568970
########## File path: scripts/ci/_utils.sh ########## @@ -552,6 +561,85 @@ function set_current_image_variables { fi } +function build_image_manifest() { + verbose_docker inspect "${AIRFLOW_IMAGE}" > "manifests/${AIRFLOW_BASE_TAG}.json" + verbose_docker build \ + --build-arg AIRFLOW_BASE_TAG="${AIRFLOW_BASE_TAG}" \ + --tag="${AIRFLOW_LOCAL_MANIFEST_IMAGE}" \ + -f- . <<EOF +ARG AIRFLOW_BASE_TAG +FROM scratch + +COPY "manifests/${AIRFLOW_BASE_TAG}.json" . + +CMD "" +EOF +} + +function get_local_image_info() { + TMP_MANIFEST_LOCAL_JSON=$(mktemp) + TMP_MANIFEST_LOCAL_SHA=$(mktemp) + set +e + verbose_docker rm --force "local-airflow-manifest" >/dev/null 2>&1 + if ! verbose_docker create --name "local-airflow-manifest" \ + "${AIRFLOW_LOCAL_MANIFEST_IMAGE}" >/dev/null 2>&1 ; then + echo + echo "Local docker not available" Review comment: Added full description + a bit nicer output showing pull progress as well as step of the docker build during pre-commit. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services