Skip to content

Commit

Permalink
[AIRFLOW-4296] Remove py2 in ci process (apache#5090)
Browse files Browse the repository at this point in the history
  • Loading branch information
zhongjiajie authored and wayne.morris committed Jul 29, 2019
1 parent 3b25247 commit c57b694
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 21 deletions.
1 change: 0 additions & 1 deletion scripts/ci/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ services:
- INSIDE_DOCKER_CONTAINER=true
- ADDITIONAL_PATH=~/.local/bin
- TOX_ENV
- PYTHON_VERSION
- CI
- TRAVIS
- TRAVIS_BRANCH
Expand Down
6 changes: 2 additions & 4 deletions scripts/ci/kubernetes/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,22 +15,20 @@
# specific language governing permissions and limitations *
# under the License. *

FROM ubuntu:16.04
FROM python:3.6-slim

# install deps
RUN apt-get update -y && apt-get install -y \
wget \
python-dev \
python-pip \
libczmq-dev \
libcurlpp-dev \
curl \
libssl-dev \
git \
inetutils-telnet \
bind9utils \
zip \
unzip \
gcc \
&& apt-get clean

RUN pip install --upgrade pip
Expand Down
2 changes: 1 addition & 1 deletion scripts/ci/kubernetes/docker/airflow-test-env-init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

set -x

cd /usr/local/lib/python2.7/dist-packages/airflow && \
cd /usr/local/lib/python3.6/site-packages/airflow && \
cp -R example_dags/* /root/airflow/dags/ && \
cp -R contrib/example_dags/example_kubernetes_*.py /root/airflow/dags/ && \
cp -a contrib/example_dags/libs /root/airflow/dags/ && \
Expand Down
7 changes: 1 addition & 6 deletions scripts/ci/kubernetes/docker/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ IMAGE=${IMAGE:-airflow}
TAG=${TAG:-latest}
DIRNAME=$(cd "$(dirname "$0")"; pwd)
AIRFLOW_ROOT="$DIRNAME/../../../.."
PYTHON_DOCKER_IMAGE=python:3.6-slim

set -e

Expand All @@ -34,12 +35,6 @@ fi
echo "Airflow directory $AIRFLOW_ROOT"
echo "Airflow Docker directory $DIRNAME"

if [[ ${PYTHON_VERSION} == '3' ]]; then
PYTHON_DOCKER_IMAGE=python:3.6-slim
else
PYTHON_DOCKER_IMAGE=python:2.7-slim
fi

cd $AIRFLOW_ROOT
docker run -ti --rm -v ${AIRFLOW_ROOT}:/airflow \
-w /airflow ${PYTHON_DOCKER_IMAGE} ./scripts/ci/kubernetes/docker/compile.sh \
Expand Down
12 changes: 3 additions & 9 deletions scripts/ci/run-ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,10 @@ if [ -d $HOME/.minikube ]; then
sudo chown -R airflow.airflow $HOME/.kube $HOME/.minikube
fi

if [[ $PYTHON_VERSION == '3' ]]; then
PIP=pip3
else
PIP=pip2
fi

sudo -H $PIP install --upgrade pip
sudo -H $PIP install tox
sudo -H pip3 install --upgrade pip
sudo -H pip3 install tox

cd $AIRFLOW_ROOT && $PIP --version && tox --version
cd $AIRFLOW_ROOT && pip3 --version && tox --version

if [ -z "$KUBERNETES_VERSION" ];
then
Expand Down

0 comments on commit c57b694

Please sign in to comment.