Commit f66bb2b6 authored by Florent Chehab's avatar Florent Chehab
Browse files

removed deploy CI #42

Repo structure complete redesign
Fixes #38
parent 818af843
...@@ -5,7 +5,6 @@ db.sqlite3 ...@@ -5,7 +5,6 @@ db.sqlite3
/static /static
.DS_Store .DS_Store
/media/* /media/*
node_modules
.coverage .coverage
htmlcov htmlcov
.vscode .vscode
......
...@@ -54,22 +54,3 @@ pages: ...@@ -54,22 +54,3 @@ pages:
- master - master
tags: tags:
- docker - docker
deliver_for_production:
type: deploy
before_script:
## look here for info : https://docs.gitlab.com/ee/ci/ssh_keys/#ssh-keys-when-using-the-docker-executor
- 'which ssh-agent || ( apt-get update -y && apt-get install openssh-client -y )'
- eval $(ssh-agent -s)
- echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add - > /dev/null
- mkdir -p ~/.ssh
- chmod 700 ~/.ssh
- echo "$SSH_KNOWN_HOSTS" > ~/.ssh/known_hosts
- chmod 644 ~/.ssh/known_hosts
script:
- ssh $SERVER_USER_USERNAME@$SERVER 'bash -s' < deploy.sh
only:
- production
tags:
- docker
...@@ -3,7 +3,7 @@ omit = ...@@ -3,7 +3,7 @@ omit =
*migrations* *migrations*
*/tests/* */tests/*
manage.py manage.py
general/wsgi.py base_app/wsgi.py
*/urls.py */urls.py
*/admin.py */admin.py
......
...@@ -4,7 +4,4 @@ ignore = E501 ...@@ -4,7 +4,4 @@ ignore = E501
exclude = exclude =
env/* env/*
node_modules/* node_modules/*
backend/urls.py base_app/settings/development.py
backend/admin.py
backend/permissions/__list_user_post_permission.py
general/settings/development.py
/static
\ No newline at end of file
default_app_config = 'backend.apps.BackendConfig'
from django.apps import AppConfig
class BackendConfig(AppConfig):
name = 'backend'
def ready(self):
import backend.signals.__create_user_modules_post_create # noqa: F401
import backend.signals.__squash_revision_by_user # noqa: F401
import backend.signals.__create_univ_modules_post_save # noqa: F401
default_app_config = 'backend_app.apps.BackendAppConfig'
...@@ -14,7 +14,7 @@ for model in api_config: ...@@ -14,7 +14,7 @@ for model in api_config:
if "model" in model and model['model']: if "model" in model and model['model']:
model = DotMap(model) model = DotMap(model)
if (not model.requires_testing) and (not model.ignore_in_admin): if (not model.requires_testing) and (not model.ignore_in_admin):
module = importlib.import_module("backend.models.{}".format (model.import_location)) module = importlib.import_module("backend_app.models.{}".format (model.import_location))
if model.versionned: if model.versionned:
VERSIONNED_MODELS.append(getattr(module, model.model)) VERSIONNED_MODELS.append(getattr(module, model.model))
else: else:
......
from django.apps import AppConfig
class BackendAppConfig(AppConfig):
name = 'backend_app'
def ready(self):
import backend_app.signals.__create_user_modules_post_create # noqa: F401
import backend_app.signals.__squash_revision_by_user # noqa: F401
import backend_app.signals.__create_univ_modules_post_save # noqa: F401
from backend.fields import JSONField from backend_app.fields import JSONField
from rest_framework import serializers from rest_framework import serializers
field_mapping = serializers.ModelSerializer.serializer_field_mapping field_mapping = serializers.ModelSerializer.serializer_field_mapping
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment