Skip to content

Commit eb5abe9

Browse files
22quinnkaxil
authored andcommitted
Additional apt dependencies options in breeze (#9231)
(cherry picked from commit 0682e78)
1 parent f962392 commit eb5abe9

File tree

4 files changed

+49
-1
lines changed

4 files changed

+49
-1
lines changed

BREEZE.rst

+24
Original file line numberDiff line numberDiff line change
@@ -838,6 +838,12 @@ This is the current syntax for `./breeze <./breeze>`_:
838838
--additional-python-deps
839839
Additional python dependencies to use when building the images.
840840
841+
--additional-dev-deps
842+
Additional apt dev dependencies to use when building the images.
843+
844+
--additional-runtime-deps
845+
Additional apt runtime dependencies to use when building the images.
846+
841847
-C, --force-clean-images
842848
Force build images with cache disabled. This will remove the pulled or build images
843849
and start building images from scratch. This might take a long time.
@@ -1064,6 +1070,12 @@ This is the current syntax for `./breeze <./breeze>`_:
10641070
--additional-python-deps
10651071
Additional python dependencies to use when building the images.
10661072
1073+
--additional-dev-deps
1074+
Additional apt dev dependencies to use when building the images.
1075+
1076+
--additional-runtime-deps
1077+
Additional apt runtime dependencies to use when building the images.
1078+
10671079
-C, --force-clean-images
10681080
Force build images with cache disabled. This will remove the pulled or build images
10691081
and start building images from scratch. This might take a long time.
@@ -1283,6 +1295,12 @@ This is the current syntax for `./breeze <./breeze>`_:
12831295
--additional-python-deps
12841296
Additional python dependencies to use when building the images.
12851297
1298+
--additional-dev-deps
1299+
Additional apt dev dependencies to use when building the images.
1300+
1301+
--additional-runtime-deps
1302+
Additional apt runtime dependencies to use when building the images.
1303+
12861304
-C, --force-clean-images
12871305
Force build images with cache disabled. This will remove the pulled or build images
12881306
and start building images from scratch. This might take a long time.
@@ -1553,6 +1571,12 @@ This is the current syntax for `./breeze <./breeze>`_:
15531571
--additional-python-deps
15541572
Additional python dependencies to use when building the images.
15551573
1574+
--additional-dev-deps
1575+
Additional apt dev dependencies to use when building the images.
1576+
1577+
--additional-runtime-deps
1578+
Additional apt runtime dependencies to use when building the images.
1579+
15561580
-C, --force-clean-images
15571581
Force build images with cache disabled. This will remove the pulled or build images
15581582
and start building images from scratch. This might take a long time.

breeze

+14
Original file line numberDiff line numberDiff line change
@@ -724,6 +724,14 @@ function parse_arguments() {
724724
export ADDITIONAL_PYTHON_DEPS="${2}"
725725
echo "Additional python dependencies: ${ADDITIONAL_PYTHON_DEPS}"
726726
shift 2 ;;
727+
--additional-dev-deps)
728+
export ADDITIONAL_DEV_DEPS="${2}"
729+
echo "Additional apt dev dependencies: ${ADDITIONAL_DEV_DEPS}"
730+
shift 2 ;;
731+
--additional-runtime-deps)
732+
export ADDITIONAL_RUNTIME_DEPS="${2}"
733+
echo "Additional apt runtime dependencies: ${ADDITIONAL_RUNTIME_DEPS}"
734+
shift 2 ;;
727735
-D|--dockerhub-user)
728736
export DOCKERHUB_USER="${2}"
729737
echo "Dockerhub user ${DOCKERHUB_USER}"
@@ -1577,6 +1585,12 @@ ${FORMATTED_DEFAULT_PROD_EXTRAS}
15771585
--additional-python-deps
15781586
Additional python dependencies to use when building the images.
15791587
1588+
--additional-dev-deps
1589+
Additional apt dev dependencies to use when building the images.
1590+
1591+
--additional-runtime-deps
1592+
Additional apt runtime dependencies to use when building the images.
1593+
15801594
-C, --force-clean-images
15811595
Force build images with cache disabled. This will remove the pulled or build images
15821596
and start building images from scratch. This might take a long time.

breeze-complete

+1-1
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ verbose assume-yes assume-no assume-quit forward-credentials
101101
force-build-images force-pull-images production-image extras: force-clean-images use-local-cache
102102
dockerhub-user: dockerhub-repo: registry-cache github-organisation: github-repo:
103103
postgres-version: mysql-version:
104-
additional-extras: additional-python-deps:
104+
additional-extras: additional-python-deps: additional-dev-deps: additional-runtime-deps:
105105
"
106106

107107
export BREEZE_COMMANDS="

scripts/ci/libraries/_build_images.sh

