You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by di...@apache.org on 2020/06/19 17:27:10 UTC

[airflow] 02/02: Parameterized bash/python in the prod image (#9157)

This is an automated email from the ASF dual-hosted git repository.

dimberman pushed a commit to branch v1-10-test
in repository https://gitbox.apache.org/repos/asf/airflow.git

commit 5b30d4537cb39f9c6c4b9fd6acb69b498f7dc707
Author: Jarek Potiuk <ja...@polidea.com>
AuthorDate: Sat Jun 6 09:48:02 2020 +0200

    Parameterized bash/python in the prod image (#9157)
    
    (cherry picked from commit b809afa3e33ec5cc76f846f525ab8d6bdcf9d1f0)
---
 entrypoint.sh | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/entrypoint.sh b/entrypoint.sh
index 3d436e2..220e9b7 100755
--- a/entrypoint.sh
+++ b/entrypoint.sh
@@ -102,8 +102,12 @@ if [[ -n ${AIRFLOW__CELERY__BROKER_URL} ]] && \
     verify_db_connection "${AIRFLOW__CELERY__BROKER_URL}"
 fi
 
-if [[ ${AIRFLOW_COMMAND} == "" ]]; then
-   exec "/bin/bash"
+if [[ ${AIRFLOW_COMMAND} == "bash" ]]; then
+   shift
+   exec "/bin/bash" "${@}"
+elif [[ ${AIRFLOW_COMMAND} == "python" ]]; then
+   shift
+   exec "python" "${@}"
 fi
 
 # Run the command