Skip to content

Commit

Permalink
[AIRFLOW-7010] Skip in-container checks for Dockerhub builds (apache#…
Browse files Browse the repository at this point in the history
  • Loading branch information
potiuk authored Mar 9, 2020
1 parent 1766e0b commit 3aca396
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions hooks/build
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,7 @@

MY_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"

# Dockerhub builds are run inside Docker container
export SKIP_IN_CONTAINER_CHECK="true"

exec "${MY_DIR}/../scripts/ci/ci_build_dockerhub.sh"
3 changes: 3 additions & 0 deletions scripts/ci/_utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -414,6 +414,9 @@ function check_if_coreutils_installed() {
# Asserts that we are not inside of the container
#
function assert_not_in_container() {
if [[ ${SKIP_IN_CONTAINER_CHECK:=} == "true" ]]; then
return
fi
if [[ -f /.dockerenv ]]; then
echo >&2
echo >&2 "You are inside the Airflow docker container!"
Expand Down

0 comments on commit 3aca396

Please sign in to comment.