remove support for django1.11 and python2 (#11195)
This commit is contained in:
Родитель
97ca6a72ed
Коммит
6aebb99b1f
|
@ -23,7 +23,7 @@ commands:
|
|||
name: Build docker image and push to repo
|
||||
command: |
|
||||
docker version
|
||||
docker build -t app:build --build-arg DJANGO_VERSION -f << parameters.dockerfile >> .
|
||||
docker build -t app:build -f << parameters.dockerfile >> .
|
||||
docker tag app:build "${DOCKERHUB_REPO}":<< parameters.image_tag >>
|
||||
docker login -u "${DOCKERHUB_USER}" -p "${DOCKERHUB_PASS}"
|
||||
docker push "${DOCKERHUB_REPO}":<< parameters.image_tag >>
|
||||
|
@ -31,8 +31,6 @@ jobs:
|
|||
build:
|
||||
machine: true
|
||||
working_directory: ~/addons-server
|
||||
environment:
|
||||
DJANGO_VERSION: "django22"
|
||||
steps:
|
||||
- checkout
|
||||
- build_and_push_container_image:
|
||||
|
@ -80,7 +78,7 @@ jobs:
|
|||
- restore_cache:
|
||||
keys:
|
||||
- uitest-cache-{{ checksum "requirements/docs.txt" }}
|
||||
- uitest-cache-{{ checksum "requirements/prod_py3.txt" }}
|
||||
- uitest-cache-{{ checksum "requirements/prod.txt" }}
|
||||
- uitest-cache-{{ checksum "requirements/tests.txt" }}
|
||||
- uitest-cache-{{ checksum "requirements/dev.txt" }}
|
||||
- uitest-cache-{{ checksum "requirements/dev_without_hash.txt" }}
|
||||
|
@ -142,7 +140,7 @@ jobs:
|
|||
paths:
|
||||
- .tox
|
||||
- save_cache:
|
||||
key: uitest-cache-{{ checksum "requirements/prod_py3.txt" }}
|
||||
key: uitest-cache-{{ checksum "requirements/prod.txt" }}
|
||||
paths:
|
||||
- .tox
|
||||
- save_cache:
|
||||
|
|
|
@ -17,14 +17,6 @@ jobs:
|
|||
- { env: TOXENV=accounts-users-and-ratings }
|
||||
- { env: TOXENV=amo-lib-locales-and-signing }
|
||||
- { env: TOXENV=main }
|
||||
- { env: TOXENV=assets DJANGO_VERSION=django22 }
|
||||
- { env: TOXENV=es DJANGO_VERSION=django22 }
|
||||
- { env: TOXENV=addons-versions-and-files DJANGO_VERSION=django22 }
|
||||
- { env: TOXENV=devhub DJANGO_VERSION=django22 }
|
||||
- { env: TOXENV=reviewers-and-zadmin DJANGO_VERSION=django22 }
|
||||
- { env: TOXENV=accounts-users-and-ratings DJANGO_VERSION=django22 }
|
||||
- { env: TOXENV=amo-lib-locales-and-signing DJANGO_VERSION=django22 }
|
||||
- { env: TOXENV=main DJANGO_VERSION=django22 }
|
||||
|
||||
env:
|
||||
global:
|
||||
|
|
|
@ -2,10 +2,6 @@ FROM python:3.6-slim-stretch
|
|||
|
||||
ENV PYTHONDONTWRITEBYTECODE=1
|
||||
|
||||
ENV PYTHON_VERSION_MAJOR 3
|
||||
|
||||
ENV DJANGO_VERSION=django22
|
||||
|
||||
# Allow scripts to detect we're running in our own container
|
||||
RUN touch /addons-server-docker-container
|
||||
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
FROM python:3.6-slim-stretch
|
||||
|
||||
ENV PYTHON_VERSION_MAJOR 3
|
||||
|
||||
ARG DJANGO_VERSION=""
|
||||
ENV DJANGO_VERSION=$DJANGO_VERSION
|
||||
|
||||
# need to compile swig
|
||||
ENV SWIG_FEATURES="-D__x86_64__"
|
||||
|
||||
|
@ -71,7 +66,7 @@ WORKDIR /data/olympia
|
|||
|
||||
# Install all python requires
|
||||
RUN pip3 install --no-cache-dir --exists-action=w --no-deps -r requirements/system.txt \
|
||||
&& pip3 install --no-cache-dir --exists-action=w --no-deps -r requirements/prod_py3$DJANGO_VERSION.txt \
|
||||
&& pip3 install --no-cache-dir --exists-action=w --no-deps -r requirements/prod.txt \
|
||||
&& pip3 install --no-cache-dir --exists-action=w --no-deps -e .
|
||||
|
||||
# Link /usr/bin/uwsgi to /usr/local/bin/uwsgi, as that was the
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
# Determine the python version (2 or 3) so we can load the correct
|
||||
# requirements and python binary. It can be passed through the env variable
|
||||
# PYTHON_VERSION_MAJOR so that both version can coexist in the container and
|
||||
# be chosen when running docker-compose.
|
||||
export PYTHON_VERSION_MAJOR ?= $(shell python -c 'import sys; print(sys.version_info.major)')
|
||||
export PIP_COMMAND=pip${PYTHON_VERSION_MAJOR}
|
||||
export PYTHON_COMMAND=python${PYTHON_VERSION_MAJOR}
|
||||
export PIP_COMMAND=pip3
|
||||
export PYTHON_COMMAND=python3
|
||||
|
||||
NUM_ADDONS=10
|
||||
NUM_THEMES=$(NUM_ADDONS)
|
||||
|
@ -120,7 +115,7 @@ install_python_test_dependencies:
|
|||
# Can't use --progress-bar=off for system packages as long as our docker image
|
||||
# doesn't have pip 10 by default.
|
||||
$(PIP_COMMAND) install --no-deps --exists-action=w -r requirements/system.txt
|
||||
$(PIP_COMMAND) install --progress-bar=off --no-deps --exists-action=w -r requirements/prod_py${PYTHON_VERSION_MAJOR}${DJANGO_VERSION}.txt
|
||||
$(PIP_COMMAND) install --progress-bar=off --no-deps --exists-action=w -r requirements/prod.txt
|
||||
$(PIP_COMMAND) install --progress-bar=off --no-deps --exists-action=w -r requirements/tests.txt
|
||||
|
||||
.PHONY: install_python_dev_dependencies
|
||||
|
@ -206,7 +201,7 @@ perf-tests: setup-ui-tests
|
|||
|
||||
.PHONY: setup-codestyle
|
||||
setup-codestyle:
|
||||
$(PIP_COMMAND) install --progress-bar=off --no-deps --exists-action=w -r requirements/codestyle_py${PYTHON_VERSION_MAJOR}.txt
|
||||
$(PIP_COMMAND) install --progress-bar=off --no-deps --exists-action=w -r requirements/codestyle.txt
|
||||
|
||||
.PHONY: lint-codestyle
|
||||
lint-codestyle:
|
||||
|
|
|
@ -8,7 +8,6 @@ x-env-mapping: &env
|
|||
- CELERY_BROKER_URL=amqp://olympia:olympia@rabbitmq/olympia
|
||||
- CELERY_RESULT_BACKEND=redis://redis:6379/1
|
||||
- DATABASES_DEFAULT_URL=mysql://root:@mysqld/olympia
|
||||
- DJANGO_VERSION=django22
|
||||
- ELASTICSEARCH_LOCATION=elasticsearch:9200
|
||||
- MEMCACHE_LOCATION=memcached:11211
|
||||
- MYSQL_DATABASE=olympia
|
||||
|
|
|
@ -1,16 +0,0 @@
|
|||
-r codestyle_common.txt
|
||||
|
||||
configparser==3.7.4 \
|
||||
--hash=sha256:8be81d89d6e7b4c0d4e44bcc525845f6da25821de80cb5e06e7e0238a2899e32 \
|
||||
--hash=sha256:da60d0014fd8c55eb48c1c5354352e363e2d30bbf7057e5e171a468390184c75
|
||||
enum34==1.1.6 \
|
||||
--hash=sha256:6bd0f6ad48ec2aa117d3d141940d484deccda84d4fcd884f5c3d93c23ecd8c79 \
|
||||
--hash=sha256:8ad8c4783bf61ded74527bffb48ed9b54166685e4230386a9ed9b1279e2df5b1 \
|
||||
--hash=sha256:2d81cbbe0e73112bdfe6ef8576f2238f2ba27dd0d55752a776c41d38b7da2850
|
||||
typing==3.6.6 \
|
||||
--hash=sha256:a4c8473ce11a65999c8f59cb093e70686b6c84c98df58c1dae9b3b196089858a \
|
||||
--hash=sha256:57dcf675a99b74d64dacf6fba08fb17cf7e3d5fdff53d4a30ea2a5e7e52543d4 \
|
||||
--hash=sha256:4027c5f6127a6267a435201981ba156de91ad0d1d98e9ddc2aa173453453492d
|
||||
functools32==3.2.3-2 \
|
||||
--hash=sha256:f6253dfbe0538ad2e387bd8fdfd9293c925d63553f5813c4e587745416501e6d \
|
||||
--hash=sha256:89d824aa6c358c421a234d7f9ee0bd75933a67c29588ce50aaa3acdf4d403fa0
|
|
@ -1 +0,0 @@
|
|||
-r codestyle_common.txt
|
|
@ -1,3 +1,6 @@
|
|||
Django==2.2 \
|
||||
--hash=sha256:7c3543e4fb070d14e10926189a7fcf42ba919263b7473dceaefce34d54e8a119 \
|
||||
--hash=sha256:a2814bffd1f007805b19194eb0b9a331933b82bd5da1c3ba3d7b7ba16e06dc4b
|
||||
Babel==2.6.0 \
|
||||
--hash=sha256:6778d85147d5d85345c14a26aada5e478ab04e39b078b0745ee6870c2b5cf669 \
|
||||
--hash=sha256:8cba50f48c529ca3fa18cf81fa9403be176d374ac4d60738b839122dfaaa3d23
|
||||
|
@ -393,3 +396,8 @@ sqlparse==0.3.0 \
|
|||
python-magic==0.4.15 \
|
||||
--hash=sha256:f2674dcfad52ae6c49d4803fa027809540b130db1dec928cfbb9240316831375 \
|
||||
--hash=sha256:f3765c0f582d2dfc72c15f3b5a82aecfae9498bd29ca840d72f37d7bd38bfcd5
|
||||
# atpublic is required by flufl.lock
|
||||
atpublic==1.0 \
|
||||
--hash=sha256:7dca670499e9a9d3aae5a8914bc799475fe24be3bcd29c8129642dda665f7a44
|
||||
flufl.lock==3.2 \
|
||||
--hash=sha256:a8d66accc9ab41f09961cd8f8db39f9c28e97e2769659a3567c63930a869ff5b
|
|
@ -1,11 +0,0 @@
|
|||
-r prod_common.txt
|
||||
|
||||
Django==1.11.20 \
|
||||
--hash=sha256:0a73696e0ac71ee6177103df984f9c1e07cd297f080f8ec4dc7c6f3fb74395b5 \
|
||||
--hash=sha256:43a99da08fee329480d27860d68279945b7d8bf7b537388ee2c8938c709b2041 # pyup: >=1.11,<2.0
|
||||
# futures is required by s3transfer
|
||||
futures==3.2.0 \
|
||||
--hash=sha256:9ec02aa7d674acb8618afb127e27fde7fc68994c0437ad759fa094a574adb265 \
|
||||
--hash=sha256:ec0a6cb848cc212002b9828c3e34c675e0c9ff6741dc445cab6fdd4e1085d1f1
|
||||
flufl.lock==2.4.1 \
|
||||
--hash=sha256:72639aca3ef0379aef125c7346b042691c3452152843f301801b3c2ddcac1032 # pyup: <3.0
|
|
@ -1,10 +0,0 @@
|
|||
-r prod_common.txt
|
||||
|
||||
Django==1.11.20 \
|
||||
--hash=sha256:0a73696e0ac71ee6177103df984f9c1e07cd297f080f8ec4dc7c6f3fb74395b5 \
|
||||
--hash=sha256:43a99da08fee329480d27860d68279945b7d8bf7b537388ee2c8938c709b2041 # pyup: >=1.11,<2.0
|
||||
# atpublic is required by flufl.lock
|
||||
atpublic==1.0 \
|
||||
--hash=sha256:7dca670499e9a9d3aae5a8914bc799475fe24be3bcd29c8129642dda665f7a44
|
||||
flufl.lock==3.2 \
|
||||
--hash=sha256:a8d66accc9ab41f09961cd8f8db39f9c28e97e2769659a3567c63930a869ff5b
|
|
@ -1,10 +0,0 @@
|
|||
-r prod_common.txt
|
||||
|
||||
Django==2.2 \
|
||||
--hash=sha256:7c3543e4fb070d14e10926189a7fcf42ba919263b7473dceaefce34d54e8a119 \
|
||||
--hash=sha256:a2814bffd1f007805b19194eb0b9a331933b82bd5da1c3ba3d7b7ba16e06dc4b
|
||||
# atpublic is required by flufl.lock
|
||||
atpublic==1.0 \
|
||||
--hash=sha256:7dca670499e9a9d3aae5a8914bc799475fe24be3bcd29c8129642dda665f7a44
|
||||
flufl.lock==3.2 \
|
||||
--hash=sha256:a8d66accc9ab41f09961cd8f8db39f9c28e97e2769659a3567c63930a869ff5b
|
Загрузка…
Ссылка в новой задаче