This is an automated email from the ASF dual-hosted git repository. potiuk pushed a commit to branch v1-10-test in repository https://gitbox.apache.org/repos/asf/airflow.git
commit 94ce48c577ffd434daa5140a50a27ed09b652bbd Author: zikun <[email protected]> AuthorDate: Fri Jun 12 00:53:26 2020 +0800 Additional apt dependencies options in breeze (#9231) (cherry picked from commit 0682e784b1515284c2954464a37ff9fe880171e3) --- BREEZE.rst | 24 ++++++++++++++++++++++++ breeze | 14 ++++++++++++++ breeze-complete | 2 +- scripts/ci/libraries/_build_images.sh | 10 ++++++++++ 4 files changed, 49 insertions(+), 1 deletion(-) diff --git a/BREEZE.rst b/BREEZE.rst index bf5e311..0393369 100644 --- a/BREEZE.rst +++ b/BREEZE.rst @@ -838,6 +838,12 @@ This is the current syntax for `./breeze <./breeze>`_: --additional-python-deps Additional python dependencies to use when building the images. + --additional-dev-deps + Additional apt dev dependencies to use when building the images. + + --additional-runtime-deps + Additional apt runtime dependencies to use when building the images. + -C, --force-clean-images Force build images with cache disabled. This will remove the pulled or build images and start building images from scratch. This might take a long time. @@ -1064,6 +1070,12 @@ This is the current syntax for `./breeze <./breeze>`_: --additional-python-deps Additional python dependencies to use when building the images. + --additional-dev-deps + Additional apt dev dependencies to use when building the images. + + --additional-runtime-deps + Additional apt runtime dependencies to use when building the images. + -C, --force-clean-images Force build images with cache disabled. This will remove the pulled or build images and start building images from scratch. This might take a long time. @@ -1283,6 +1295,12 @@ This is the current syntax for `./breeze <./breeze>`_: --additional-python-deps Additional python dependencies to use when building the images. + --additional-dev-deps + Additional apt dev dependencies to use when building the images. + + --additional-runtime-deps + Additional apt runtime dependencies to use when building the images. + -C, --force-clean-images Force build images with cache disabled. This will remove the pulled or build images and start building images from scratch. This might take a long time. @@ -1553,6 +1571,12 @@ This is the current syntax for `./breeze <./breeze>`_: --additional-python-deps Additional python dependencies to use when building the images. + --additional-dev-deps + Additional apt dev dependencies to use when building the images. + + --additional-runtime-deps + Additional apt runtime dependencies to use when building the images. + -C, --force-clean-images Force build images with cache disabled. This will remove the pulled or build images and start building images from scratch. This might take a long time. diff --git a/breeze b/breeze index 005f917..9e1c746 100755 --- a/breeze +++ b/breeze @@ -724,6 +724,14 @@ function parse_arguments() { export ADDITIONAL_PYTHON_DEPS="${2}" echo "Additional python dependencies: ${ADDITIONAL_PYTHON_DEPS}" shift 2 ;; + --additional-dev-deps) + export ADDITIONAL_DEV_DEPS="${2}" + echo "Additional apt dev dependencies: ${ADDITIONAL_DEV_DEPS}" + shift 2 ;; + --additional-runtime-deps) + export ADDITIONAL_RUNTIME_DEPS="${2}" + echo "Additional apt runtime dependencies: ${ADDITIONAL_RUNTIME_DEPS}" + shift 2 ;; -D|--dockerhub-user) export DOCKERHUB_USER="${2}" echo "Dockerhub user ${DOCKERHUB_USER}" @@ -1577,6 +1585,12 @@ ${FORMATTED_DEFAULT_PROD_EXTRAS} --additional-python-deps Additional python dependencies to use when building the images. +--additional-dev-deps + Additional apt dev dependencies to use when building the images. + +--additional-runtime-deps + Additional apt runtime dependencies to use when building the images. + -C, --force-clean-images Force build images with cache disabled. This will remove the pulled or build images and start building images from scratch. This might take a long time. diff --git a/breeze-complete b/breeze-complete index 5d8a724..6038014 100644 --- a/breeze-complete +++ b/breeze-complete @@ -101,7 +101,7 @@ verbose assume-yes assume-no assume-quit forward-credentials force-build-images force-pull-images production-image extras: force-clean-images use-local-cache dockerhub-user: dockerhub-repo: registry-cache github-organisation: github-repo: postgres-version: mysql-version: -additional-extras: additional-python-deps: +additional-extras: additional-python-deps: additional-dev-deps: additional-runtime-deps: " export BREEZE_COMMANDS=" diff --git a/scripts/ci/libraries/_build_images.sh b/scripts/ci/libraries/_build_images.sh index 83cce06..be349b8 100644 --- a/scripts/ci/libraries/_build_images.sh +++ b/scripts/ci/libraries/_build_images.sh @@ -347,6 +347,8 @@ function prepare_ci_build() { export AIRFLOW_EXTRAS="${AIRFLOW_EXTRAS:="${DEFAULT_CI_EXTRAS}"}" export ADDITIONAL_AIRFLOW_EXTRAS="${ADDITIONAL_AIRFLOW_EXTRAS:=""}" export ADDITIONAL_PYTHON_DEPS="${ADDITIONAL_PYTHON_DEPS:=""}" + export ADDITIONAL_DEV_DEPS="${ADDITIONAL_DEV_DEPS:=""}" + export ADDITIONAL_RUNTIME_DEPS="${ADDITIONAL_RUNTIME_DEPS:=""}" export AIRFLOW_IMAGE="${AIRFLOW_CI_IMAGE}" go_to_airflow_sources fix_group_permissions @@ -546,6 +548,8 @@ Docker building ${AIRFLOW_CI_IMAGE}. --build-arg AIRFLOW_EXTRAS="${AIRFLOW_EXTRAS}" \ --build-arg ADDITIONAL_AIRFLOW_EXTRAS="${ADDITIONAL_AIRFLOW_EXTRAS}" \ --build-arg ADDITIONAL_PYTHON_DEPS="${ADDITIONAL_PYTHON_DEPS}" \ + --build-arg ADDITIONAL_DEV_DEPS="${ADDITIONAL_DEV_DEPS}" \ + --build-arg ADDITIONAL_RUNTIME_DEPS="${ADDITIONAL_RUNTIME_DEPS}" \ --build-arg AIRFLOW_CONTAINER_CI_OPTIMISED_BUILD="${AIRFLOW_CONTAINER_CI_OPTIMISED_BUILD}" \ --build-arg UPGRADE_TO_LATEST_REQUIREMENTS="${UPGRADE_TO_LATEST_REQUIREMENTS}" \ "${DOCKER_CACHE_CI_DIRECTIVE[@]}" \ @@ -581,6 +585,8 @@ function prepare_prod_build() { export AIRFLOW_EXTRAS="${AIRFLOW_EXTRAS:="${DEFAULT_PROD_EXTRAS}"}" export ADDITIONAL_AIRFLOW_EXTRAS="${ADDITIONAL_AIRFLOW_EXTRAS:=""}" export ADDITIONAL_PYTHON_DEPS="${ADDITIONAL_PYTHON_DEPS:=""}" + export ADDITIONAL_DEV_DEPS="${ADDITIONAL_DEV_DEPS:=""}" + export ADDITIONAL_RUNTIME_DEPS="${ADDITIONAL_RUNTIME_DEPS:=""}" export AIRFLOW_IMAGE="${AIRFLOW_PROD_IMAGE}" if [[ ${ENABLE_REGISTRY_CACHE="false"} == "true" ]]; then @@ -667,6 +673,8 @@ function build_prod_image() { --build-arg AIRFLOW_EXTRAS="${AIRFLOW_EXTRAS}" \ --build-arg ADDITIONAL_AIRFLOW_EXTRAS="${ADDITIONAL_AIRFLOW_EXTRAS}" \ --build-arg ADDITIONAL_PYTHON_DEPS="${ADDITIONAL_PYTHON_DEPS}" \ + --build-arg ADDITIONAL_DEV_DEPS="${ADDITIONAL_DEV_DEPS}" \ + --build-arg ADDITIONAL_RUNTIME_DEPS="${ADDITIONAL_RUNTIME_DEPS}" \ "${DOCKER_CACHE_PROD_BUILD_DIRECTIVE[@]}" \ -t "${AIRFLOW_PROD_BUILD_IMAGE}" \ --target "airflow-build-image" \ @@ -677,6 +685,8 @@ function build_prod_image() { --build-arg PYTHON_MAJOR_MINOR_VERSION="${PYTHON_MAJOR_MINOR_VERSION}" \ --build-arg ADDITIONAL_AIRFLOW_EXTRAS="${ADDITIONAL_AIRFLOW_EXTRAS}" \ --build-arg ADDITIONAL_PYTHON_DEPS="${ADDITIONAL_PYTHON_DEPS}" \ + --build-arg ADDITIONAL_DEV_DEPS="${ADDITIONAL_DEV_DEPS}" \ + --build-arg ADDITIONAL_RUNTIME_DEPS="${ADDITIONAL_RUNTIME_DEPS}" \ --build-arg AIRFLOW_VERSION="${AIRFLOW_VERSION}" \ --build-arg AIRFLOW_EXTRAS="${AIRFLOW_EXTRAS}" \ "${DOCKER_CACHE_PROD_DIRECTIVE[@]}" \
