diff --git a/Dockerfile b/Dockerfile index f7b15a9af3..c59d41a226 100644 --- a/Dockerfile +++ b/Dockerfile @@ -47,7 +47,7 @@ ARG CASS_DRIVER_BUILD_CONCURRENCY="8" ARG PYTHON_BASE_IMAGE="python:3.6-slim-buster" ARG PYTHON_MAJOR_MINOR_VERSION="3.6" -ARG PIP_VERSION=20.2.4 +ARG AIRFLOW_PIP_VERSION=20.2.4 ############################################################################################## # This is the build image where we build all dependencies @@ -61,8 +61,8 @@ ENV PYTHON_BASE_IMAGE=${PYTHON_BASE_IMAGE} ARG PYTHON_MAJOR_MINOR_VERSION ENV PYTHON_MAJOR_MINOR_VERSION=${PYTHON_MAJOR_MINOR_VERSION} -ARG PIP_VERSION -ENV PIP_VERSION=${PIP_VERSION} +ARG AIRFLOW_PIP_VERSION +ENV AIRFLOW_PIP_VERSION=${AIRFLOW_PIP_VERSION} # Make sure noninteractive debian install is used and language variables set ENV DEBIAN_FRONTEND=noninteractive LANGUAGE=C.UTF-8 LANG=C.UTF-8 LC_ALL=C.UTF-8 \ @@ -171,7 +171,7 @@ RUN if [[ -f /docker-context-files/.pypirc ]]; then \ cp /docker-context-files/.pypirc /root/.pypirc; \ fi -RUN pip install --upgrade "pip==${PIP_VERSION}" +RUN pip install --upgrade "pip==${AIRFLOW_PIP_VERSION}" # By default we do not use pre-cached packages, but in CI/Breeze environment we override this to speed up # builds in case setup.py/setup.cfg changed. This is pure optimisation of CI/Breeze builds. @@ -323,8 +323,8 @@ ENV AIRFLOW_VERSION=${AIRFLOW_VERSION} ENV DEBIAN_FRONTEND=noninteractive LANGUAGE=C.UTF-8 LANG=C.UTF-8 LC_ALL=C.UTF-8 \ LC_CTYPE=C.UTF-8 LC_MESSAGES=C.UTF-8 -ARG PIP_VERSION -ENV PIP_VERSION=${PIP_VERSION} +ARG AIRFLOW_PIP_VERSION +ENV AIRFLOW_PIP_VERSION=${AIRFLOW_PIP_VERSION} # Install curl and gnupg2 - needed for many other installation steps RUN apt-get update \ @@ -428,7 +428,7 @@ COPY --chown=airflow:root scripts/in_container/prod/entrypoint_prod.sh /entrypoi COPY --chown=airflow:root scripts/in_container/prod/clean-logs.sh /clean-logs RUN chmod a+x /entrypoint /clean-logs -RUN pip install --upgrade "pip==${PIP_VERSION}" +RUN pip install --upgrade "pip==${AIRFLOW_PIP_VERSION}" # Make /etc/passwd root-group-writeable so that user can be dynamically added by OpenShift # See https://github.com/apache/airflow/issues/9248 diff --git a/Dockerfile.ci b/Dockerfile.ci index 7c730e3e93..80d03971ef 100644 --- a/Dockerfile.ci +++ b/Dockerfile.ci @@ -29,8 +29,8 @@ ENV AIRFLOW_VERSION=$AIRFLOW_VERSION ARG PYTHON_MAJOR_MINOR_VERSION="3.6" ENV PYTHON_MAJOR_MINOR_VERSION=${PYTHON_MAJOR_MINOR_VERSION} -ARG PIP_VERSION=20.2.4 -ENV PIP_VERSION=${PIP_VERSION} +ARG AIRFLOW_PIP_VERSION=20.2.4 +ENV AIRFLOW_PIP_VERSION=${AIRFLOW_PIP_VERSION} # Print versions RUN echo "Base image: ${PYTHON_BASE_IMAGE}" @@ -271,7 +271,7 @@ ENV INSTALL_FROM_DOCKER_CONTEXT_FILES=${INSTALL_FROM_DOCKER_CONTEXT_FILES} ARG INSTALL_FROM_PYPI="true" ENV INSTALL_FROM_PYPI=${INSTALL_FROM_PYPI} -RUN pip install --upgrade "pip==${PIP_VERSION}" +RUN pip install --upgrade "pip==${AIRFLOW_PIP_VERSION}" # In case of CI builds we want to pre-install master version of airflow dependencies so that # We do not have to always reinstall it from the scratch. @@ -322,10 +322,10 @@ ENV UPGRADE_TO_LATEST_CONSTRAINTS=${UPGRADE_TO_LATEST_CONSTRAINTS} RUN if [[ ${INSTALL_FROM_PYPI} == "true" ]]; then \ if [[ "${UPGRADE_TO_LATEST_CONSTRAINTS}" != "false" ]]; then \ pip install -e ".[${AIRFLOW_EXTRAS}]" --upgrade --upgrade-strategy eager; \ - pip install --upgrade "pip==${PIP_VERSION}"; \ + pip install --upgrade "pip==${AIRFLOW_PIP_VERSION}"; \ else \ pip install -e ".[${AIRFLOW_EXTRAS}]" --upgrade --upgrade-strategy only-if-needed; \ - pip install --upgrade "pip==${PIP_VERSION}"; \ + pip install --upgrade "pip==${AIRFLOW_PIP_VERSION}"; \ fi; \ fi diff --git a/scripts/ci/kubernetes/ci_run_kubernetes_tests.sh b/scripts/ci/kubernetes/ci_run_kubernetes_tests.sh index 67d379252e..0d405d532f 100755 --- a/scripts/ci/kubernetes/ci_run_kubernetes_tests.sh +++ b/scripts/ci/kubernetes/ci_run_kubernetes_tests.sh @@ -86,7 +86,7 @@ fi . "${virtualenv_path}/bin/activate" -pip install --upgrade "pip==${PIP_VERSION}" "wheel==${WHEEL_VERSION}" +pip install --upgrade "pip==${AIRFLOW_PIP_VERSION}" "wheel==${WHEEL_VERSION}" pip install pytest freezegun pytest-cov \ --constraint "https://raw.githubusercontent.com/apache/airflow/${DEFAULT_CONSTRAINTS_BRANCH}/constraints-${HOST_PYTHON_VERSION}.txt" diff --git a/scripts/ci/libraries/_build_airflow_packages.sh b/scripts/ci/libraries/_build_airflow_packages.sh index 3ec1bcaf61..7ab5b30796 100644 --- a/scripts/ci/libraries/_build_airflow_packages.sh +++ b/scripts/ci/libraries/_build_airflow_packages.sh @@ -21,7 +21,7 @@ function build_airflow_packages::build_airflow_packages() { rm -rf -- *egg-info* rm -rf -- build - pip install --upgrade "pip==${PIP_VERSION}" "wheel==${WHEEL_VERSION}" + pip install --upgrade "pip==${AIRFLOW_PIP_VERSION}" "wheel==${WHEEL_VERSION}" local packages=() diff --git a/scripts/ci/libraries/_initialization.sh b/scripts/ci/libraries/_initialization.sh index 70b03dc06d..7d607fdf08 100644 --- a/scripts/ci/libraries/_initialization.sh +++ b/scripts/ci/libraries/_initialization.sh @@ -174,8 +174,8 @@ function initialization::initialize_base_variables() { export INSTALLED_EXTRAS="async,amazon,celery,cncf.kubernetes,docker,dask,elasticsearch,ftp,grpc,hashicorp,http,imap,google,microsoft.azure,mysql,postgres,redis,sendgrid,sftp,slack,ssh,statsd,virtualenv" # default version of PIP USED (This has to be < 20.3 until https://github.com/apache/airflow/issues/12838 is solved) - PIP_VERSION=${PIP_VERSION:="20.2.4"} - export PIP_VERSION + AIRFLOW_PIP_VERSION=${AIRFLOW_PIP_VERSION:="20.2.4"} + export AIRFLOW_PIP_VERSION # We also pin version of wheel used to get consistent builds WHEEL_VERSION=${WHEEL_VERSION:="0.36.1"}