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
…7652)

(cherry picked from commit 3aca396)
  • Loading branch information
potiuk authored and kaxil committed Mar 19, 2020
1 parent 7d8d79c commit 4cf118d
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 @@ -413,6 +413,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 4cf118d

Please sign in to comment.