add flake 8 integration and remove front

dev
Dmitry Titov 3 years ago
parent 39219f7f7b
commit a843e70142

@ -0,0 +1,5 @@
.gitignore
.gitlab/*
.gitlab-ci.yml
README.md
.git/*

@ -1,5 +1,8 @@
stages: stages:
- lint
# - build
- deploy - deploy
deploy: deploy:
stage: deploy stage: deploy
only: only:
@ -15,3 +18,35 @@ deploy:
tags: tags:
- deploy-remote - deploy-remote
flake8:
stage: lint
before_script:
- pip install flake8_formatter_junit_xml
- export PATH="$HOME/.local/bin:$PATH"
script:
- set -x
- FLIST=$(git --no-pager diff --diff-filter=d --name-only $(git merge-base --fork-point origin/$CI_MERGE_REQUEST_TARGET_BRANCH_NAME) $CI_COMMIT_SHA | egrep ".py$" | grep -v ".docker/"|| true)
- >
if [ ! -z "$FLIST" ];
then
mkdir -p build/reports;
flake8 --format junit-xml $FLIST > build/reports/flake8-junit.xml || flake8 $FLIST;
else
echo "No files to lint"
true;
fi
only:
refs:
- merge_requests
changes:
- "*.py"
- "**/*.py"
tags:
- deploy-remote
artifacts:
reports:
junit: ./build/reports/flake8-junit.xml
expire_in: 7 days
allow_failure: false

@ -1,4 +1,10 @@
<<<<<<< HEAD
### Changes: ### Changes:
=======
# %{source_branch} MR to %{target_branch}
## Changes:
>>>>>>> 05c7168 (add flake 8 integration and remove front)
%{all_commits} %{all_commits}
/assign_reviewer @elizavetanikolaeva /assign_reviewer @elizavetanikolaeva

@ -17,11 +17,9 @@ x-frontend-variables: &frontend-variables
DOMAIN: "${DOMAIN}" DOMAIN: "${DOMAIN}"
REACT_APP_DOMAIN_URL: "https://${DOMAIN}/" REACT_APP_DOMAIN_URL: "https://${DOMAIN}/"
x-martin-variables: &martin-variables x-martin-variables: &martin-variables
MARTIN_PORT: "${MARTIN_PORT}" MARTIN_PORT: "${MARTIN_PORT}"
services: services:
django: django:
container_name: ${CONTAINERS_NAME}_django container_name: ${CONTAINERS_NAME}_django
@ -72,23 +70,3 @@ services:
- db - db
- django - django
restart: always restart: always
frontend:
container_name: ${CONTAINERS_NAME}_frontend
build: postamates_frontend
volumes:
- ./dist/:/usr/src/postamates_frontend/dist/
command:
sh -c "yarn build"
environment:
<<: *frontend-variables
depends_on:
- db
- martin
- django
deploy:
resources:
limits:
memory: 4096M
reservations:
memory: 4096M

@ -9,4 +9,5 @@ urlpatterns = [
path('api/', include('service.urls')), path('api/', include('service.urls')),
path('accounts/', include('rest_registration.api.urls')), path('accounts/', include('rest_registration.api.urls')),
] ]
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)

Loading…
Cancel
Save