+10
Original file line numberDiff line numberDiff line change
@@ -347,6 +347,8 @@ function prepare_ci_build() {
347347
export AIRFLOW_EXTRAS="${AIRFLOW_EXTRAS:="${DEFAULT_CI_EXTRAS}"}"
348348
export ADDITIONAL_AIRFLOW_EXTRAS="${ADDITIONAL_AIRFLOW_EXTRAS:=""}"
349349
export ADDITIONAL_PYTHON_DEPS="${ADDITIONAL_PYTHON_DEPS:=""}"
350+
export ADDITIONAL_DEV_DEPS="${ADDITIONAL_DEV_DEPS:=""}"
351+
export ADDITIONAL_RUNTIME_DEPS="${ADDITIONAL_RUNTIME_DEPS:=""}"
350352
export AIRFLOW_IMAGE="${AIRFLOW_CI_IMAGE}"
351353
go_to_airflow_sources
352354
fix_group_permissions
@@ -546,6 +548,8 @@ Docker building ${AIRFLOW_CI_IMAGE}.
546548
--build-arg AIRFLOW_EXTRAS="${AIRFLOW_EXTRAS}" \
547549
--build-arg ADDITIONAL_AIRFLOW_EXTRAS="${ADDITIONAL_AIRFLOW_EXTRAS}" \
548550
--build-arg ADDITIONAL_PYTHON_DEPS="${ADDITIONAL_PYTHON_DEPS}" \
551+
--build-arg ADDITIONAL_DEV_DEPS="${ADDITIONAL_DEV_DEPS}" \
552+
--build-arg ADDITIONAL_RUNTIME_DEPS="${ADDITIONAL_RUNTIME_DEPS}" \
549553
--build-arg AIRFLOW_CONTAINER_CI_OPTIMISED_BUILD="${AIRFLOW_CONTAINER_CI_OPTIMISED_BUILD}" \
550554
--build-arg UPGRADE_TO_LATEST_REQUIREMENTS="${UPGRADE_TO_LATEST_REQUIREMENTS}" \
551555
"${DOCKER_CACHE_CI_DIRECTIVE[@]}" \
@@ -581,6 +585,8 @@ function prepare_prod_build() {
581585
export AIRFLOW_EXTRAS="${AIRFLOW_EXTRAS:="${DEFAULT_PROD_EXTRAS}"}"
582586
export ADDITIONAL_AIRFLOW_EXTRAS="${ADDITIONAL_AIRFLOW_EXTRAS:=""}"
583587
export ADDITIONAL_PYTHON_DEPS="${ADDITIONAL_PYTHON_DEPS:=""}"
588+
export ADDITIONAL_DEV_DEPS="${ADDITIONAL_DEV_DEPS:=""}"
589+
export ADDITIONAL_RUNTIME_DEPS="${ADDITIONAL_RUNTIME_DEPS:=""}"
584590
export AIRFLOW_IMAGE="${AIRFLOW_PROD_IMAGE}"
585591

586592
if [[ ${ENABLE_REGISTRY_CACHE="false"} == "true" ]]; then
@@ -667,6 +673,8 @@ function build_prod_image() {
667673
--build-arg AIRFLOW_EXTRAS="${AIRFLOW_EXTRAS}" \
668674
--build-arg ADDITIONAL_AIRFLOW_EXTRAS="${ADDITIONAL_AIRFLOW_EXTRAS}" \
669675
--build-arg ADDITIONAL_PYTHON_DEPS="${ADDITIONAL_PYTHON_DEPS}" \
676+
--build-arg ADDITIONAL_DEV_DEPS="${ADDITIONAL_DEV_DEPS}" \
677+
--build-arg ADDITIONAL_RUNTIME_DEPS="${ADDITIONAL_RUNTIME_DEPS}" \
670678
"${DOCKER_CACHE_PROD_BUILD_DIRECTIVE[@]}" \
671679
-t "${AIRFLOW_PROD_BUILD_IMAGE}" \
672680
--target "airflow-build-image" \
@@ -677,6 +685,8 @@ function build_prod_image() {
677685
--build-arg PYTHON_MAJOR_MINOR_VERSION="${PYTHON_MAJOR_MINOR_VERSION}" \
678686
--build-arg ADDITIONAL_AIRFLOW_EXTRAS="${ADDITIONAL_AIRFLOW_EXTRAS}" \
679687
--build-arg ADDITIONAL_PYTHON_DEPS="${ADDITIONAL_PYTHON_DEPS}" \
688+
--build-arg ADDITIONAL_DEV_DEPS="${ADDITIONAL_DEV_DEPS}" \
689+
--build-arg ADDITIONAL_RUNTIME_DEPS="${ADDITIONAL_RUNTIME_DEPS}" \
680690
--build-arg AIRFLOW_VERSION="${AIRFLOW_VERSION}" \
681691
--build-arg AIRFLOW_EXTRAS="${AIRFLOW_EXTRAS}" \
682692
"${DOCKER_CACHE_PROD_DIRECTIVE[@]}" \

0 commit comments

Comments
 (0)