This is an automated email from the ASF dual-hosted git repository.
potiuk pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/main by this push:
new ef1bfd99f8 Allow to pass AIRFLOW_SOURCES env variable to ci entrypoint
(#25709)
ef1bfd99f8 is described below
commit ef1bfd99f845c4b12d645768186dc26592b04923
Author: HasanJ <[email protected]>
AuthorDate: Mon Aug 15 18:05:46 2022 +0300
Allow to pass AIRFLOW_SOURCES env variable to ci entrypoint (#25709)
---
Dockerfile.ci | 2 +-
scripts/docker/entrypoint_ci.sh | 2 +-
scripts/in_container/_in_container_utils.sh | 8 ++++----
3 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/Dockerfile.ci b/Dockerfile.ci
index 8b643dfa92..fdc2b554f3 100644
--- a/Dockerfile.ci
+++ b/Dockerfile.ci
@@ -534,7 +534,7 @@ if [[ ${VERBOSE_COMMANDS:="false"} == "true" ]]; then
set -x
fi
-. /opt/airflow/scripts/in_container/_in_container_script_init.sh
+.
"${AIRFLOW_SOURCES:-/opt/airflow}"/scripts/in_container/_in_container_script_init.sh
LD_PRELOAD="/usr/lib/$(uname -m)-linux-gnu/libstdc++.so.6"
export LD_PRELOAD
diff --git a/scripts/docker/entrypoint_ci.sh b/scripts/docker/entrypoint_ci.sh
index 5bc6d480da..8284920a46 100755
--- a/scripts/docker/entrypoint_ci.sh
+++ b/scripts/docker/entrypoint_ci.sh
@@ -20,7 +20,7 @@ if [[ ${VERBOSE_COMMANDS:="false"} == "true" ]]; then
fi
# shellcheck source=scripts/in_container/_in_container_script_init.sh
-. /opt/airflow/scripts/in_container/_in_container_script_init.sh
+.
"${AIRFLOW_SOURCES:-/opt/airflow}"/scripts/in_container/_in_container_script_init.sh
# This one is to workaround https://github.com/apache/airflow/issues/17546
# issue with /usr/lib/<MACHINE>-linux-gnu/libstdc++.so.6: cannot allocate
memory in static TLS block
diff --git a/scripts/in_container/_in_container_utils.sh
b/scripts/in_container/_in_container_utils.sh
index f313457dd4..988fed004a 100644
--- a/scripts/in_container/_in_container_utils.sh
+++ b/scripts/in_container/_in_container_utils.sh
@@ -127,10 +127,10 @@ function in_container_fix_ownership() {
DIRECTORIES_TO_FIX=(
"/dist"
"/files"
- "/opt/airflow/logs"
- "/opt/airflow/docs"
- "/opt/airflow/dags"
- "/opt/airflow/airflow/"
+ "${AIRFLOW_SOURCES}/logs"
+ "${AIRFLOW_SOURCES}/docs"
+ "${AIRFLOW_SOURCES}/dags"
+ "${AIRFLOW_SOURCES}/airflow/"
)
count_matching=$(find "${DIRECTORIES_TO_FIX[@]}" -mindepth 1 -user
root -printf . 2>/dev/null | wc -m || true)
if [[ ${count_matching=} != "0" && ${count_matching=} != "" ]]; then